forked from bombastictranz/token-lists
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
discourse-adplugin-fb5ac85eeb275bf08c405f0bd2cbf27f65b3de816044a5398be674b051ce801b.br.js.download
131 lines (129 loc) Β· 66.2 KB
/
discourse-adplugin-fb5ac85eeb275bf08c405f0bd2cbf27f65b3de816044a5398be674b051ce801b.br.js.download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
define("discourse/plugins/discourse-adplugin/discourse/components/ad-component",["exports","@ember/component","@ember/object/computed","@ember/service","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/helpers/slot-position"],(function(e,t,s,i,o,a){"use strict"
var l,r,n,d
function p(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=t.default.extend((l=(0,o.default)("router.currentRoute.attributes.__type","router.currentRoute.attributes.id"),r=(0,o.default)("router.currentRoute.parent.attributes.archetype"),n=(0,o.default)("currentCategoryId","topicTagsDisableAds","topicListTag","isPersonalMessage","isRestrictedCategory"),p(d={router:(0,i.inject)(),currentCategoryId:(0,s.or)("router.currentRoute.attributes.category.id","router.currentRoute.parent.attributes.category_id"),currentCategorySlug:(0,s.or)("router.currentRoute.attributes.category.slug","router.currentRoute.parent.attributes.category.slug"),topicTagsDisableAds:(0,s.alias)("router.currentRoute.parent.attributes.tags_disable_ads"),isRestrictedCategory:(0,s.or)("router.currentRoute.attributes.category.read_restricted","router.currentRoute.parent.attributes.category.read_restricted"),topicListTag(e,t){if("tag"===e&&t)return t},isPersonalMessage:e=>"private_message"===e,showToGroups(){return!this.currentUser||this.currentUser.show_to_groups},showOnCurrentPage(e,t,s,i,o){return!(t||e&&this.siteSettings.no_ads_for_categories&&this.siteSettings.no_ads_for_categories.split("|").includes(e.toString())||s&&this.siteSettings.no_ads_for_tags&&this.siteSettings.no_ads_for_tags.split("|").includes(s)||i&&this.siteSettings.no_ads_for_personal_messages||o&&this.siteSettings.no_ads_for_restricted_categories)},isNthPost(e){return(0,a.isNthPost)(e,this.get("postNumber"))},isNthTopicListItem(e){return(0,a.isNthTopicListItem)(e,this.get("indexNumber"))}},"topicListTag",[l],Object.getOwnPropertyDescriptor(d,"topicListTag"),d),p(d,"isPersonalMessage",[r],Object.getOwnPropertyDescriptor(d,"isPersonalMessage"),d),p(d,"showToGroups",[o.default],Object.getOwnPropertyDescriptor(d,"showToGroups"),d),p(d,"showOnCurrentPage",[n],Object.getOwnPropertyDescriptor(d,"showOnCurrentPage"),d),d))})),define("discourse/plugins/discourse-adplugin/discourse/components/ad-slot",["exports","@ember/component","@ember/object","@ember/service","@ember/utils","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","discourse/plugins/discourse-adplugin/discourse/helpers/slot-position","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n,d){"use strict"
var p,u,c
function h(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.slotContenders=g
const b=(0,d.createTemplateFactory)({id:"huhN6Lo/",block:'[[[42,[28,[37,1],[[28,[37,1],[[30,0,["adComponents"]]],null]],null],null,[[[42,[28,[37,1],[[28,[37,1],[[28,[37,2],[[30,0,["router","currentRoute"]]],null]],null]],null],null,[[[1," "],[46,[30,1],null,[["placement","category","postNumber","indexNumber","tagName"],[[30,0,["placement"]],[30,0,["category"]],[30,0,["postNumber"]],[30,0,["indexNumber"]],[30,0,["childTagName"]]]],null],[1,"\\n"]],[]],null]],[1]],null],[1,[28,[32,0],["[[\\"The `adComponents` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adComponents}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `placement` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.placement}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `category` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.category}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `postNumber` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.postNumber}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `indexNumber` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.indexNumber}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `childTagName` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.childTagName}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["adComponent"],false,["each","-track-array","array","component"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs",scope:()=>[n.default],isStrictMode:!1}),m=s.default.create({"google-adsense":{settingPrefix:"adsense",enabledSetting:"adsense_publisher_code",nthPost:"adsense_nth_post_code"},"google-dfp-ad":{settingPrefix:"dfp",enabledSetting:"dfp_publisher_id",nthPost:"dfp_nth_post_code"},"amazon-product-links":{settingPrefix:"amazon",enabledSetting:!1,nthPost:"amazon_nth_post_code",desktop:{"topic-list-top":"amazon_topic_list_top_src_code","post-bottom":"amazon_post_bottom_src_code","topic-above-post-stream":"amazon_topic_above_post_stream_src_code","topic-above-suggested":"amazon_topic_above_suggested_src_code"},mobile:{"topic-list-top":"amazon_mobile_topic_list_top_src_code","post-bottom":"amazon_mobile_post_bottom_src_code","topic-above-post-stream":"amazon_mobile_topic_above_post_stream_src_code","topic-above-suggested":"amazon_mobile_topic_above_suggested_src_code"}},"carbonads-ad":{settingPrefix:"carbonads",enabledSetting:"carbonads_serve_id",desktop:{"topic-list-top":"carbonads_topic_list_top_enabled","post-bottom":!1,"topic-above-post-stream":"carbonads_above_post_stream_enabled","topic-above-suggested":!1}},"adbutler-ad":{settingPrefix:"adbutler",enabledSetting:"adbutler_publisher_id",desktop:{"topic-list-top":"adbutler_topic_list_top_zone_id","post-bottom":"adbutler_post_bottom_zone_id","topic-above-post-stream":"adbutler_topic_above_post_stream_zone_id","topic-above-suggested":"adbutler_topic_above_suggested_zone_id"},mobile:{"topic-list-top":"adbutler_mobile_topic_list_top_zone_id","post-bottom":"adbutler_mobile_post_bottom_zone_id","topic-above-post-stream":"adbutler_mobile_topic_above_post_stream_zone_id","topic-above-suggested":"adbutler_mobile_topic_above_suggested_zone_id"}}}),_={houseAds:0,allAds:0}
function g(e,t,s,i,a){let l=[]
const n=e.get("house_creatives"),d=s.replace(/-/g,"_")
if(n&&n.settings){const e=n.settings[d],t=Object.keys(n.creatives).length>0&&!(0,o.isBlank)(e),s=!a&&!i,p="topic_list_between"===d&&(0,r.isNthTopicListItem)(parseInt(n.settings.after_nth_topic,10),i)
t&&(s||p||(0,r.isNthPost)(parseInt(n.settings.after_nth_post,10),a))&&l.push("house-ad")}return Object.keys(m).forEach((i=>{const n=m[i]
let p,u=null;(function(e,t){return!1===t||t&&!(0,o.isBlank)(e[t])})(t,n.enabledSetting)&&function(e,t,s){return!t||!s||(0,r.isNthPost)(parseInt(e[s],10),t)}(t,a,n.nthPost)&&(u=e.mobileView&&n.mobile||n.desktop,u&&(p=u[s]),void 0===p&&(p=`${n.settingPrefix}_${e.mobileView?"mobile_":""}${d}_code`),!1===p||!1===t[p]||(0,o.isBlank)(t[p])||l.push(i))})),l}e.default=(0,t.setComponentTemplate)(b,l.default.extend((p=(0,a.default)("placement","postNumber","indexNumber"),u=(0,a.default)("placement","availableAdTypes","router.currentRoute"),h(c={router:(0,i.inject)(),tagName:"",availableAdTypes(e,t,s){return g(this.site,this.siteSettings,e,s,t)},adComponents(e,t){if(!t.includes("house-ad")||1===t.length)return t
const s=this.site.get("house_creatives")
let i=!1
if(100===s.settings.house_ads_frequency)return["house-ad"]
if(s.settings.house_ads_frequency>0){if(0===_.allAds||100*_.houseAds/_.allAds<s.settings.house_ads_frequency)return _.houseAds+=1,_.allAds+=1,["house-ad"]
i=!0}const o=t.filter((e=>"house-ad"!==e))
return i&&(_.allAds+=o.length),o}},"availableAdTypes",[p],Object.getOwnPropertyDescriptor(c,"availableAdTypes"),c),h(c,"adComponents",[u],Object.getOwnPropertyDescriptor(c,"adComponents"),c),c)))})),define("discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad",["exports","@ember/component","@ember/runloop","rsvp","discourse/lib/load-script","discourse-common/config/environment","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n,d,p,u){"use strict"
var c,h,b
function m(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const _=(0,u.createTemplateFactory)({id:"Iu0U8n25",block:'[[[41,[30,0,["showAd"]],[[[1," "],[44,[[28,[37,2],null,[["divId","className"],[[28,[32,0],["divId"],null],[28,[32,0],["className"],null]]]]],[[[10,0],[15,1,[52,[30,1,["divId"]],[28,[30,1,["divId"]],null,null],[28,[32,1],[[30,0],"divId","[\\"The `divId` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.divId}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,0,[52,[30,1,["className"]],[28,[30,1,["className"]],null,null],[28,[32,1],[[30,0],"className","[\\"The `className` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.className}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[13]],[1]]],[1,"\\n"]],[]],null],[1,[28,[32,2],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers"],false,["if","let","hash"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad.hbs",scope:()=>[d.default,n.default,p.default],isStrictMode:!1})
let g=!1,f=null,v=0
e.default=(0,t.setComponentTemplate)(_,r.default.extend((c=(0,l.default)("publisherId","showAdbutlerAds","showToGroups","showAfterPost","showOnCurrentPage"),h=(0,l.default)("postNumber"),m(b={divs:null,publisherId:null,init(){let e=[728,90],t="adbutler_",s="adbutler-",i="adbutler-ad"
this.set("divs",[]),this.site.mobileView&&(e=[320,50],t+="mobile_",s+="mobile-",i="adbutler-mobile-ad"),t+=this.get("placement").replace(/-/g,"_")+"_zone_id",this.set("configKey",t),s+=this.get("placement"),this.set("className",s+" "+i)
let o=this.siteSettings[t]
this.set("zoneId",o)
let a="placement-"+o+"-"+v
this.set("divId",a)
let l=this.siteSettings.adbutler_publisher_id
this.set("publisherId",l),v++,this.divs.push({divId:a,publisherId:l,zoneId:o,dimensions:e}),this._super()},_triggerAds(){if((0,a.isTesting)())return
const e=this.siteSettings.adbutler_adserver_hostname;(function(e){return g?i.default.resolve():f||(f=(0,o.default)("https://"+e+"/app.js",{scriptTag:!0}).then((function(){g=!0})),f)})(e).then(function(){if(this.divs.length>0){let t=window.abkw||""
window.AdButler.ads.push({handler:function(e){window.AdButler.register(e.place.publisherId,e.place.zoneId,e.place.dimensions,e.place.divId,e)},opt:{place:this.divs.pop(),keywords:t,domain:e,click:"CLICK_MACRO_PLACEHOLDER"}})}}.bind(this))},didInsertElement(){this._super(),(0,s.scheduleOnce)("afterRender",this,this._triggerAds)},showAdbutlerAds(){return!this.currentUser||this.currentUser.show_adbutler_ads},showAd:(e,t,s,i,o)=>e&&t&&s&&i&&o,showAfterPost(e){return!e||this.isNthPost(parseInt(this.siteSettings.adbutler_nth_post,10))}},"showAdbutlerAds",[l.default],Object.getOwnPropertyDescriptor(b,"showAdbutlerAds"),b),m(b,"showAd",[c],Object.getOwnPropertyDescriptor(b,"showAd"),b),m(b,"showAfterPost",[h],Object.getOwnPropertyDescriptor(b,"showAfterPost"),b),b)))})),define("discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links",["exports","@ember/component","@ember/object/computed","@ember/template","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n,d){"use strict"
var p,u,c,h,b,m,_
function g(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const f=(0,d.createTemplateFactory)({id:"Ta+ntc/7",block:'[[[41,[30,0,["showAd"]],[[[41,[30,0,["site","mobileView"]],[[[1," "],[44,[[28,[37,2],null,[["adTitleStyleMobile"],[[28,[32,0],["adTitleStyleMobile"],null]]]]],[[[10,0],[14,0,"amazon-product-links-label"],[15,5,[52,[30,1,["adTitleStyleMobile"]],[28,[30,1,["adTitleStyleMobile"]],null,null],[28,[32,1],[[30,0],"adTitleStyleMobile","[\\"The `adTitleStyleMobile` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adTitleStyleMobile}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13]],[1]]],[1,"\\n "],[44,[[28,[37,2],null,[["adWrapperStyleMobile","userInputMobile"],[[28,[32,0],["adWrapperStyleMobile"],null],[28,[32,0],["userInputMobile"],null]]]]],[[[10,"iframe"],[15,5,[52,[30,2,["adWrapperStyleMobile"]],[28,[30,2,["adWrapperStyleMobile"]],null,null],[28,[32,1],[[30,0],"adWrapperStyleMobile","[\\"The `adWrapperStyleMobile` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adWrapperStyleMobile}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[14,"marginwidth","0"],[14,"marginheight","0"],[14,"scrolling","no"],[14,"frameborder","0"],[15,"src",[52,[30,2,["userInputMobile"]],[28,[30,2,["userInputMobile"]],null,null],[28,[32,1],[[30,0],"userInputMobile","[\\"The `userInputMobile` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.userInputMobile}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,"title",[28,[37,3],["adplugin.advertisement_label"],null]],[12],[1,"\\n "],[13]],[2]]],[1,"\\n"]],[]],[[[1," "],[10,0],[14,0,"amazon-product-links-label"],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13],[1,"\\n "],[10,0],[14,0,"container"],[14,"align","center"],[12],[1,"\\n "],[44,[[28,[37,2],null,[["adWrapperStyle","userInput"],[[28,[32,0],["adWrapperStyle"],null],[28,[32,0],["userInput"],null]]]]],[[[10,"iframe"],[15,5,[52,[30,3,["adWrapperStyle"]],[28,[30,3,["adWrapperStyle"]],null,null],[28,[32,1],[[30,0],"adWrapperStyle","[\\"The `adWrapperStyle` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adWrapperStyle}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[14,"marginwidth","0"],[14,"marginheight","0"],[14,"scrolling","no"],[14,"frameborder","0"],[15,"src",[52,[30,3,["userInput"]],[28,[30,3,["userInput"]],null,null],[28,[32,1],[[30,0],"userInput","[\\"The `userInput` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.userInput}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,"title",[28,[37,3],["adplugin.advertisement_label"],null]],[12],[1,"\\n "],[13]],[3]]],[1,"\\n "],[13],[1,"\\n"]],[]]]],[]],null],[1,[28,[32,2],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `site` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.site}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers","maybeHelpers","maybeHelpers"],false,["if","let","hash","i18n"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs",scope:()=>[r.default,l.default,n.default],isStrictMode:!1})
e.default=(0,t.setComponentTemplate)(f,a.default.extend((p=(0,o.default)("amazon_width","amazon_height"),u=(0,o.default)("mobile_amazon_width","mobile_amazon_height"),c=(0,o.default)("mobile_amazon_width"),h=(0,o.default)("user_input"),b=(0,o.default)("user_input_mobile"),m=(0,o.default)("postNumber"),g(_={classNames:["amazon-product-links"],showAd:(0,s.and)("showAmazonAds","showToGroups","showAfterPost","showOnCurrentPage"),init(){const e={"topic-list-top":{},"topic-above-post-stream":{},"topic-above-suggested":{},"post-bottom":{}},t=this.site.get("mobileView"),s=this.get("placement")
!t&&this.siteSettings.amazon_topic_list_top_src_code&&(e["topic-list-top"].user_input=this.siteSettings.amazon_topic_list_top_src_code,e["topic-list-top"].amazon_width=parseInt(this.siteSettings.amazon_topic_list_top_ad_width_code,10),e["topic-list-top"].amazon_height=parseInt(this.siteSettings.amazon_topic_list_top_ad_height_code,10)),t&&this.siteSettings.amazon_mobile_topic_list_top_src_code&&(e["topic-list-top"].user_input_mobile=this.siteSettings.amazon_mobile_topic_list_top_src_code,e["topic-list-top"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_topic_list_top_ad_width_code,10),e["topic-list-top"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_topic_list_top_ad_height_code,10)),!t&&this.siteSettings.amazon_topic_above_post_stream_src_code&&(e["topic-above-post-stream"].user_input=this.siteSettings.amazon_topic_above_post_stream_src_code,e["topic-above-post-stream"].amazon_width=parseInt(this.siteSettings.amazon_topic_above_post_stream_ad_width_code,10),e["topic-above-post-stream"].amazon_height=parseInt(this.siteSettings.amazon_topic_above_post_stream_ad_height_code,10)),t&&this.siteSettings.amazon_mobile_topic_above_post_stream_src_code&&(e["topic-above-post-stream"].user_input_mobile=this.siteSettings.amazon_mobile_topic_above_post_stream_src_code,e["topic-above-post-stream"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_topic_above_post_stream_ad_width_code,10),e["topic-above-post-stream"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_topic_above_post_stream_ad_height_code,10)),!t&&this.siteSettings.amazon_topic_above_suggested_src_code&&(e["topic-above-suggested"].user_input=this.siteSettings.amazon_topic_above_suggested_src_code,e["topic-above-suggested"].amazon_width=parseInt(this.siteSettings.amazon_topic_above_suggested_ad_width_code,10),e["topic-above-suggested"].amazon_height=parseInt(this.siteSettings.amazon_topic_above_suggested_ad_height_code,10)),t&&this.siteSettings.amazon_mobile_topic_above_suggested_src_code&&(e["topic-above-suggested"].user_input_mobile=this.siteSettings.amazon_mobile_topic_above_suggested_src_code,e["topic-above-suggested"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_topic_above_suggested_ad_width_code,10),e["topic-above-suggested"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_topic_above_suggested_ad_height_code,10)),!t&&this.siteSettings.amazon_post_bottom_src_code&&(e["post-bottom"].user_input=this.siteSettings.amazon_post_bottom_src_code,e["post-bottom"].amazon_width=parseInt(this.siteSettings.amazon_post_bottom_ad_width_code,10),e["post-bottom"].amazon_height=parseInt(this.siteSettings.amazon_post_bottom_ad_height_code,10)),t&&this.siteSettings.amazon_mobile_post_bottom_src_code&&(e["post-bottom"].user_input_mobile=this.siteSettings.amazon_mobile_post_bottom_src_code,e["post-bottom"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_post_bottom_ad_width_code,10),e["post-bottom"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_post_bottom_ad_height_code,10)),this.set("user_input",e[s].user_input),this.set("amazon_width",e[s].amazon_width),this.set("amazon_height",e[s].amazon_height),this.set("user_input_mobile",e[s].user_input_mobile),this.set("mobile_amazon_height",e[s].mobile_amazon_height),this.set("mobile_amazon_width",e[s].mobile_amazon_width),this._super()},adWrapperStyle:(e,t)=>(0,i.htmlSafe)(`width: ${e}px; height: ${t}px;`),adWrapperStyleMobile:(e,t)=>(0,i.htmlSafe)(`width: ${e}px; height: ${t}px;`),adTitleStyleMobile:e=>(0,i.htmlSafe)(`width: ${e}px;`),userInput:e=>(0,i.htmlSafe)(`${e}`),userInputMobile:e=>(0,i.htmlSafe)(`${e}`),showAmazonAds(){return!this.currentUser||this.currentUser.show_amazon_ads},showAfterPost(e){return!e||this.isNthPost(parseInt(this.siteSettings.amazon_nth_post_code,10))}},"adWrapperStyle",[p],Object.getOwnPropertyDescriptor(_,"adWrapperStyle"),_),g(_,"adWrapperStyleMobile",[u],Object.getOwnPropertyDescriptor(_,"adWrapperStyleMobile"),_),g(_,"adTitleStyleMobile",[c],Object.getOwnPropertyDescriptor(_,"adTitleStyleMobile"),_),g(_,"userInput",[h],Object.getOwnPropertyDescriptor(_,"userInput"),_),g(_,"userInputMobile",[b],Object.getOwnPropertyDescriptor(_,"userInputMobile"),_),g(_,"showAmazonAds",[o.default],Object.getOwnPropertyDescriptor(_,"showAmazonAds"),_),g(_,"showAfterPost",[m],Object.getOwnPropertyDescriptor(_,"showAfterPost"),_),_)))})),define("discourse/plugins/discourse-adplugin/discourse/components/carbonads-ad",["exports","@ember/component","@ember/template","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n){"use strict"
var d,p,u
function c(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const h=(0,n.createTemplateFactory)({id:"+Uo79OGY",block:'[[[41,[30,0,["showAd"]],[[[1," "],[44,[[28,[37,2],null,[["url"],[[28,[32,0],["url"],null]]]]],[[[10,"script"],[15,"src",[52,[30,1,["url"]],[28,[30,1,["url"]],null,null],[28,[32,1],[[30,0],"url","[\\"The `url` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/carbonads-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.url}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[14,1,"_carbonads_js"],[14,"async",""],[14,4,"text/javascript"],[12],[1,"\\n "],[13]],[1]]],[1,"\\n"]],[]],null],[1,[28,[32,2],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/carbonads-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers"],false,["if","let","hash"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/carbonads-ad.hbs",scope:()=>[l.default,a.default,r.default],isStrictMode:!1})
e.default=(0,t.setComponentTemplate)(h,o.default.extend((d=(0,i.default)("serve_id","placement"),p=(0,i.default)("placement","serve_id","showCarbonAds","showToGroups","showOnCurrentPage"),c(u={serve_id:null,placement:null,init(){this.set("serve_id",this.siteSettings.carbonads_serve_id),this.set("placement",this.siteSettings.carbonads_placement),this._super()},url:(e,t)=>(0,s.htmlSafe)(`//cdn.carbonads.com/carbon.js?serve=${e}&placement=${t}`),showCarbonAds(){return!this.currentUser||this.currentUser.show_carbon_ads},showAd:(e,t,s,i,o)=>e&&t&&s&&i&&o},"url",[d],Object.getOwnPropertyDescriptor(u,"url"),u),c(u,"showCarbonAds",[i.default],Object.getOwnPropertyDescriptor(u,"showCarbonAds"),u),c(u,"showAd",[p],Object.getOwnPropertyDescriptor(u,"showAd"),u),u)))})),define("discourse/plugins/discourse-adplugin/discourse/components/google-adsense",["exports","@ember/component","@ember/runloop","@ember/template","rsvp","discourse/lib/load-script","discourse-common/config/environment","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n,d,p,u,c){"use strict"
var h,b,m,_,g,f,v,y,w
function k(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const z=(0,c.createTemplateFactory)({id:"5dCIkGFf",block:'[[[41,[30,0,["showAd"]],[[[1," "],[10,0],[14,0,"google-adsense-label"],[12],[10,"h2"],[12],[1,[28,[35,1],["adplugin.advertisement_label"],null]],[13],[13],[1,"\\n "],[44,[[28,[37,3],null,[["adWrapperStyle"],[[28,[32,0],["adWrapperStyle"],null]]]]],[[[10,0],[14,0,"google-adsense-content"],[15,1,[52,[30,0,["isResponsive"]],"google-adsense__responsive"]],[15,5,[52,[30,1,["adWrapperStyle"]],[28,[30,1,["adWrapperStyle"]],null,null],[28,[32,1],[[30,0],"adWrapperStyle","[\\"The `adWrapperStyle` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adWrapperStyle}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[1,"\\n "],[44,[[28,[37,3],null,[["adInsStyle","publisher_id","ad_code","autoAdFormat"],[[28,[32,0],["adInsStyle"],null],[28,[32,0],["publisher_id"],null],[28,[32,0],["ad_code"],null],[28,[32,0],["autoAdFormat"],null]]]]],[[[10,"ins"],[14,0,"adsbygoogle"],[15,5,[52,[30,2,["adInsStyle"]],[28,[30,2,["adInsStyle"]],null,null],[28,[32,1],[[30,0],"adInsStyle","[\\"The `adInsStyle` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adInsStyle}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,"data-ad-client",[29,["ca-pub-",[52,[30,2,["publisher_id"]],[28,[30,2,["publisher_id"]],null,null],[28,[32,1],[[30,0],"publisher_id","[\\"The `publisher_id` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.publisher_id}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]]]],[15,"data-ad-slot",[52,[30,2,["ad_code"]],[28,[30,2,["ad_code"]],null,null],[28,[32,1],[[30,0],"ad_code","[\\"The `ad_code` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.ad_code}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,"data-ad-format",[52,[30,2,["autoAdFormat"]],[28,[30,2,["autoAdFormat"]],null,null],[28,[32,1],[[30,0],"autoAdFormat","[\\"The `autoAdFormat` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.autoAdFormat}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[1,"\\n "],[13]],[2]]],[1,"\\n "],[13]],[1]]],[1,"\\n"]],[]],null],[1,[28,[32,2],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `isResponsive` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.isResponsive}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers","maybeHelpers0"],false,["if","i18n","let","hash"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs",scope:()=>[p.default,d.default,u.default],isStrictMode:!1})
let S=!1,T=null,A={}
const O={"topic-list-top":{code:"adsense_topic_list_top_code",sizes:"adsense_topic_list_top_ad_sizes"},"topic-above-post-stream":{code:"adsense_topic_above_post_stream_code",sizes:"adsense_topic_above_post_stream_ad_sizes"},"topic-above-suggested":{code:"adsense_topic_above_suggested_code",sizes:"adsense_topic_above_suggested_ad_sizes"},"post-bottom":{code:"adsense_post_bottom_code",sizes:"adsense_post_bottom_ad_sizes"}},j={"topic-list-top":{code:"adsense_mobile_topic_list_top_code",sizes:"adsense_mobile_topic_list_top_ad_size"},"topic-above-post-stream":{code:"adsense_mobile_topic_above_post_stream_code",sizes:"adsense_mobile_topic_above_post_stream_ad_size"},"topic-above-suggested":{code:"adsense_mobile_topic_above_suggested_code",sizes:"adsense_mobile_topic_above_suggested_ad_size"},"post-bottom":{code:"adsense_mobile_post_bottom_code",sizes:"adsense_mobile_post_bottom_ad_size"}}
e.default=(0,t.setComponentTemplate)(z,n.default.extend((h=(0,r.default)("ad_width"),b=(0,r.default)("ad_width"),m=(0,r.default)("placement","showAd"),_=(0,r.default)("isResponsive","isFluid"),g=(0,r.default)("ad_width","ad_height","isResponsive"),f=(0,r.default)("adWrapperStyle","isResponsive"),v=(0,r.default)("publisher_id","showAdsenseAds","showToGroups","showAfterPost","showOnCurrentPage"),y=(0,r.default)("postNumber"),k(w={classNameBindings:[":google-adsense","classForSlot","isResponsive:adsense-responsive"],loadedGoogletag:!1,publisher_id:null,ad_width:null,ad_height:null,adRequested:!1,init(){let e,t
const s=this.get("placement")
e=this.site.mobileView?j[s]:O[s],A[s]||(A[s]=0)
const i=(this.siteSettings[e.sizes]||"").split("|")
1===i.length?t=i[0]:(t=i[A[s]%i.length],A[s]+=1),this.set("ad_width",function(e){if("responsive"===e)return"auto"
if(e.startsWith("fluid"))return"fluid"
const t=parseInt(e.substring(0,3).trim(),10)
return isNaN(t)?"auto":`${t}px`}(t)),this.set("ad_height",function(e){if("responsive"===e)return"auto"
if(e.startsWith("fluid"))return"fluid"
const t=parseInt(e.substring(4,7).trim(),10)
return isNaN(t)?"auto":`${t}px`}(t)),this.set("ad_code",this.siteSettings[e.code]),this.set("publisher_id",this.siteSettings.adsense_publisher_code),this._super()},async _triggerAds(){if(!(0,l.isTesting)()&&(this.set("adRequested",!0),await function(){if(S)return o.default.resolve()
if(T)return T
const e=("https:"===document.location.protocol?"https:":"http:")+"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"
return T=(0,a.default)(e,{scriptTag:!0}).then((function(){S=!0})),T}(),!this.isDestroyed&&!this.isDestroying))try{(window.adsbygoogle||=[]).push({})}catch(e){console.error("Adsense error:",e)}},didInsertElement(){this._super(),this.get("showAd")&&(0,s.scheduleOnce)("afterRender",this,this._triggerAds)},isResponsive:e=>["auto","fluid"].includes(e),isFluid:e=>"fluid"===e,classForSlot:(e,t)=>t?(0,i.htmlSafe)(`adsense-${e}`):"",autoAdFormat:(e,t)=>!!e&&(0,i.htmlSafe)(t?"fluid":"auto"),adWrapperStyle:(e,t,s)=>(0,i.htmlSafe)(s?"":`width: ${e}; height: ${t};`),adInsStyle:(e,t)=>(0,i.htmlSafe)(`display: ${t?"block":"inline-block"}; ${e}`),showAdsenseAds(){return!this.currentUser||this.currentUser.show_adsense_ads},showAd:(e,t,s,i,o)=>e&&t&&s&&i&&o,showAfterPost(e){return!e||this.isNthPost(parseInt(this.siteSettings.adsense_nth_post_code,10))}},"isResponsive",[h],Object.getOwnPropertyDescriptor(w,"isResponsive"),w),k(w,"isFluid",[b],Object.getOwnPropertyDescriptor(w,"isFluid"),w),k(w,"classForSlot",[m],Object.getOwnPropertyDescriptor(w,"classForSlot"),w),k(w,"autoAdFormat",[_],Object.getOwnPropertyDescriptor(w,"autoAdFormat"),w),k(w,"adWrapperStyle",[g],Object.getOwnPropertyDescriptor(w,"adWrapperStyle"),w),k(w,"adInsStyle",[f],Object.getOwnPropertyDescriptor(w,"adInsStyle"),w),k(w,"showAdsenseAds",[r.default],Object.getOwnPropertyDescriptor(w,"showAdsenseAds"),w),k(w,"showAd",[v],Object.getOwnPropertyDescriptor(w,"showAd"),w),k(w,"showAfterPost",[y],Object.getOwnPropertyDescriptor(w,"showAfterPost"),w),w)))})),define("discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad",["exports","@ember/component","@ember/object/computed","@ember/template","rsvp","discourse/lib/load-script","discourse-common/config/environment","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l,r,n,d,p,u,c){"use strict"
var h,b,m,_,g,f,v,y,w,k,z
function S(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const T=(0,c.createTemplateFactory)({id:"OG/8nj/j",block:'[[[41,[30,0,["showAd"]],[[[41,[30,0,["site","mobileView"]],[[[1," "],[44,[[28,[37,2],null,[["adTitleStyleMobile"],[[28,[32,0],["adTitleStyleMobile"],null]]]]],[[[10,0],[14,0,"google-dfp-ad-label"],[15,5,[52,[30,1,["adTitleStyleMobile"]],[28,[30,1,["adTitleStyleMobile"]],null,null],[28,[32,1],[[30,0],"adTitleStyleMobile","[\\"The `adTitleStyleMobile` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adTitleStyleMobile}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13]],[1]]],[1,"\\n "],[44,[[28,[37,2],null,[["divId","adWrapperStyle"],[[28,[32,0],["divId"],null],[28,[32,0],["adWrapperStyle"],null]]]]],[[[10,0],[15,1,[52,[30,2,["divId"]],[28,[30,2,["divId"]],null,null],[28,[32,1],[[30,0],"divId","[\\"The `divId` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.divId}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,5,[52,[30,2,["adWrapperStyle"]],[28,[30,2,["adWrapperStyle"]],null,null],[28,[32,1],[[30,0],"adWrapperStyle","[\\"The `adWrapperStyle` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adWrapperStyle}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[14,0,"dfp-ad-unit"],[14,"align","center"],[12],[13]],[2]]],[1,"\\n"]],[]],[[[1," "],[10,0],[14,0,"google-dfp-ad-label"],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13],[1,"\\n "],[44,[[28,[37,2],null,[["divId","adWrapperStyle"],[[28,[32,0],["divId"],null],[28,[32,0],["adWrapperStyle"],null]]]]],[[[10,0],[15,1,[52,[30,3,["divId"]],[28,[30,3,["divId"]],null,null],[28,[32,1],[[30,0],"divId","[\\"The `divId` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.divId}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[15,5,[52,[30,3,["adWrapperStyle"]],[28,[30,3,["adWrapperStyle"]],null,null],[28,[32,1],[[30,0],"adWrapperStyle","[\\"The `adWrapperStyle` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adWrapperStyle}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[14,0,"dfp-ad-unit"],[14,"align","center"],[12],[13]],[3]]],[1,"\\n"]],[]]]],[]],null],[1,[28,[32,2],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `site` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.site}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers","maybeHelpers","maybeHelpers"],false,["if","let","hash","i18n"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs",scope:()=>[p.default,d.default,u.default],isStrictMode:!1})
let A=!1,O=null,j={},P=1,I={}
function x(e){return e.substring(4,7).trim()}function N(e){let t=e.replace(/ /g,"")
return t=t.replace(/['"]+/g,""),t=t.split(","),t}function M(e){let t=e
return t=t.replace(/['"]+/g,""),t=t.split("\n"),t}const D={"topic-list-top":{code:"dfp_topic_list_top_code",sizes:"dfp_topic_list_top_ad_sizes",targeting_keys:"dfp_target_topic_list_top_key_code",targeting_values:"dfp_target_topic_list_top_value_code"},"topic-above-post-stream":{code:"dfp_topic_above_post_stream_code",sizes:"dfp_topic_above_post_stream_ad_sizes",targeting_keys:"dfp_target_topic_above_post_stream_key_code",targeting_values:"dfp_target_topic_above_post_stream_value_code"},"topic-above-suggested":{code:"dfp_topic_above_suggested_code",sizes:"dfp_topic_above_suggested_ad_sizes",targeting_keys:"dfp_target_topic_above_suggested_key_code",targeting_values:"dfp_target_topic_above_suggested_value_code"},"post-bottom":{code:"dfp_post_bottom_code",sizes:"dfp_post_bottom_ad_sizes",targeting_keys:"dfp_target_post_bottom_key_code",targeting_values:"dfp_target_post_bottom_value_code"}},W={"topic-list-top":{code:"dfp_mobile_topic_list_top_code",sizes:"dfp_mobile_topic_list_top_ad_sizes",targeting_keys:"dfp_target_topic_list_top_key_code",targeting_values:"dfp_target_topic_list_top_value_code"},"topic-above-post-stream":{code:"dfp_mobile_topic_above_post_stream_code",sizes:"dfp_mobile_topic_above_post_stream_ad_sizes",targeting_keys:"dfp_target_topic_above_post_stream_key_code",targeting_values:"dfp_target_topic_above_post_stream_value_code"},"topic-above-suggested":{code:"dfp_mobile_topic_above_suggested_code",sizes:"dfp_mobile_topic_above_suggested_ad_sizes",targeting_keys:"dfp_target_topic_above_suggested_key_code",targeting_values:"dfp_target_topic_above_suggested_value_code"},"post-bottom":{code:"dfp_mobile_post_bottom_code",sizes:"dfp_mobile_post_bottom_ad_sizes",targeting_keys:"dfp_target_post_bottom_key_code",targeting_values:"dfp_target_post_bottom_value_code"}}
function C(e,t,s,i,o,a,l){if(!s.dfp_publisher_id)return
if(j[e])return j[e]
let r,n,d
return i?(d=s.dfp_publisher_id_mobile||s.dfp_publisher_id,n=W[t]):(d=s.dfp_publisher_id,n=D[t]),r=window.googletag.defineSlot("/"+d+"/"+s[n.code],[o,a],e),function(e,t,s){for(let i=0;i<e.length;i++)e[i]&&s.setTargeting(e[i],N(t[i]))}(M(s[n.targeting_keys]),M(s[n.targeting_values]),r),l&&r.setTargeting("discourse-category",l),r.addService(window.googletag.pubads()),j[e]={ad:r,width:o,height:a},j[e]}e.default=(0,t.setComponentTemplate)(T,n.default.extend((h=(0,r.default)("siteSettings.dfp_publisher_id","siteSettings.dfp_publisher_id_mobile","site.mobileView"),b=(0,r.default)("placement","postNumber"),m=(0,r.default)("placement","showAd"),_=(0,r.default)("width","height"),g=(0,r.default)("width"),f=(0,r.default)("publisherId","showDfpAds","showToGroups","showAfterPost","showOnCurrentPage","size"),v=(0,r.default)("postNumber"),y=(0,r.on)("didUpdate"),w=(0,r.on)("didInsertElement"),k=(0,r.on)("willDestroyElement"),z={classNameBindings:["adUnitClass"],classNames:["google-dfp-ad"],loadedGoogletag:!1,lastAdRefresh:null,width:(0,s.alias)("size.width"),height:(0,s.alias)("size.height"),size(){return function(e,t,s){let i,o
i=s?W[e]:D[e],I[e]||(I[e]=0)
const a=(t[i.sizes]||"").split("|")
if(1===a.length?o=a[0]:(o=a[I[e]%a.length],I[e]+=1),"fluid"===o)return{width:"fluid",height:"fluid"}
const l={width:parseInt((r=o,r.substring(0,3).trim()),10),height:parseInt(x(o),10)}
var r
return isNaN(l.width)||isNaN(l.height)?void 0:l}(this.get("placement"),this.siteSettings,this.site.mobileView)},publisherId:(e,t,s)=>s&&t||e,divId(e,t){let s=P++
return t?`div-gpt-ad-${s}-${e}-${t}`:`div-gpt-ad-${s}-${e}`},adUnitClass:(e,t)=>t?`dfp-ad-${e}`:"",adWrapperStyle(e,t){if("fluid"!==e)return(0,i.htmlSafe)(`width: ${e}px; height: ${t}px;`)},adTitleStyleMobile(e){if("fluid"!==e)return(0,i.htmlSafe)(`width: ${e}px;`)},showAd:(e,t,s,i,o,a)=>e&&t&&s&&i&&o&&a,showDfpAds(){return!this.currentUser||this.currentUser.show_dfp_ads},showAfterPost(e){return!e||this.isNthPost(parseInt(this.siteSettings.dfp_nth_post_code,10))},shouldRefreshAd(){const e=this.get("lastAdRefresh")
return!e||new Date-e>3e3},updated(){if(!this.shouldRefreshAd())return
let e=j[this.get("divId")]
if(!e||!e.ad)return
let t=e.ad,s=this.get("currentCategorySlug")
this.get("loadedGoogletag")&&(this.set("lastAdRefresh",new Date),window.googletag.cmd.push((()=>{t.setTargeting("discourse-category",s||"0"),window.googletag.pubads().refresh([t])})))},_initGoogleDFP(){(0,l.isTesting)()||this.get("showAd")&&function(){if(A)return o.default.resolve()
if(O)return O
let e=("https:"===document.location.protocol?"https:":"http:")+"//securepubads.g.doubleclick.net/tag/js/gpt.js"
return O=(0,a.default)(e,{scriptTag:!0}).then((function(){A=!0,void 0===window.googletag&&console.log("googletag is undefined!"),window.googletag.cmd.push((function(){window.googletag.pubads().enableSingleRequest(),window.googletag.pubads().disableInitialLoad(),window.googletag.pubads().setForceSafeFrame(!0),window.googletag.enableServices()}))})),window.googletag=window.googletag||{cmd:[]},O}().then((()=>{this.set("loadedGoogletag",!0),this.set("lastAdRefresh",new Date),window.googletag.cmd.push((()=>{let e=C(this.get("divId"),this.get("placement"),this.siteSettings,this.site.mobileView,this.get("width"),this.get("height"),this.get("currentCategorySlug")||"0")
e&&e.ad&&(window.googletag.display(this.get("divId")),window.googletag.pubads().refresh([e.ad]))}))}))},willRender(){this._super(...arguments),this.get("showAd")},cleanup(){var e
e=this.get("divId"),j[e]&&window.googletag&&(window.googletag.destroySlots([j[e].ad]),delete j[e])}},S(z,"size",[r.default],Object.getOwnPropertyDescriptor(z,"size"),z),S(z,"publisherId",[h],Object.getOwnPropertyDescriptor(z,"publisherId"),z),S(z,"divId",[b],Object.getOwnPropertyDescriptor(z,"divId"),z),S(z,"adUnitClass",[m],Object.getOwnPropertyDescriptor(z,"adUnitClass"),z),S(z,"adWrapperStyle",[_],Object.getOwnPropertyDescriptor(z,"adWrapperStyle"),z),S(z,"adTitleStyleMobile",[g],Object.getOwnPropertyDescriptor(z,"adTitleStyleMobile"),z),S(z,"showAd",[f],Object.getOwnPropertyDescriptor(z,"showAd"),z),S(z,"showDfpAds",[r.default],Object.getOwnPropertyDescriptor(z,"showDfpAds"),z),S(z,"showAfterPost",[v],Object.getOwnPropertyDescriptor(z,"showAfterPost"),z),S(z,"updated",[y],Object.getOwnPropertyDescriptor(z,"updated"),z),S(z,"_initGoogleDFP",[w],Object.getOwnPropertyDescriptor(z,"_initGoogleDFP"),z),S(z,"cleanup",[k],Object.getOwnPropertyDescriptor(z,"cleanup"),z),z)))})),define("discourse/plugins/discourse-adplugin/discourse/components/house-ad",["exports","@ember/component","@ember/utils","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,o,a,l){"use strict"
var r,n,d,p,u
function c(e,t,s,i,o){var a={}
return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),a),o&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const h=(0,l.createTemplateFactory)({id:"r15k8uuj",block:'[[[41,[30,0,["showAd"]],[[[1," "],[1,[28,[35,1],[[30,0,["adHtml"]]],null]],[1,"\\n"]],[]],null],[1,[28,[32,0],["[[\\"The `showAd` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.showAd}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adHtml` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ad.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adHtml}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],[],false,["if","html-safe"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/house-ad.hbs",scope:()=>[a.default],isStrictMode:!1}),b={topic_list_top:null,topic_above_post_stream:null,topic_above_suggested:null,post_bottom:null,topic_list_between:null}
e.default=(0,t.setComponentTemplate)(h,o.default.extend((r=(0,i.default)("placement","showAd"),n=(0,i.default)("showToGroups","showAfterPost","showAfterTopicListItem","showOnCurrentPage"),d=(0,i.default)("postNumber","placement"),p=(0,i.default)("placement"),u={classNames:["house-creative"],classNameBindings:["adUnitClass"],attributeBindings:["colspanAttribute:colspan"],adHtml:"",colspanAttribute(){return"td"===this.tagName?"5":null},adUnitClass:(e,t)=>t?`house-${e}`:"",showAd:(e,t,s,i)=>e&&(t||s)&&i,showAfterPost(e,t){return!e&&"topic-list-between"!==t||this.isNthPost(parseInt(this.site.get("house_creatives.settings.after_nth_post"),10))},showAfterTopicListItem(e){return"topic-list-between"!==e||this.isNthTopicListItem(parseInt(this.site.get("house_creatives.settings.after_nth_topic"),10))},chooseAdHtml(){const e=this.site.get("house_creatives"),t=this.get("placement").replace(/-/g,"_"),s=this.adsNamesForSlot(t)
if(!(s.length>0))return""
{b[t]||(b[t]=0)
let i=e.creatives[s[b[t]]]||""
if(b[t]=(b[t]+1)%s.length,!i.category_ids?.length||i.category_ids.includes(this.currentCategoryId))return i.html}},adsNamesForSlot(e){const t=this.site.get("house_creatives")
if(!t||!t.settings)return[]
const i=t.settings[e]
return Object.keys(t.creatives).length>0&&!(0,s.isBlank)(i)?i.split("|"):[]},refreshAd(){this.set("adHtml",this.chooseAdHtml())},didInsertElement(){this._super(...arguments),this.get("showAd")&&(null===b.topic_list_top&&Object.keys(b).forEach((e=>{const t=this.adsNamesForSlot(e)
b[e]=Math.floor(Math.random()*t.length)})),this.refreshAd())}},c(u,"colspanAttribute",[i.default],Object.getOwnPropertyDescriptor(u,"colspanAttribute"),u),c(u,"adUnitClass",[r],Object.getOwnPropertyDescriptor(u,"adUnitClass"),u),c(u,"showAd",[n],Object.getOwnPropertyDescriptor(u,"showAd"),u),c(u,"showAfterPost",[d],Object.getOwnPropertyDescriptor(u,"showAfterPost"),u),c(u,"showAfterTopicListItem",[p],Object.getOwnPropertyDescriptor(u,"showAfterTopicListItem"),u),u)))})),define("discourse/plugins/discourse-adplugin/discourse/components/post-bottom-ad",["exports","@ember/component","@ember/component/template-only","@ember/template-factory"],(function(e,t,s,i){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
const o=(0,i.createTemplateFactory)({id:"EFDIMueB",block:'[[[1,[28,[35,0],null,[["placement","category","postNumber"],["post-bottom",[30,1,["topic","category","slug"]],[30,1,["post_number"]]]]]]],["@model"],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/post-bottom-ad.hbs",isStrictMode:!1})
e.default=(0,t.setComponentTemplate)(o,(0,s.default)())})),define("discourse/plugins/discourse-adplugin/discourse/connectors/after-topic-list-item/discourse-adplugin",["exports","discourse/plugins/discourse-adplugin/discourse/components/ad-slot"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default={shouldRender:(e,s)=>e.index&&(0,t.slotContenders)(s.site,s.siteSettings,"topic-list-between",e.index).length>0}})),define("discourse/plugins/discourse-adplugin/discourse/helpers/slot-position",["exports"],(function(e){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.isNthPost=function(e,t){return!!(e&&e>0)&&t%e==0},e.isNthTopicListItem=function(e,t){return!!(e&&e>0&&t>0)&&(t+1)%e==0}})),define("discourse/plugins/discourse-adplugin/discourse/initializers/initialize-ad-plugin",["exports","discourse/lib/plugin-api","discourse/models/site","discourse/widgets/render-glimmer","@ember/template-factory"],(function(e,t,s,i,o){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default={name:"initialize-ad-plugin",initialize(e){(0,i.registerWidgetShim)("after-post-ad","div.widget-connector",(0,o.createTemplateFactory)({id:"adpJSmtH",block:'[[[8,[39,0],null,[["@model"],[[30,1]]],null]],["@data"],false,["post-bottom-ad"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-adplugin/discourse/initializers/initialize-ad-plugin.js",isStrictMode:!1})),(0,t.withPluginApi)("0.1",(e=>{e.decorateWidget("post:after",(e=>e.attach("after-post-ad",e.widget.model)))}))
const a=e.lookup("service:message-bus"),l=e.lookup("service:current-user")?"/site/house-creatives/logged-in":"/site/house-creatives/anonymous"
a.subscribe(l,(function(e){s.default.currentProp("house_creatives",e)}))}}})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/after-topic-list-item/discourse-adplugin",["exports","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=(0,s.createTemplateFactory)({id:"ku28n4FV",block:'[[[1,[28,[35,0],null,[["placement","category","indexNumber","childTagName"],["topic-list-between",[30,0,["category","slug"]],[30,0,["index"]],"td"]]]],[1,[28,[32,0],["[[\\"The `category` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/connectors/after-topic-list-item/discourse-adplugin.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.category}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `index` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/connectors/after-topic-list-item/discourse-adplugin.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.index}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/after-topic-list-item/discourse-adplugin.hbs",scope:()=>[t.default],isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin",["exports","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=(0,s.createTemplateFactory)({id:"gIz8Oh1y",block:'[[[1,[28,[35,0],null,[["placement","category"],["topic-list-top",[30,0,["category","slug"]]]]]],[1,[28,[32,0],["[[\\"The `category` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.category}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs",scope:()=>[t.default],isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin",["exports","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=(0,s.createTemplateFactory)({id:"RH6fRoTc",block:'[[[1,[28,[35,0],null,[["placement","category"],["topic-above-post-stream",[30,0,["model","category","slug"]]]]]],[1,[28,[32,0],["[[\\"The `model` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.model}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin.hbs",scope:()=>[t.default],isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-suggested/discourse-adplugin",["exports","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
e.default=(0,s.createTemplateFactory)({id:"K9wxjVFU",block:'[[[1,[28,[35,0],null,[["placement","category"],["topic-above-suggested",[30,0,["model","category","slug"]]]]]],[1,[28,[32,0],["[[\\"The `model` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-suggested/discourse-adplugin.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.model}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-suggested/discourse-adplugin.hbs",scope:()=>[t.default],isStrictMode:!1})}))
//# sourceMappingURL=discourse-adplugin-40d0709dfed3ed87494b8d67dbc6a3ac37932bf423bb8478b8399dec32899d0f.map
//!
;