package Ġio . un th rott led . dok i . prom otions Ċ Ċ import Ġcom . intellij . openapi . application . Application Manager Ċ import Ġio . un th rott led . dok i . assets . Asset Category Ċ import Ġio . un th rott led . dok i . assets . Asset Manager Ċ import Ġio . un th rott led . dok i . stick ers . Current St icker Ċ import Ġio . un th rott led . dok i . stick ers . St icker Component Ċ import Ġio . un th rott led . dok i . themes . Background Ċ import Ġio . un th rott led . dok i . themes . D oki Theme Ċ import Ġio . un th rott led . dok i . util . do OrElse Ċ import Ġio . un th rott led . dok i . util . to Optional Ċ import Ġjava . util . Optional Ċ Ċ object ĠC ult ured Content Manager Ġ{ ĊĊĠ Ġprivate Ġval Ġcult ured Themes Ġ= Ġset Of ( ĊĠĠĠ Ġ" ea 9 a 1 3 f 6 - fa 7 f - 4 6 a 4 - ba 6 e - 6 ce fe 1 f 5 5 1 6 0 ", ĊĠ Ġ) ĊĊĠ Ġprivate Ġvar Ġis As king Ġ= Ġfalse ĊĊĠ Ġfun Ġsafely Get St icker ( dok i Theme : ĠD oki Theme ): ĠOptional < String > Ġ= ĊĠĠĠ Ġsafely Get Content ( ĊĠĠĠĠĠ Ġdo ki Theme , ĊĠĠĠĠĠ Ġdo ki Theme . stick ers . secondary Ġ?: Ġdo ki Theme . stick ers . default ĊĠĠĠ Ġ) ĊĊĠ Ġfun Ġsafely Get Background ( dok i Theme : ĠD oki Theme ): ĠOptional < Background > Ġ= ĊĠĠĠ Ġsafely Get Content ( ĊĠĠĠĠĠ Ġdo ki Theme , ĊĠĠĠĠĠ Ġdo ki Theme . background s . secondary Ġ?: Ġdo ki Theme . background s . default ĊĠĠĠ Ġ) ĊĊĠ Ġprivate Ġfun Ġ< T > Ġsafely Get Content ( ĊĠĠĠ Ġdo ki Theme : ĠD oki Theme , ĊĠĠĠ Ġcontent : ĠT ĊĠ Ġ) Ġ= ĊĠĠĠ Ġif Ġ( is C ult ured ( dok i Theme ) Ġ&& Ġ! has Accepted ( dok i Theme )) Ġ{ ĊĠĠĠĠĠ Ġif Ġ(! is As king ) Ġ{ ĊĠĠĠĠĠĠĠ Ġask To Show C ult ured Content ( dok i Theme ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ ĠOptional . empty () ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠ Ġcontent . to Optional () ĊĠĠĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġask To Show C ult ured Content ( dok i Theme : ĠD oki Theme ) Ġ{ ĊĠĠĠ Ġis As king Ġ= Ġtrue ĊĠĠĠ Ġget First Project () ĊĠĠĠĠĠ Ġ. do OrElse ({ ĊĠĠĠĠĠĠĠ ĠApplication Manager . getApplication (). invoke Later Ġ{ ĊĠĠĠĠĠĠĠĠĠ Ġval Ġdialog Ġ= ĠC ult ured Content Dialog ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠAsset Manager . resolve Asset Url ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠAsset Category . MISC , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" suggest ive / c ult ured . gif " ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ). orElse ("${ Asset Manager . AS SET _ SOURCE }/ misc / suggest ive / c ult ured . gif "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit ĊĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠ Ġdialog . show AndGet () ĊĊĠĠĠĠĠĠĠĠĠ Ġif Ġ( dialog . exit Code Ġ== ĠC ult ured Content Dialog . ALLOW _ C ULT URE _ EXIT _ CODE ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcurrent Ledger Ġ= ĠC ult ured Content Ledger Master . read Ledger () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcurrent Ledger . allowed C ult ured Content [ dok i Theme . id ] Ġ= Ġmutable Set Of ( Current St icker . SECOND ARY ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠC ult ured Content Ledger Master . persist Ledger ( current Ledger ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSt icker Component . activate For Theme ( dok i Theme ) ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġis As king Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġ}) Ġ{ ĊĠĠĠĠĠĠĠ Ġis As king Ġ= Ġfalse ĊĠĠĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġhas Accepted ( dok i Theme : ĠD oki Theme ): ĠBoolean Ġ= ĊĠĠĠ ĠC ult ured Content Ledger Master . read Ledger (). allowed C ult ured Content . containsKey ( dok i Theme . id ) ĊĊĠ Ġprivate Ġfun Ġis C ult ured ( dok i Theme : ĠD oki Theme ): ĠBoolean Ġ= ĊĠĠĠ Ġcult ured Themes . contains ( dok i Theme . id ) Ċ } Ċ