@brightspot/ui 5.3.2 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/components/banner/Banner.css +32 -0
  2. package/dist/components/banner/Banner.d.ts +56 -0
  3. package/dist/components/banner/Banner.d.ts.map +1 -0
  4. package/dist/components/banner/Banner.js +94 -0
  5. package/dist/components/banner/Banner.js.map +1 -0
  6. package/dist/components/banner/Message.css +4 -0
  7. package/dist/components/banner/Message.d.ts +103 -0
  8. package/dist/components/banner/Message.d.ts.map +1 -0
  9. package/dist/components/banner/Message.js +235 -0
  10. package/dist/components/banner/Message.js.map +1 -0
  11. package/dist/custom-elements.json +319 -0
  12. package/dist/storybook/assets/{ActionBar.stories-1Iqfy4PV.js → ActionBar.stories-BJcrfF0X.js} +1 -1
  13. package/dist/storybook/assets/{ActionItem.stories-DjKyE7m_.js → ActionItem.stories-xLR-VN2Q.js} +1 -1
  14. package/dist/storybook/assets/{Avatar.stories-Dy36fKQN.js → Avatar.stories-Cj5Q2yEp.js} +1 -1
  15. package/dist/storybook/assets/{AvatarGroup.stories-Bh8TY9-P.js → AvatarGroup.stories-DLWAQHFa.js} +1 -1
  16. package/dist/storybook/assets/{Badge.stories-Bn0aBHka.js → Badge.stories-DGSKAf9D.js} +1 -1
  17. package/dist/storybook/assets/Banner.stories-BZ3LLa4I.js +203 -0
  18. package/dist/storybook/assets/{Button-D8Sr8A-v.js → Button-ffu9dnxC.js} +1 -1
  19. package/dist/storybook/assets/{Button.stories-CtRBI4gv.js → Button.stories-DB-uDcVu.js} +1 -1
  20. package/dist/storybook/assets/{ButtonGroup.stories-CVjQWgMD.js → ButtonGroup.stories-eGya8Uts.js} +1 -1
  21. package/dist/storybook/assets/{Card.stories-DXTqqbXb.js → Card.stories-B_hhKmQB.js} +1 -1
  22. package/dist/storybook/assets/{Celebrate.stories-DwQeQ1VN.js → Celebrate.stories-DqKwiwly.js} +1 -1
  23. package/dist/storybook/assets/{Checkbox.stories-D4AyVy-V.js → Checkbox.stories-Bly8OVzf.js} +1 -1
  24. package/dist/storybook/assets/{CircularProgress.stories-D6dHpD70.js → CircularProgress.stories-BZUNNkMK.js} +1 -1
  25. package/dist/storybook/assets/{ClipboardMixin.stories-CvYj7bwY.js → ClipboardMixin.stories-D2XMhwIg.js} +1 -1
  26. package/dist/storybook/assets/{Color-6BZIO3FS-o6fp9dCO.js → Color-6BZIO3FS-BPcC43iH.js} +1 -1
  27. package/dist/storybook/assets/{Colors.stories-Bg-Xuo05.js → Colors.stories-DveV04we.js} +1 -1
  28. package/dist/storybook/assets/{CombinedEffects.stories-C4SNTP9M.js → CombinedEffects.stories-Dl_MhHhl.js} +1 -1
  29. package/dist/storybook/assets/{ComponentStatesMixin-Dj1V-e8c.js → ComponentStatesMixin-CmZnizKN.js} +1 -1
  30. package/dist/storybook/assets/{ComponentStatesMixin.stories-CUoagWLT.js → ComponentStatesMixin.stories-BrAFoGDu.js} +1 -1
  31. package/dist/storybook/assets/{CopyToClipboard.stories-ynkFni9d.js → CopyToClipboard.stories-CiKbtpBJ.js} +1 -1
  32. package/dist/storybook/assets/{Debounce.stories-xAZ6AOUR.js → Debounce.stories-BQ7W_yTX.js} +1 -1
  33. package/dist/storybook/assets/{DocsRenderer-LL677BLK-DeoiTMLA.js → DocsRenderer-LL677BLK-DiDzi0rZ.js} +3 -3
  34. package/dist/storybook/assets/{Dropdown.stories-BQzwsyHE.js → Dropdown.stories-LYd0-ypG.js} +1 -1
  35. package/dist/storybook/assets/{EmptyState.stories-CrckJlBX.js → EmptyState.stories-DjKyE0h3.js} +1 -1
  36. package/dist/storybook/assets/{EscaAvatar.stories-BikckAep.js → EscaAvatar.stories-D3v91UKv.js} +1 -1
  37. package/dist/storybook/assets/{Events.stories-DC0XMBhF.js → Events.stories-CTe5eZa6.js} +1 -1
  38. package/dist/storybook/assets/{Heading.stories-7YtY0gNK.js → Heading.stories-DKt-wgRB.js} +1 -1
  39. package/dist/storybook/assets/{HueRipple.stories-hRstwRnF.js → HueRipple.stories-B3SVSdL8.js} +1 -1
  40. package/dist/storybook/assets/{Icon.stories-4-2N4UlX.js → Icon.stories-B5tDsd--.js} +1 -1
  41. package/dist/storybook/assets/{IconButton.stories-ClpNoAT9.js → IconButton.stories-DOV4zFAP.js} +1 -1
  42. package/dist/storybook/assets/{LinearProgress.stories-BlH24bsJ.js → LinearProgress.stories-ai3UD-xw.js} +1 -1
  43. package/dist/storybook/assets/Message.stories-CzqIe49h.js +432 -0
  44. package/dist/storybook/assets/{OnFindMixin.stories-CKoPIaks.js → OnFindMixin.stories-CUaE6pX1.js} +1 -1
  45. package/dist/storybook/assets/{Pagination.stories-CER9zwKW.js → Pagination.stories-CXCbChNW.js} +1 -1
  46. package/dist/storybook/assets/{Popover.stories-CO7t4Pl8.js → Popover.stories-DyptvVL3.js} +1 -1
  47. package/dist/storybook/assets/{ReadyMixin-C_H-s0cp.js → ReadyMixin-BUpBkgED.js} +1 -1
  48. package/dist/storybook/assets/{RovingTabindexMixin.stories-0Sny7BQc.js → RovingTabindexMixin.stories-DzEH38Tn.js} +1 -1
  49. package/dist/storybook/assets/{Rtc.stories-Ci7CnFM6.js → Rtc.stories-DxQWkudF.js} +1 -1
  50. package/dist/storybook/assets/{ScrollShadow.stories-CSbM9xdE.js → ScrollShadow.stories-DbMdNLKA.js} +1 -1
  51. package/dist/storybook/assets/{Switch.stories-D-SGY0dL.js → Switch.stories-CvSwuR0Z.js} +1 -1
  52. package/dist/storybook/assets/{Tab.stories-DXeloL5R.js → Tab.stories-CI6m8NXD.js} +1 -1
  53. package/dist/storybook/assets/{Tabs.stories-KGjrQHnj.js → Tabs.stories-BMat3ubI.js} +1 -1
  54. package/dist/storybook/assets/{Throttle.stories-SjszmCVX.js → Throttle.stories-PEUZoXfI.js} +1 -1
  55. package/dist/storybook/assets/{Tooltip.stories-DZty4zmq.js → Tooltip.stories-kDJ5PbGO.js} +1 -1
  56. package/dist/storybook/assets/{Upload.stories-CoM7bgt1.js → Upload.stories-Bb5KBlh7.js} +1 -1
  57. package/dist/storybook/assets/{UploadItem.stories-CRrp-ZTV.js → UploadItem.stories-VZVWc52f.js} +1 -1
  58. package/dist/storybook/assets/{Welcome.stories-lQ_IWtd1.js → Welcome.stories-BgzaFbT1.js} +1 -1
  59. package/dist/storybook/assets/{Widget.stories-rY-A2yAZ.js → Widget.stories-Bbczy09Q.js} +1 -1
  60. package/dist/storybook/assets/{WithTooltip-65CFNBJE-asVkTqyz.js → WithTooltip-65CFNBJE-BoKgPPcr.js} +1 -1
  61. package/dist/storybook/assets/{blocks-D-cAwpi5.js → blocks-j0yzxuDk.js} +5 -5
  62. package/dist/storybook/assets/{formatter-EIJCOSYU-CaSK-GPg.js → formatter-EIJCOSYU-B5-4vV2C.js} +1 -1
  63. package/dist/storybook/assets/if-defined-DBQP12ek.js +1 -0
  64. package/dist/storybook/assets/iframe-Ce3XRnL4.css +1 -0
  65. package/dist/storybook/assets/{iframe-DpPeZoRd.js → iframe-DUmd7GbF.js} +86 -86
  66. package/dist/storybook/assets/{index-Eb_LP-gw.js → index-ACSvfrQi.js} +1 -1
  67. package/dist/storybook/assets/{onFind-D8gPkhwL.js → onFind-t_5Bmfio.js} +1 -1
  68. package/dist/storybook/assets/{onFind.stories-C_2tTxBq.js → onFind.stories-CQWcRPFY.js} +1 -1
  69. package/dist/storybook/assets/{onRemove.stories-D-gjr3kA.js → onRemove.stories-B9_DDB2B.js} +1 -1
  70. package/dist/storybook/assets/{onVisible.stories-DGfzNLoX.js → onVisible.stories-G0qjGum_.js} +1 -1
  71. package/dist/storybook/assets/{style-map-WEdc6AkA.js → style-map-D_jXmlQ4.js} +1 -1
  72. package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-CCM2wmJ3.js → syntaxhighlighter-ED5Y7EFY-7_fYNYDB.js} +1 -1
  73. package/dist/storybook/iframe.html +2 -2
  74. package/dist/storybook/index.json +1 -1
  75. package/dist/storybook/project.json +1 -1
  76. package/dist/tailwind-plugin-message.d.ts +2 -0
  77. package/dist/tailwind-plugin-message.d.ts.map +1 -0
  78. package/dist/tailwind-plugin-message.js +168 -0
  79. package/dist/tailwind-plugin-message.js.map +1 -0
  80. package/dist/tailwind-plugin-message.ts +226 -0
  81. package/dist/tailwind.config.d.ts.map +1 -1
  82. package/dist/tailwind.config.js +2 -0
  83. package/dist/tailwind.config.js.map +1 -1
  84. package/dist/tailwind.config.ts +2 -0
  85. package/dist/util/EventEmitterMixin.d.ts +3 -0
  86. package/dist/util/EventEmitterMixin.d.ts.map +1 -1
  87. package/dist/util/EventEmitterMixin.js.map +1 -1
  88. package/docs/components/Banner.md +49 -0
  89. package/docs/components/Message.md +75 -0
  90. package/docs/components/README.md +2 -0
  91. package/package.json +1 -1
  92. package/src/legacy/tool-ui/src/ContentInputGroup.css +4 -0
  93. package/src/legacy/tool-ui/src/Hierarchy.css +4 -11
  94. package/src/legacy/tool-ui/src/Page.css +1 -1
  95. package/src/legacy/tool-ui/src/main/webapp/dist/{v4.da15ce3ce45e85b4880a.js → v4.84f71eb0a38ed97f7d3a.js} +2 -2
  96. package/src/legacy/tool-ui/src/main/webapp/dist/{v5.8491d982a282935a3058.js → v5.060e8a546f81da35c4de.js} +2 -2
  97. package/src/legacy/tool-ui/src/main/webapp/dist/v5.ac655d942db92fdcddfc.css +5 -0
  98. package/dist/storybook/assets/if-defined-aps73Iby.js +0 -1
  99. package/dist/storybook/assets/iframe-1F7Ef_8q.css +0 -1
  100. package/src/legacy/tool-ui/src/main/webapp/dist/v5.9b40c96064a0f8a10b53.css +0 -5
  101. /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.da15ce3ce45e85b4880a.js.LICENSE.txt → v4.84f71eb0a38ed97f7d3a.js.LICENSE.txt} +0 -0
  102. /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.8491d982a282935a3058.js.LICENSE.txt → v5.060e8a546f81da35c4de.js.LICENSE.txt} +0 -0
@@ -1,4 +1,4 @@
1
- /*! For license information please see v4.da15ce3ce45e85b4880a.js.LICENSE.txt */
1
+ /*! For license information please see v4.84f71eb0a38ed97f7d3a.js.LICENSE.txt */
2
2
  (()=>{var __webpack_modules__={42247(e,t,o){var n={"./af":88468,"./af.js":88468,"./ar":43504,"./ar-dz":56553,"./ar-dz.js":56553,"./ar-kw":32889,"./ar-kw.js":32889,"./ar-ly":41222,"./ar-ly.js":41222,"./ar-ma":75865,"./ar-ma.js":75865,"./ar-ps":96404,"./ar-ps.js":96404,"./ar-sa":80299,"./ar-sa.js":80299,"./ar-tn":77293,"./ar-tn.js":77293,"./ar.js":43504,"./az":86936,"./az.js":86936,"./be":67226,"./be.js":67226,"./bg":1548,"./bg.js":1548,"./bm":98450,"./bm.js":98450,"./bn":62829,"./bn-bd":10070,"./bn-bd.js":10070,"./bn.js":62829,"./bo":94532,"./bo.js":94532,"./br":15201,"./br.js":15201,"./bs":67912,"./bs.js":67912,"./ca":42209,"./ca.js":42209,"./cs":30055,"./cs.js":30055,"./cv":38938,"./cv.js":38938,"./cy":93417,"./cy.js":93417,"./da":34888,"./da.js":34888,"./de":5020,"./de-at":17876,"./de-at.js":17876,"./de-ch":10526,"./de-ch.js":10526,"./de.js":5020,"./dv":79851,"./dv.js":79851,"./el":65518,"./el.js":65518,"./en-au":62585,"./en-au.js":62585,"./en-ca":98459,"./en-ca.js":98459,"./en-gb":31408,"./en-gb.js":31408,"./en-ie":30577,"./en-ie.js":30577,"./en-il":56496,"./en-il.js":56496,"./en-in":82222,"./en-in.js":82222,"./en-nz":19291,"./en-nz.js":19291,"./en-sg":55313,"./en-sg.js":55313,"./eo":78473,"./eo.js":78473,"./es":43685,"./es-do":58683,"./es-do.js":58683,"./es-mx":20831,"./es-mx.js":20831,"./es-us":45264,"./es-us.js":45264,"./es.js":43685,"./et":49862,"./et.js":49862,"./eu":61399,"./eu.js":61399,"./fa":40434,"./fa.js":40434,"./fi":37242,"./fi.js":37242,"./fil":20648,"./fil.js":20648,"./fo":4248,"./fo.js":4248,"./fr":38461,"./fr-ca":43064,"./fr-ca.js":43064,"./fr-ch":76937,"./fr-ch.js":76937,"./fr.js":38461,"./fy":79818,"./fy.js":79818,"./ga":85309,"./ga.js":85309,"./gd":44352,"./gd.js":44352,"./gl":47368,"./gl.js":47368,"./gom-deva":89099,"./gom-deva.js":89099,"./gom-latn":62498,"./gom-latn.js":62498,"./gu":67881,"./gu.js":67881,"./he":39616,"./he.js":39616,"./hi":93980,"./hi.js":93980,"./hr":99875,"./hr.js":99875,"./hu":27792,"./hu.js":27792,"./hy-am":97925,"./hy-am.js":97925,"./id":34730,"./id.js":34730,"./is":11953,"./is.js":11953,"./it":19002,"./it-ch":83820,"./it-ch.js":83820,"./it.js":19002,"./ja":19518,"./ja.js":19518,"./jv":15501,"./jv.js":15501,"./ka":78665,"./ka.js":78665,"./kk":15303,"./kk.js":15303,"./km":50037,"./km.js":50037,"./kn":24186,"./kn.js":24186,"./ko":8779,"./ko.js":8779,"./ku":12221,"./ku-kmr":28876,"./ku-kmr.js":28876,"./ku.js":12221,"./ky":27457,"./ky.js":27457,"./lb":4095,"./lb.js":4095,"./lo":19450,"./lo.js":19450,"./lt":85373,"./lt.js":85373,"./lv":60819,"./lv.js":60819,"./me":84879,"./me.js":84879,"./mi":68603,"./mi.js":68603,"./mk":9413,"./mk.js":9413,"./ml":92646,"./ml.js":92646,"./mn":24904,"./mn.js":24904,"./mr":21060,"./mr.js":21060,"./ms":83437,"./ms-my":59158,"./ms-my.js":59158,"./ms.js":83437,"./mt":59886,"./mt.js":59886,"./my":75755,"./my.js":75755,"./nb":2741,"./nb.js":2741,"./ne":40470,"./ne.js":40470,"./nl":11743,"./nl-be":58657,"./nl-be.js":58657,"./nl.js":11743,"./nn":35817,"./nn.js":35817,"./oc-lnc":31561,"./oc-lnc.js":31561,"./pa-in":30402,"./pa-in.js":30402,"./pl":50713,"./pl.js":50713,"./pt":82033,"./pt-br":4e3,"./pt-br.js":4e3,"./pt.js":82033,"./ro":5748,"./ro.js":5748,"./ru":48218,"./ru.js":48218,"./sd":84172,"./sd.js":84172,"./se":31957,"./se.js":31957,"./si":65033,"./si.js":65033,"./sk":40959,"./sk.js":40959,"./sl":21604,"./sl.js":21604,"./sq":9473,"./sq.js":9473,"./sr":38438,"./sr-cyrl":28167,"./sr-cyrl.js":28167,"./sr.js":38438,"./ss":54455,"./ss.js":54455,"./sv":64906,"./sv.js":64906,"./sw":73595,"./sw.js":73595,"./ta":52024,"./ta.js":52024,"./te":51916,"./te.js":51916,"./tet":93798,"./tet.js":93798,"./tg":1370,"./tg.js":1370,"./th":2249,"./th.js":2249,"./tk":89294,"./tk.js":89294,"./tl-ph":88204,"./tl-ph.js":88204,"./tlh":14065,"./tlh.js":14065,"./tr":96855,"./tr.js":96855,"./tzl":33419,"./tzl.js":33419,"./tzm":61050,"./tzm-latn":62490,"./tzm-latn.js":62490,"./tzm.js":61050,"./ug-cn":18719,"./ug-cn.js":18719,"./uk":49437,"./uk.js":49437,"./ur":51148,"./ur.js":51148,"./uz":88580,"./uz-latn":50276,"./uz-latn.js":50276,"./uz.js":88580,"./vi":32202,"./vi.js":32202,"./x-pseudo":44782,"./x-pseudo.js":44782,"./yo":80589,"./yo.js":80589,"./zh-cn":36641,"./zh-cn.js":36641,"./zh-hk":30933,"./zh-hk.js":30933,"./zh-mo":78582,"./zh-mo.js":78582,"./zh-tw":88525,"./zh-tw.js":88525};function i(e){var t=r(e);return o(t)}function r(e){if(!o.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=r,e.exports=i,i.id=42247},66808(e,t,o){"use strict";var n=o(1439),i=o.n(n),r=o(56155);const a=window.BRIGHTSPOT?.web?.pagePaths["com.psddev.analytics.ui.AnalyticsDataToolPage"];class s{constructor(e){this.element=void 0,this.contentId=void 0,this.analyticsUrl=void 0,this.isLoaded=!1,this.cache={},this.currentPeriod="hours",this.loadingElement=void 0,this.contentElement=void 0,this.errorElement=void 0,this.periodSelector=void 0,this.element=e,this.contentId=e.dataset.contentId||"",this.analyticsUrl=a,this.loadingElement=e.querySelector(".AnalyticsWidget-loading"),this.contentElement=e.querySelector(".AnalyticsWidget-content"),this.errorElement=e.querySelector(".AnalyticsWidget-error"),this.periodSelector=e.querySelector(".AnalyticsWidget-periodSelector"),this.init()}init(){i()(this.element).closest("[data-tab]").on("tabbedShow",()=>{const e=this.element.closest("[data-tab]");this.isLoaded||e?.classList.contains("TC-unselected")||this.loadAnalyticsData()}),this.periodSelector&&this.periodSelector.addEventListener("change",e=>{const t=e.target;null!==t&&t instanceof HTMLSelectElement&&(this.currentPeriod=t.value,this.loadAnalyticsData())})}async loadAnalyticsData(){const e=this.currentPeriod;if(this.cache[e])this.displayData(this.cache[e]);else{if(!this.analyticsUrl)return console.error("Analytics data endpoint not found in pagePaths"),void this.showError();this.showLoading();try{const t=await fetch(`${this.analyticsUrl}?id=${this.contentId}&period=${e}`);if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);const o=await t.json();if("error"in o)throw new Error(o.error);this.cache[e]=o,this.displayData(o),this.isLoaded=!0}catch(e){console.error("Failed to load analytics data:",e),this.showError()}}}showLoading(){this.loadingElement&&(this.loadingElement.hidden=!1),this.contentElement&&(this.contentElement.hidden=!0),this.errorElement&&(this.errorElement.hidden=!0)}showError(){this.loadingElement&&(this.loadingElement.hidden=!0),this.contentElement&&(this.contentElement.hidden=!0),this.errorElement&&(this.errorElement.hidden=!1)}displayData(e){if(this.loadingElement&&(this.loadingElement.hidden=!0),this.errorElement&&(this.errorElement.hidden=!0),this.contentElement&&(this.contentElement.hidden=!1),!this.contentElement)return;this.contentElement.innerHTML="";const t=document.createElement("div");t.className=`numbersPeriod numbersPeriod-${e.periodLabel}`,t.addEventListener("highchart-loaded",()=>{t.classList.add("chart-loaded")}),e.chartData&&(t.innerHTML=e.chartData),this.contentElement.appendChild(t)}}(0,r.A)(".AnalyticsWidget",e=>{new s(e)})},40482(e,t,o){"use strict";o(67219),o(44764);var n={},i="function"==typeof Map?new Map:null,r="swap",a="move",s="layoutStart",c="layoutEnd",p="layoutAbort",b="remove",M="hideStart",d="filter",l="sort",z="move",u="send",O="beforeSend",A="receive",f="beforeReceive",h="dragReleaseEnd",m="ontouchstart"in window,q=!!window.PointerEvent,_=!!window.navigator.msPointerEnabled;function W(){this._events={},this._queue=[],this._counter=0,this._clearOnEmit=!1}W.prototype.on=function(e,t){if(!this._events||!e||!t)return this;var o=this._events[e];return o||(o=this._events[e]=[]),o.push(t),this},W.prototype.off=function(e,t){if(!this._events||!e||!t)return this;var o,n=this._events[e];if(!n||!n.length)return this;for(;-1!==(o=n.indexOf(t));)n.splice(o,1);return this},W.prototype.clear=function(e){if(!this._events||!e)return this;var t=this._events[e];return t&&(t.length=0,delete this._events[e]),this},W.prototype.emit=function(e){if(!this._events||!e)return this._clearOnEmit=!1,this;var t=this._events[e];if(!t||!t.length)return this._clearOnEmit=!1,this;var o,n=this._queue,i=n.length,r=arguments.length-1;r>3&&((o=[]).push.apply(o,arguments),o.shift()),n.push.apply(n,t),this._clearOnEmit&&(t.length=0,this._clearOnEmit=!1),++this._counter;for(var a=i,s=n.length;a<s;a++)if(0===r?n[a]():1===r?n[a](arguments[1]):2===r?n[a](arguments[1],arguments[2]):3===r?n[a](arguments[1],arguments[2],arguments[3]):n[a].apply(null,o),!this._events)return this;return--this._counter,this._counter||(n.length=0),this},W.prototype.burst=function(){return this._events?(this._clearOnEmit=!0,this.emit.apply(this,arguments),this):this},W.prototype.countListeners=function(e){if(!this._events)return 0;var t=this._events[e];return t?t.length:0},W.prototype.destroy=function(){return this._events?(this._queue.length=this._counter=0,this._events=null,this):this};var g=q?"pointerout":_?"MSPointerOut":"";function y(e){g&&(this._dragger=e,this._timeout=null,this._outEvent=null,this._isActive=!1,this._addBehaviour=this._addBehaviour.bind(this),this._removeBehaviour=this._removeBehaviour.bind(this),this._onTimeout=this._onTimeout.bind(this),this._resetData=this._resetData.bind(this),this._onStart=this._onStart.bind(this),this._onOut=this._onOut.bind(this),this._dragger.on("start",this._onStart))}y.prototype._addBehaviour=function(){this._isActive||(this._isActive=!0,this._dragger.on("move",this._resetData),this._dragger.on("cancel",this._removeBehaviour),this._dragger.on("end",this._removeBehaviour),window.addEventListener(g,this._onOut))},y.prototype._removeBehaviour=function(){this._isActive&&(this._dragger.off("move",this._resetData),this._dragger.off("cancel",this._removeBehaviour),this._dragger.off("end",this._removeBehaviour),window.removeEventListener(g,this._onOut),this._resetData(),this._isActive=!1)},y.prototype._resetData=function(){window.clearTimeout(this._timeout),this._timeout=null,this._outEvent=null},y.prototype._onStart=function(e){"mouse"!==e.pointerType&&this._addBehaviour()},y.prototype._onOut=function(e){this._dragger._getTrackedTouch(e)&&(this._resetData(),this._outEvent=e,this._timeout=window.setTimeout(this._onTimeout,100))},y.prototype._onTimeout=function(){var e=this._outEvent;this._resetData(),this._dragger.isActive()&&this._dragger._onCancel(e)},y.prototype.destroy=function(){g&&(this._dragger.off("start",this._onStart),this._removeBehaviour())};var v=["","webkit","moz","ms","o","Webkit","Moz","MS","O"],L={};function w(e,t){var o=L[t]||"";if(o)return o;for(var n=t[0].toUpperCase()+t.slice(1),i=0;i<v.length;){if((o=v[i]?v[i]+n:t)in e)return L[t]=o,o;++i}return""}function R(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}return e}var k=window.navigator.userAgent.toLowerCase(),T=k.indexOf("edge")>-1,S=k.indexOf("trident")>-1,E=k.indexOf("firefox")>-1,N=k.indexOf("android")>-1,B=!!R()&&{passive:!0},C="touchAction",D=w(document.documentElement.style,C);function x(e,t){this._element=e,this._emitter=new W,this._isDestroyed=!1,this._cssProps={},this._touchAction="",this._isActive=!1,this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._onStart=this._onStart.bind(this),this._onMove=this._onMove.bind(this),this._onCancel=this._onCancel.bind(this),this._onEnd=this._onEnd.bind(this),this._edgeHack=null,(T||S)&&(q||_)&&(this._edgeHack=new y(this)),this.setCssProps(t),this._touchAction||this.setTouchAction("auto"),e.addEventListener("dragstart",x._preventDefault,!1),e.addEventListener(x._inputEvents.start,this._onStart,B)}x._pointerEvents={start:"pointerdown",move:"pointermove",cancel:"pointercancel",end:"pointerup"},x._msPointerEvents={start:"MSPointerDown",move:"MSPointerMove",cancel:"MSPointerCancel",end:"MSPointerUp"},x._touchEvents={start:"touchstart",move:"touchmove",cancel:"touchcancel",end:"touchend"},x._mouseEvents={start:"mousedown",move:"mousemove",cancel:"",end:"mouseup"},x._inputEvents=m?x._touchEvents:q?x._pointerEvents:_?x._msPointerEvents:x._mouseEvents,x._emitter=new W,x._emitterEvents={start:"start",move:"move",end:"end",cancel:"cancel"},x._activeInstances=[],x._preventDefault=function(e){e.preventDefault&&!1!==e.cancelable&&e.preventDefault()},x._activateInstance=function(e){x._activeInstances.indexOf(e)>-1||(x._activeInstances.push(e),x._emitter.on(x._emitterEvents.move,e._onMove),x._emitter.on(x._emitterEvents.cancel,e._onCancel),x._emitter.on(x._emitterEvents.end,e._onEnd),1===x._activeInstances.length&&x._bindListeners())},x._deactivateInstance=function(e){var t=x._activeInstances.indexOf(e);-1!==t&&(x._activeInstances.splice(t,1),x._emitter.off(x._emitterEvents.move,e._onMove),x._emitter.off(x._emitterEvents.cancel,e._onCancel),x._emitter.off(x._emitterEvents.end,e._onEnd),x._activeInstances.length||x._unbindListeners())},x._bindListeners=function(){window.addEventListener(x._inputEvents.move,x._onMove,B),window.addEventListener(x._inputEvents.end,x._onEnd,B),x._inputEvents.cancel&&window.addEventListener(x._inputEvents.cancel,x._onCancel,B)},x._unbindListeners=function(){window.removeEventListener(x._inputEvents.move,x._onMove,B),window.removeEventListener(x._inputEvents.end,x._onEnd,B),x._inputEvents.cancel&&window.removeEventListener(x._inputEvents.cancel,x._onCancel,B)},x._getEventPointerId=function(e){return"number"==typeof e.pointerId?e.pointerId:e.changedTouches?e.changedTouches[0]?e.changedTouches[0].identifier:null:1},x._getTouchById=function(e,t){if("number"==typeof e.pointerId)return e.pointerId===t?e:null;if(e.changedTouches){for(var o=0;o<e.changedTouches.length;o++)if(e.changedTouches[o].identifier===t)return e.changedTouches[o];return null}return e},x._onMove=function(e){x._emitter.emit(x._emitterEvents.move,e)},x._onCancel=function(e){x._emitter.emit(x._emitterEvents.cancel,e)},x._onEnd=function(e){x._emitter.emit(x._emitterEvents.end,e)},x.prototype._reset=function(){this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._isActive=!1,x._deactivateInstance(this)},x.prototype._createEvent=function(e,t){var o=this._getTrackedTouch(t);return{type:e,srcEvent:t,distance:this.getDistance(),deltaX:this.getDeltaX(),deltaY:this.getDeltaY(),deltaTime:e===x._emitterEvents.start?0:this.getDeltaTime(),isFirst:e===x._emitterEvents.start,isFinal:e===x._emitterEvents.end||e===x._emitterEvents.cancel,pointerType:t.pointerType||(t.touches?"touch":"mouse"),identifier:this._pointerId,screenX:o.screenX,screenY:o.screenY,clientX:o.clientX,clientY:o.clientY,pageX:o.pageX,pageY:o.pageY,target:o.target}},x.prototype._emit=function(e,t){this._emitter.emit(e,this._createEvent(e,t))},x.prototype._getTrackedTouch=function(e){return null===this._pointerId?null:x._getTouchById(e,this._pointerId)},x.prototype._onStart=function(e){if(!this._isDestroyed&&null===this._pointerId&&(this._pointerId=x._getEventPointerId(e),null!==this._pointerId)){var t=this._getTrackedTouch(e);this._startX=this._currentX=t.clientX,this._startY=this._currentY=t.clientY,this._startTime=Date.now(),this._isActive=!0,this._emit(x._emitterEvents.start,e),this._isActive&&x._activateInstance(this)}},x.prototype._onMove=function(e){var t=this._getTrackedTouch(e);t&&(this._currentX=t.clientX,this._currentY=t.clientY,this._emit(x._emitterEvents.move,e))},x.prototype._onCancel=function(e){this._getTrackedTouch(e)&&(this._emit(x._emitterEvents.cancel,e),this._reset())},x.prototype._onEnd=function(e){this._getTrackedTouch(e)&&(this._emit(x._emitterEvents.end,e),this._reset())},x.prototype.isActive=function(){return this._isActive},x.prototype.setTouchAction=function(e){this._touchAction=e,D&&(this._cssProps[D]="",this._element.style[D]=e),m&&(this._element.removeEventListener(x._touchEvents.start,x._preventDefault,!0),(this._element.style[D]!==e||E&&N)&&this._element.addEventListener(x._touchEvents.start,x._preventDefault,!0))},x.prototype.setCssProps=function(e){if(e){var t,o,n=this._cssProps,i=this._element;for(t in n)i.style[t]=n[t],delete n[t];for(t in e)e[t]&&(t!==C?(o=w(i.style,t))&&(n[o]="",i.style[o]=e[t]):this.setTouchAction(e[t]))}},x.prototype.getDeltaX=function(){return this._currentX-this._startX},x.prototype.getDeltaY=function(){return this._currentY-this._startY},x.prototype.getDistance=function(){var e=this.getDeltaX(),t=this.getDeltaY();return Math.sqrt(e*e+t*t)},x.prototype.getDeltaTime=function(){return this._startTime?Date.now()-this._startTime:0},x.prototype.on=function(e,t){this._emitter.on(e,t)},x.prototype.off=function(e,t){this._emitter.off(e,t)},x.prototype.destroy=function(){if(!this._isDestroyed){var e=this._element;for(var t in this._edgeHack&&this._edgeHack.destroy(),this._reset(),this._emitter.destroy(),e.removeEventListener(x._inputEvents.start,this._onStart,B),e.removeEventListener("dragstart",x._preventDefault,!1),e.removeEventListener(x._touchEvents.start,x._preventDefault,!0),this._cssProps)e.style[t]=this._cssProps[t],delete this._cssProps[t];this._element=null,this._isDestroyed=!0}};var X=1e3/60,Y=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return this.setTimeout(function(){e(Date.now())},X)}).bind(window);function P(e){this._nextStep=null,this._lanes=[],this._stepQueue=[],this._stepCallbacks={},this._step=this._step.bind(this);for(var t=0;t<e;t++)this._lanes.push(new I)}function I(){this.queue=[],this.indices={},this.callbacks={}}P.prototype._step=function(e){var t,o,n,i,r,a,s=this._lanes,c=this._stepQueue,p=this._stepCallbacks;for(this._nextStep=null,t=0;t<s.length;t++){for(i=s[t].queue,r=s[t].callbacks,a=s[t].indices,o=0;o<i.length;o++)(n=i[o])&&(c.push(n),p[n]=r[n],delete r[n],delete a[n]);i.length=0}for(t=0;t<c.length;t++)p[n=c[t]]&&p[n](e),delete p[n];c.length=0},P.prototype.add=function(e,t,o){this._lanes[e].add(t,o),this._nextStep||(this._nextStep=Y(this._step))},P.prototype.remove=function(e,t){this._lanes[e].remove(t)},I.prototype.add=function(e,t){var o=this.indices[e];void 0!==o&&(this.queue[o]=void 0),this.queue.push(e),this.callbacks[e]=t,this.indices[e]=this.queue.length-1},I.prototype.remove=function(e){var t=this.indices[e];void 0!==t&&(this.queue[t]=void 0,delete this.callbacks[e],delete this.indices[e])};var H="layoutRead",j="layoutWrite",F="visibilityRead",G="visibilityWrite",$="dragStartRead",U="dragStartWrite",V="dragMoveRead",J="dragMoveWrite",K="dragScrollRead",Q="dragScrollWrite",Z="dragSortRead",ee="placeholderLayoutRead",te="placeholderLayoutWrite",oe="placeholderResizeWrite",ne="autoScrollRead",ie="autoScrollWrite",re="debounceRead",ae=new P(3);function se(e){ae.remove(0,H+e),ae.remove(2,j+e)}function ce(e){ae.remove(0,F+e),ae.remove(2,G+e)}function pe(e){ae.remove(0,$+e),ae.remove(2,U+e)}function be(e){ae.remove(0,V+e),ae.remove(2,J+e)}function Me(e){ae.remove(0,K+e),ae.remove(2,Q+e)}function de(e,t){ae.add(1,Z+e,t)}function le(e){ae.remove(0,ee+e),ae.remove(2,te+e)}function ze(e,t){ae.add(0,ne,e),ae.add(2,ie,t)}function ue(e){return"function"==typeof e}var Oe="function"==typeof WeakMap?new WeakMap:null;function Ae(e,t){var o=Oe&&Oe.get(e);return o||(o=window.getComputedStyle(e,null),Oe&&Oe.set(e,o)),o.getPropertyValue(t)}function fe(e,t){return parseFloat(Ae(e,t))||0}var he,me=document.documentElement,qe=document.body,_e={value:0,offset:0};function We(e){return e===window||e===me||e===qe?window:e}function ge(e){return e===window?e.pageXOffset:e.scrollLeft}function ye(e){return e===window?e.pageYOffset:e.scrollTop}function ve(e){return e===window?me.scrollWidth-me.clientWidth:e.scrollWidth-e.clientWidth}function Le(e){return e===window?me.scrollHeight-me.clientHeight:e.scrollHeight-e.clientHeight}function we(e,t){if(t=t||{},e===window)t.width=me.clientWidth,t.height=me.clientHeight,t.left=0,t.right=t.width,t.top=0,t.bottom=t.height;else{var o=e.getBoundingClientRect(),n=e.clientLeft||fe(e,"border-left-width"),i=e.clientTop||fe(e,"border-top-width");t.width=e.clientWidth,t.height=e.clientHeight,t.left=o.left+n,t.right=t.left+t.width,t.top=o.top+i,t.bottom=t.top+t.height}return t}function Re(e){return e._drag._getGrid()._settings.dragAutoScroll}function ke(e){e._drag&&e._drag._prepareScroll()}function Te(e){if(e._drag&&e._isActive){var t=e._drag;t._scrollDiffX=t._scrollDiffY=0,e._setTranslate(t._left,t._top)}}function Se(e,t,o,n){return _e.value=Math.min(n/2,e),_e.offset=Math.max(0,o+2*_e.value+n*t-n)/2,_e}function Ee(){this.reset()}function Ne(){this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0}function Be(e,t){this.pool=[],this.createItem=e,this.releaseItem=t}function Ce(e,t){var o=function(e,t){return function(e,t){return!(e.left+e.width<=t.left||t.left+t.width<=e.left||e.top+e.height<=t.top||t.top+t.height<=e.top)}(e,t)?(Math.min(e.left+e.width,t.left+t.width)-Math.max(e.left,t.left))*(Math.min(e.top+e.height,t.top+t.height)-Math.max(e.top,t.top)):0}(e,t);return o?o/(Math.min(e.width,t.width)*Math.min(e.height,t.height))*100:0}Ee.prototype.reset=function(){this.isActive&&this.onStop(),this.item=null,this.element=null,this.isActive=!1,this.isEnding=!1,this.direction=null,this.value=null,this.maxValue=0,this.threshold=0,this.distance=0,this.speed=0,this.duration=0,this.action=null},Ee.prototype.hasReachedEnd=function(){return 4&this.direction?this.value>=this.maxValue:this.value<=0},Ee.prototype.computeCurrentScrollValue=function(){return null===this.value?1&this.direction?ge(this.element):ye(this.element):Math.max(0,Math.min(this.value,this.maxValue))},Ee.prototype.computeNextScrollValue=function(e){var t=this.speed*(e/1e3),o=4&this.direction?this.value+t:this.value-t;return Math.max(0,Math.min(o,this.maxValue))},Ee.prototype.computeSpeed=(he={direction:null,threshold:0,distance:0,value:0,maxValue:0,deltaTime:0,duration:0,isEnding:!1},function(e){var t=this.item,o=Re(t).speed;return ue(o)?(he.direction=this.direction,he.threshold=this.threshold,he.distance=this.distance,he.value=this.value,he.maxValue=this.maxValue,he.duration=this.duration,he.speed=this.speed,he.deltaTime=e,he.isEnding=this.isEnding,o(t,this.element,he)):o}),Ee.prototype.tick=function(e){return this.isActive||(this.isActive=!0,this.onStart()),this.value=this.computeCurrentScrollValue(),this.speed=this.computeSpeed(e),this.value=this.computeNextScrollValue(e),this.duration+=e,this.value},Ee.prototype.onStart=function(){var e=this.item,t=Re(e).onStart;ue(t)&&t(e,this.element,this.direction)},Ee.prototype.onStop=function(){var e=this.item,t=Re(e).onStop;ue(t)&&t(e,this.element,this.direction),e._drag&&e._drag.sort()},Ne.prototype.reset=function(){this.requestX&&(this.requestX.action=null),this.requestY&&(this.requestY.action=null),this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0},Ne.prototype.addRequest=function(e){1&e.direction?(this.removeRequest(this.requestX),this.requestX=e):(this.removeRequest(this.requestY),this.requestY=e),e.action=this},Ne.prototype.removeRequest=function(e){e&&(this.requestX===e?(this.requestX=null,e.action=null):this.requestY===e&&(this.requestY=null,e.action=null))},Ne.prototype.computeScrollValues=function(){this.scrollLeft=this.requestX?this.requestX.value:ge(this.element),this.scrollTop=this.requestY?this.requestY.value:ye(this.element)},Ne.prototype.scroll=function(){var e=this.element;e&&(e.scrollTo?e.scrollTo(this.scrollLeft,this.scrollTop):(e.scrollLeft=this.scrollLeft,e.scrollTop=this.scrollTop))},Be.prototype.pick=function(){return this.pool.pop()||this.createItem()},Be.prototype.release=function(e){this.releaseItem(e),-1===this.pool.indexOf(e)&&this.pool.push(e)},Be.prototype.reset=function(){this.pool.length=0};var De={width:0,height:0,left:0,right:0,top:0,bottom:0},xe={width:0,height:0,left:0,right:0,top:0,bottom:0};function Xe(){this._isDestroyed=!1,this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,this._items=[],this._actions=[],this._requests={},this._requests[1]={},this._requests[2]={},this._requestOverlapCheck={},this._dragPositions={},this._dragDirections={},this._overlapCheckInterval=150,this._requestPool=new Be(function(){return new Ee},function(e){e.reset()}),this._actionPool=new Be(function(){return new Ne},function(e){e.reset()}),this._readTick=this._readTick.bind(this),this._writeTick=this._writeTick.bind(this)}Xe.AXIS_X=1,Xe.AXIS_Y=2,Xe.FORWARD=4,Xe.BACKWARD=8,Xe.LEFT=9,Xe.RIGHT=5,Xe.UP=10,Xe.DOWN=6,Xe.smoothSpeed=function(e,t,o){return function(n,i,r){var a=0;if(!r.isEnding)if(r.threshold>0){var s=r.threshold-Math.max(0,r.distance);a=e/r.threshold*s}else a=e;var c=r.speed,p=a;return c===a?p:c<a?(p=c+t*(r.deltaTime/1e3),Math.min(a,p)):(p=c-o*(r.deltaTime/1e3),Math.max(a,p))}},Xe.pointerHandle=function(e){var t={left:0,top:0,width:0,height:0},o=e||1;return function(e,n,i,r,a,s,c){return t.left=s-.5*o,t.top=c-.5*o,t.width=o,t.height=o,t}},Xe.prototype._readTick=function(e){this._isDestroyed||(e&&this._tickTime?(this._tickDeltaTime=e-this._tickTime,this._tickTime=e,this._updateRequests(),this._updateActions()):(this._tickTime=e,this._tickDeltaTime=0))},Xe.prototype._writeTick=function(){this._isDestroyed||(this._applyActions(),ze(this._readTick,this._writeTick))},Xe.prototype._startTicking=function(){this._isTicking=!0,ze(this._readTick,this._writeTick)},Xe.prototype._stopTicking=function(){this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,ae.remove(0,ne),ae.remove(2,ie)},Xe.prototype._getItemHandleRect=function(e,t,o){var n=e._drag;if(t){var i=n._dragMoveEvent||n._dragStartEvent,r=t(e,n._clientX,n._clientY,e._width,e._height,i.clientX,i.clientY);o.left=r.left,o.top=r.top,o.width=r.width,o.height=r.height}else o.left=n._clientX,o.top=n._clientY,o.width=e._width,o.height=e._height;return o.right=o.left+o.width,o.bottom=o.top+o.height,o},Xe.prototype._requestItemScroll=function(e,t,o,n,i,r,a){var s=this._requests[t],c=s[e._id];c?c.element===o&&c.direction===n||c.reset():c=this._requestPool.pick(),c.item=e,c.element=o,c.direction=n,c.threshold=i,c.distance=r,c.maxValue=a,s[e._id]=c},Xe.prototype._cancelItemScroll=function(e,t){var o=this._requests[t],n=o[e._id];n&&(n.action&&n.action.removeRequest(n),this._requestPool.release(n),delete o[e._id])},Xe.prototype._checkItemOverlap=function(e,t,o){var n=Re(e),i=ue(n.targets)?n.targets(e):n.targets,r=n.threshold,a=n.safeZone;if(!i||!i.length)return t&&this._cancelItemScroll(e,1),void(o&&this._cancelItemScroll(e,2));var s=this._dragDirections[e._id],c=s[0],p=s[1];if(!c&&!p)return t&&this._cancelItemScroll(e,1),void(o&&this._cancelItemScroll(e,2));for(var b=this._getItemHandleRect(e,n.handle,De),M=xe,d=null,l=null,z=!0,u=!0,O=0,A=0,f=null,h=null,m=0,q=0,_=0,W=null,g=-1/0,y=0,v=0,L=null,w=0,R=0,k=null,T=-1/0,S=0,E=0,N=null,B=0,C=0,D=0;D<i.length;D++)d=i[D],z=t&&c&&2!==d.axis,u=o&&p&&1!==d.axis,A=d.priority||0,(!z||A<g)&&(!u||A<T)||(l=We(d.element||d),q=z?ve(l):-1,_=u?Le(l):-1,(q||_)&&((O=Ce(b,M=we(l,M)))<=0||(z&&A>=g&&q>0&&(A>g||O>v)&&(h=null,f=Se("number"==typeof d.threshold?d.threshold:r,a,b.width,M.width),5===c?(m=M.right+f.offset-b.right)<=f.value&&ge(l)<q&&(h=5):9===c&&(m=b.left-(M.left-f.offset))<=f.value&&ge(l)>0&&(h=9),null!==h&&(W=l,g=A,y=f.value,v=O,L=h,w=m,R=q)),u&&A>=T&&_>0&&(A>T||O>E)&&(h=null,f=Se("number"==typeof d.threshold?d.threshold:r,a,b.height,M.height),6===p?(m=M.bottom+f.offset-b.bottom)<=f.value&&ye(l)<_&&(h=6):10===p&&(m=b.top-(M.top-f.offset))<=f.value&&ye(l)>0&&(h=10),null!==h&&(k=l,T=A,S=f.value,E=O,N=h,B=m,C=_)))));t&&(W?this._requestItemScroll(e,1,W,L,y,w,R):this._cancelItemScroll(e,1)),o&&(k?this._requestItemScroll(e,2,k,N,S,B,C):this._cancelItemScroll(e,2))},Xe.prototype._updateScrollRequest=function(e){for(var t=e.item,o=Re(t),n=ue(o.targets)?o.targets(t):o.targets,i=n&&n.length||0,r=o.threshold,a=o.safeZone,s=this._getItemHandleRect(t,o.handle,De),c=xe,p=null,b=null,M=!1,d=null,l=null,z=null,u=null,O=null,A=0;A<i;A++)if((b=We((p=n[A]).element||p))===e.element){if(M=!!(1&e.direction)){if(2===p.axis)continue}else if(1===p.axis)continue;if((u=M?ve(b):Le(b))<=0)break;if(Ce(s,c=we(b,c))<=0)break;if(d=Se("number"==typeof p.threshold?p.threshold:r,a,M?s.width:s.height,M?c.width:c.height),(l=9===e.direction?s.left-(c.left-d.offset):5===e.direction?c.right+d.offset-s.right:10===e.direction?s.top-(c.top-d.offset):c.bottom+d.offset-s.bottom)>d.value)break;if(z=M?ge(b):ye(b),O=4&e.direction?z>=u:z<=0)break;return e.maxValue=u,e.threshold=d.value,e.distance=l,e.isEnding=!1,!0}return!0===o.smoothStop&&e.speed>0?(null===O&&(O=e.hasReachedEnd()),e.isEnding=!O):e.isEnding=!1,e.isEnding},Xe.prototype._updateRequests=function(){for(var e,t,o,n,i,r,a,s=this._items,c=this._requests[1],p=this._requests[2],b=0;b<s.length;b++)e=s[b],i=(n=this._requestOverlapCheck[e._id])>0&&this._tickTime-n>this._overlapCheckInterval,r=!0,(t=c[e._id])&&t.isActive&&(r=!this._updateScrollRequest(t))&&(i=!0,this._cancelItemScroll(e,1)),a=!0,(o=p[e._id])&&o.isActive&&(a=!this._updateScrollRequest(o))&&(i=!0,this._cancelItemScroll(e,2)),i&&(this._requestOverlapCheck[e._id]=0,this._checkItemOverlap(e,r,a))},Xe.prototype._requestAction=function(e,t){for(var o=this._actions,n=1===t,i=null,r=0;r<o.length;r++){if(i=o[r],e.element===i.element){if(n?i.requestX:i.requestY)return void this._cancelItemScroll(e.item,t);break}i=null}i||(i=this._actionPool.pick()),i.element=e.element,i.addRequest(e),e.tick(this._tickDeltaTime),o.push(i)},Xe.prototype._updateActions=function(){var e,t,o,n,i=this._items,r=this._requests,a=this._actions;for(n=0;n<i.length;n++)e=i[n]._id,t=r[1][e],o=r[2][e],t&&this._requestAction(t,1),o&&this._requestAction(o,2);for(n=0;n<a.length;n++)a[n].computeScrollValues()},Xe.prototype._applyActions=function(){var e,t=this._actions,o=this._items;if(t.length){for(e=0;e<t.length;e++)t[e].scroll(),this._actionPool.release(t[e]);for(t.length=0,e=0;e<o.length;e++)ke(o[e]);for(e=0;e<o.length;e++)Te(o[e])}},Xe.prototype._updateDragDirection=function(e){var t=this._dragPositions[e._id],o=this._dragDirections[e._id],n=e._drag._left,i=e._drag._top;if(t.length){var r=t[0],a=t[1];o[0]=n>r?5:n<r?9:o[0]||0,o[1]=i>a?6:i<a?10:o[1]||0}t[0]=n,t[1]=i},Xe.prototype.addItem=function(e){this._isDestroyed||-1===this._items.indexOf(e)&&(this._items.push(e),this._requestOverlapCheck[e._id]=this._tickTime,this._dragDirections[e._id]=[0,0],this._dragPositions[e._id]=[],this._isTicking||this._startTicking())},Xe.prototype.updateItem=function(e){this._isDestroyed||this._dragDirections[e._id]&&(this._updateDragDirection(e),this._requestOverlapCheck[e._id]||(this._requestOverlapCheck[e._id]=this._tickTime))},Xe.prototype.removeItem=function(e){if(!this._isDestroyed){var t=this._items.indexOf(e);if(-1!==t){var o=e._id;this._requests[1][o]&&(this._cancelItemScroll(e,1),delete this._requests[1][o]),this._requests[2][o]&&(this._cancelItemScroll(e,2),delete this._requests[2][o]),delete this._requestOverlapCheck[o],delete this._dragPositions[o],delete this._dragDirections[o],this._items.splice(t,1),this._isTicking&&!this._items.length&&this._stopTicking()}}},Xe.prototype.isItemScrollingX=function(e){var t=this._requests[1][e._id];return!(!t||!t.isActive)},Xe.prototype.isItemScrollingY=function(e){var t=this._requests[2][e._id];return!(!t||!t.isActive)},Xe.prototype.isItemScrolling=function(e){return this.isItemScrollingX(e)||this.isItemScrollingY(e)},Xe.prototype.destroy=function(){if(!this._isDestroyed){for(var e=this._items.slice(0),t=0;t<e.length;t++)this.removeItem(e[t]);this._actions.length=0,this._requestPool.reset(),this._actionPool.reset(),this._isDestroyed=!0}};var Ye=window.Element.prototype,Pe=Ye.matches||Ye.matchesSelector||Ye.webkitMatchesSelector||Ye.mozMatchesSelector||Ye.msMatchesSelector||Ye.oMatchesSelector||function(){return!1};function Ie(e,t){return Pe.call(e,t)}function He(e,t){t&&(e.classList?e.classList.add(t):Ie(e,"."+t)||(e.className+=" "+t))}var je=[];function Fe(e,t,o){var n="number"==typeof o?o:-1;n<0&&(n=e.length-n+1),e.splice.apply(e,je.concat(n,0,t)),je.length=0}function Ge(e,t,o){var n=Math.max(0,e.length-1+(o||0));return t>n?n:t<0?Math.max(n+t+1,0):t}function $e(e,t,o){if(!(e.length<2)){var n=Ge(e,t),i=Ge(e,o);n!==i&&e.splice(i,0,e.splice(n,1)[0])}}function Ue(e,t,o){if(!(e.length<2)){var n,i=Ge(e,t),r=Ge(e,o);i!==r&&(n=e[i],e[i]=e[r],e[r]=n)}}var Ve=w(document.documentElement.style,"transform")||"transform",Je=/([A-Z])/g,Ke=/^(webkit-|moz-|ms-|o-)/,Qe=/^(-m-s-)/;function Ze(e){var t=e.replace(Je,"-$1").toLowerCase();return(t=t.replace(Ke,"-$1")).replace(Qe,"-ms-")}var et=Ze(Ve);function tt(e){var t=Ae(e,et);if(!t||"none"===t)return!1;var o=Ae(e,"display");return"inline"!==o&&"none"!==o}function ot(e){for(var t=document,o=e||t;o&&o!==t&&"static"===Ae(o,"position")&&!tt(o);)o=o.parentElement||t;return o}var nt={},it={},rt={};function at(e,t){var o,n=t||{};return n.left=0,n.top=0,e===document||(n.left=window.pageXOffset||0,n.top=window.pageYOffset||0,e.self===window.self||(o=e.getBoundingClientRect(),n.left+=o.left,n.top+=o.top,n.left+=fe(e,"border-left-width"),n.top+=fe(e,"border-top-width"))),n}function st(e,t,o){return rt.left=0,rt.top=0,e===t||o&&(e=ot(e))===(t=ot(t))||(at(e,nt),at(t,it),rt.left=it.left-nt.left,rt.top=it.top-nt.top),rt}function ct(e){return"auto"===e||"scroll"===e||"overlay"===e}function pt(e){return ct(Ae(e,"overflow"))||ct(Ae(e,"overflow-x"))||ct(Ae(e,"overflow-y"))}function bt(e,t){for(t=t||[];e&&e!==document;)e.getRootNode&&e instanceof DocumentFragment?e=e.getRootNode().host:(pt(e)&&t.push(e),e=e.parentNode);return t.push(window),t}var Mt={},dt=/^matrix3d/,lt=/([^,]*,){4}/,zt=/([^,]*,){12}/,ut=/[^,]*,/;function Ot(e){Mt.x=0,Mt.y=0;var t=Ae(e,et);if(!t||"none"===t)return Mt;var o=dt.test(t),n=t.replace(o?zt:lt,""),i=n.replace(ut,"");return Mt.x=parseFloat(n)||0,Mt.y=parseFloat(i)||0,Mt}function At(e,t){t&&(e.classList?e.classList.remove(t):Ie(e,"."+t)&&(e.className=(" "+e.className+" ").replace(" "+t+" "," ").trim()))}var ft,ht,mt,qt,_t=/^(iPad|iPhone|iPod)/.test(window.navigator.platform)||/^Mac/.test(window.navigator.platform)&&window.navigator.maxTouchPoints>1,Wt=!!R()&&{passive:!0};function gt(e){var t=e._element,o=e.getGrid(),n=o._settings;this._item=e,this._gridId=o._id,this._isDestroyed=!1,this._isMigrating=!1,this._startPredicate=ue(n.dragStartPredicate)?n.dragStartPredicate:gt.defaultStartPredicate,this._startPredicateState=0,this._startPredicateResult=void 0,this._isSortNeeded=!1,this._sortTimer=void 0,this._blockedSortIndex=null,this._sortX1=0,this._sortX2=0,this._sortY1=0,this._sortY2=0,this._reset(),this._preStartCheck=this._preStartCheck.bind(this),this._preEndCheck=this._preEndCheck.bind(this),this._onScroll=this._onScroll.bind(this),this._prepareStart=this._prepareStart.bind(this),this._applyStart=this._applyStart.bind(this),this._prepareMove=this._prepareMove.bind(this),this._applyMove=this._applyMove.bind(this),this._prepareScroll=this._prepareScroll.bind(this),this._applyScroll=this._applyScroll.bind(this),this._handleSort=this._handleSort.bind(this),this._handleSortDelayed=this._handleSortDelayed.bind(this),this._handle=n.dragHandle&&t.querySelector(n.dragHandle)||t,this._dragger=new x(this._handle,n.dragCssProps),this._dragger.on("start",this._preStartCheck),this._dragger.on("move",this._preStartCheck),this._dragger.on("cancel",this._preEndCheck),this._dragger.on("end",this._preEndCheck)}function yt(e,t){var o,n,i={};if(Array.isArray(t))for(n=0;n<t.length;n++)i[o=t[n]]=Ae(e,Ze(o));else for(o in t)i[o]=Ae(e,Ze(o));return i}gt.autoScroller=new Xe,gt.defaultStartPredicate=function(e,t,o){var n=e._drag;if(t.isFirst&&t.srcEvent.button)return!1;if(!_t&&t.isFirst&&!0===t.srcEvent.isTrusted&&!1===t.srcEvent.defaultPrevented&&!1===t.srcEvent.cancelable)return!1;if(!t.isFinal){var i=n._startPredicateData;if(!i){var r=o||n._getGrid()._settings.dragStartPredicate||{};n._startPredicateData=i={distance:Math.max(r.distance,0)||0,delay:Math.max(r.delay,0)||0}}return i.delay&&(i.event=t,i.delayTimer||(i.delayTimer=window.setTimeout(function(){i.delay=0,n._resolveStartPredicate(i.event)&&(n._forceResolveStartPredicate(i.event),n._resetStartPredicate())},i.delay))),n._resolveStartPredicate(t)}n._finishStartPredicate(t)},gt.defaultSortPredicate=(ft={},ht={},mt={},qt=[],function(e,t){var o=e._drag,n=o._getGrid(),i=t&&"number"==typeof t.threshold?t.threshold:50,s=t&&t.action===r?r:a,c=t&&t.migrateAction===r?r:a;i=Math.min(Math.max(i,1),100),ft.width=e._width,ft.height=e._height,ft.left=o._clientX,ft.top=o._clientY;var p=function(e,t,o){var n,i,r,a,s,c,p,b,M,d,l=null,z=t._settings.dragSort,u=-1;if(!0===z?(qt[0]=t,i=qt):ue(z)&&(i=z.call(t,e)),!i||!Array.isArray(i)||!i.length)return l;for(d=0;d<i.length;d++)if(!(r=i[d])._isDestroyed){for(r._updateBoundingRect(),c=Math.max(0,r._left),p=Math.max(0,r._top),b=Math.min(window.innerWidth,r._right),M=Math.min(window.innerHeight,r._bottom),a=r._element.parentNode;a&&a!==document&&a!==document.documentElement&&a!==document.body;)if(a.getRootNode&&a instanceof DocumentFragment)a=a.getRootNode().host;else{if("visible"!==Ae(a,"overflow")&&(s=a.getBoundingClientRect(),c=Math.max(c,s.left),p=Math.max(p,s.top),b=Math.min(b,s.right),M=Math.min(M,s.bottom)),"fixed"===Ae(a,"position"))break;a=a.parentNode}c>=b||p>=M||(ht.left=c,ht.top=p,ht.width=b-c,ht.height=M-p,(n=Ce(ft,ht))>o&&n>u&&(u=n,l=r))}return qt.length=0,l}(e,n,i);if(!p)return null;var b,M,d,l=e.getGrid()!==p,z=0,u=0,O=0,A=-1,f=!1;for(p===n?(ft.left=o._gridX+e._marginLeft,ft.top=o._gridY+e._marginTop):(p._updateBorders(1,0,1,0),z=p._left+p._borderLeft,u=p._top+p._borderTop),d=0;d<p._items.length;d++)(b=p._items[d])._isActive&&b!==e&&(f=!0,ht.width=b._width,ht.height=b._height,ht.left=b._left+b._marginLeft+z,ht.top=b._top+b._marginTop+u,(M=Ce(ft,ht))>O&&(A=d,O=M));return l&&O<i&&(A=f?A:0,O=i),O>=i?(mt.grid=p,mt.index=A,mt.action=l?c:s,mt):null}),gt.prototype.stop=function(){if(this._isActive)if(this._isMigrating)this._finishMigration();else{var e=this._item,t=e._id;if(gt.autoScroller.removeItem(e),pe(t),be(t),Me(t),this._cancelSort(),this._isStarted){this._unbindScrollListeners();var o=e._element,n=this._getGrid(),i=n._settings.itemDraggingClass;o.parentNode!==n._element&&(n._element.appendChild(o),e._setTranslate(this._gridX,this._gridY),i&&o.clientWidth),At(o,i)}this._reset()}},gt.prototype.sort=function(e){var t=this._item;this._isActive&&t._isActive&&this._dragMoveEvent&&(!0===e?this._handleSort():de(t._id,this._handleSort))},gt.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._dragger.destroy(),gt.autoScroller.removeItem(this._item),this._isDestroyed=!0)},gt.prototype._getGrid=function(){return n[this._gridId]||null},gt.prototype._reset=function(){this._isActive=!1,this._isStarted=!1,this._container=null,this._containingBlock=null,this._dragStartEvent=null,this._dragMoveEvent=null,this._dragPrevMoveEvent=null,this._scrollEvent=null,this._scrollers=[],this._left=0,this._top=0,this._gridX=0,this._gridY=0,this._clientX=0,this._clientY=0,this._scrollDiffX=0,this._scrollDiffY=0,this._moveDiffX=0,this._moveDiffY=0,this._containerDiffX=0,this._containerDiffY=0},gt.prototype._bindScrollListeners=function(){var e,t,o=this._getGrid()._element,n=this._container,i=this._scrollers;if(i.length=0,bt(this._item._element.parentNode,i),n!==o)for(bt(o,e=[]),t=0;t<e.length;t++)i.indexOf(e[t])<0&&i.push(e[t]);for(t=0;t<i.length;t++)i[t].addEventListener("scroll",this._onScroll,Wt)},gt.prototype._unbindScrollListeners=function(){var e,t=this._scrollers;for(e=0;e<t.length;e++)t[e].removeEventListener("scroll",this._onScroll,Wt);t.length=0},gt.prototype._resolveStartPredicate=function(e){var t=this._startPredicateData;if(!(e.distance<t.distance||t.delay))return this._resetStartPredicate(),!0},gt.prototype._forceResolveStartPredicate=function(e){this._isDestroyed||1!==this._startPredicateState||(this._startPredicateState=2,this._onStart(e))},gt.prototype._finishStartPredicate=function(e){var t=this._item._element,o=Math.abs(e.deltaX)<2&&Math.abs(e.deltaY)<2&&e.deltaTime<200;this._resetStartPredicate(),o&&function(e){if("a"===e.tagName.toLowerCase()){var t=e.getAttribute("href");if(t){var o=e.getAttribute("target");o&&"_self"!==o?window.open(t,o):window.location.href=t}}}(t)},gt.prototype._resetHeuristics=function(e,t){this._blockedSortIndex=null,this._sortX1=this._sortX2=e,this._sortY1=this._sortY2=t},gt.prototype._checkHeuristics=function(e,t){var o=this._getGrid()._settings.dragSortHeuristics,n=o.minDragDistance;if(n<=0)return this._blockedSortIndex=null,!0;var i=e-this._sortX2,r=t-this._sortY2,a=n>3&&o.minBounceBackAngle>0;if(a||(this._blockedSortIndex=null),Math.abs(i)>n||Math.abs(r)>n){if(a){var s=Math.atan2(i,r),c=Math.atan2(this._sortX2-this._sortX1,this._sortY2-this._sortY1),p=Math.atan2(Math.sin(s-c),Math.cos(s-c));Math.abs(p)>o.minBounceBackAngle&&(this._blockedSortIndex=null)}return this._sortX1=this._sortX2,this._sortY1=this._sortY2,this._sortX2=e,this._sortY2=t,!0}return!1},gt.prototype._resetStartPredicate=function(){var e=this._startPredicateData;e&&(e.delayTimer&&(e.delayTimer=window.clearTimeout(e.delayTimer)),this._startPredicateData=null)},gt.prototype._handleSort=function(){if(this._isActive){var e=this._getGrid()._settings;if(!e.dragSort||!e.dragAutoScroll.sortDuringScroll&&gt.autoScroller.isItemScrolling(this._item))return this._sortX1=this._sortX2=this._gridX,this._sortY1=this._sortY2=this._gridY,this._isSortNeeded=!0,void(void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)));var t=this._checkHeuristics(this._gridX,this._gridY);if(this._isSortNeeded||t){var o=e.dragSortHeuristics.sortInterval;o<=0||this._isSortNeeded?(this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),this._checkOverlap()):void 0===this._sortTimer&&(this._sortTimer=window.setTimeout(this._handleSortDelayed,o))}}},gt.prototype._handleSortDelayed=function(){this._isSortNeeded=!0,this._sortTimer=void 0,de(this._item._id,this._handleSort)},gt.prototype._cancelSort=function(){var e;this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),e=this._item._id,ae.remove(1,Z+e)},gt.prototype._finishSort=function(){var e=this._getGrid()._settings.dragSort&&(this._isSortNeeded||void 0!==this._sortTimer);this._cancelSort(),e&&this._checkOverlap()},gt.prototype._checkOverlap=function(){if(this._isActive){var e,t,o,n,i,s,c,p,b=this._item,M=this._getGrid()._settings;(e=ue(M.dragSortPredicate)?M.dragSortPredicate(b,this._dragMoveEvent):gt.defaultSortPredicate(b,M.dragSortPredicate))&&"number"==typeof e.index&&(c=e.action===r?r:a,p=(t=b.getGrid())!==(n=e.grid||t),o=t._items.indexOf(b),i=Ge(n._items,e.index,p&&c===a?1:0),(p||i!==this._blockedSortIndex)&&(p?(this._blockedSortIndex=null,s=n._items[i],t._hasListeners(O)&&t._emit(O,{item:b,fromGrid:t,fromIndex:o,toGrid:n,toIndex:i}),n._hasListeners(f)&&n._emit(f,{item:b,fromGrid:t,fromIndex:o,toGrid:n,toIndex:i}),b._gridId=n._id,this._isMigrating=b._gridId!==this._gridId,t._items.splice(o,1),Fe(n._items,b,i),b._sortData=null,t._hasListeners(u)&&t._emit(u,{item:b,fromGrid:t,fromIndex:o,toGrid:n,toIndex:i}),n._hasListeners(A)&&n._emit(A,{item:b,fromGrid:t,fromIndex:o,toGrid:n,toIndex:i}),c===r&&s&&s.isActive()&&n._items.indexOf(s)>-1&&n.send(s,t,o,{appendTo:this._container||document.body,layoutSender:!1,layoutReceiver:!1}),t.layout(),n.layout()):o!==i&&(this._blockedSortIndex=o,(c===r?Ue:$e)(t._items,o,i),t._hasListeners(z)&&t._emit(z,{item:b,fromIndex:o,toIndex:i,action:c}),t.layout())))}},gt.prototype._finishMigration=function(){var e,t,o=this._item,n=o._dragRelease,i=o._element,r=o._isActive,a=o.getGrid(),s=a._element,c=a._settings,p=c.dragContainer||s,b=this._getGrid()._settings,M=i.parentNode,d=r?b.itemVisibleClass:b.itemHiddenClass,l=r?c.itemVisibleClass:c.itemHiddenClass;this._isMigrating=!1,this.destroy(),b.itemClass!==c.itemClass&&(At(i,b.itemClass),He(i,c.itemClass)),d!==l&&(At(i,d),He(i,l)),p!==M&&(p.appendChild(i),t=st(M,p,!0),(e=Ot(i)).x-=t.left,e.y-=t.top),o._refreshDimensions(),t=st(p,s,!0),n._containerDiffX=t.left,n._containerDiffY=t.top,o._drag=c.dragEnabled?new gt(o):null,p!==M&&o._setTranslate(e.x,e.y),o._visibility.setStyles(r?c.visibleStyles:c.hiddenStyles),n.start()},gt.prototype._preStartCheck=function(e){0===this._startPredicateState&&(this._startPredicateState=1),1===this._startPredicateState?(this._startPredicateResult=this._startPredicate(this._item,e),!0===this._startPredicateResult?(this._startPredicateState=2,this._onStart(e)):!1===this._startPredicateResult&&(this._resetStartPredicate(e),this._dragger._reset(),this._startPredicateState=0)):2===this._startPredicateState&&this._isActive&&this._onMove(e)},gt.prototype._preEndCheck=function(e){var t=2===this._startPredicateState;this._startPredicate(this._item,e),this._startPredicateState=0,t&&this._isActive&&(this._isStarted?this._onEnd(e):this.stop())},gt.prototype._onStart=function(e){var t,o,n,i=this._item;i._isActive&&(this._isActive=!0,this._dragStartEvent=e,gt.autoScroller.addItem(i),t=i._id,o=this._prepareStart,n=this._applyStart,ae.add(0,$+t,o),ae.add(2,U+t,n))},gt.prototype._prepareStart=function(){if(this._isActive){var e=this._item;if(e._isActive){var t=e._element,o=this._getGrid(),n=o._settings,i=o._element,r=n.dragContainer||i,a=ot(r),s=Ot(t),c=t.getBoundingClientRect(),p=r!==i;if(this._container=r,this._containingBlock=a,this._clientX=c.left,this._clientY=c.top,this._left=this._gridX=s.x,this._top=this._gridY=s.y,this._scrollDiffX=this._scrollDiffY=0,this._moveDiffX=this._moveDiffY=0,this._resetHeuristics(this._gridX,this._gridY),p){var b=st(a,i);this._containerDiffX=b.left,this._containerDiffY=b.top}}}},gt.prototype._applyStart=function(){if(this._isActive){var e=this._item;if(e._isActive){var t=this._getGrid(),o=e._element,n=e._dragRelease,i=e._migrate,r=this._container!==t._element;e.isPositioning()&&e._layout.stop(!0,this._left,this._top),i._isActive&&(this._left-=i._containerDiffX,this._top-=i._containerDiffY,this._gridX-=i._containerDiffX,this._gridY-=i._containerDiffY,i.stop(!0,this._left,this._top)),e.isReleasing()&&n._reset(),t._settings.dragPlaceholder.enabled&&e._dragPlaceholder.create(),this._isStarted=!0,t._emit("dragInit",e,this._dragStartEvent),r&&(o.parentNode===this._container?(this._gridX-=this._containerDiffX,this._gridY-=this._containerDiffY):(this._left+=this._containerDiffX,this._top+=this._containerDiffY,this._container.appendChild(o),e._setTranslate(this._left,this._top))),He(o,t._settings.itemDraggingClass),this._bindScrollListeners(),t._emit("dragStart",e,this._dragStartEvent)}}},gt.prototype._onMove=function(e){var t,o,n,i=this._item;i._isActive?(this._dragMoveEvent=e,t=i._id,o=this._prepareMove,n=this._applyMove,ae.add(0,V+t,o),ae.add(2,J+t,n),de(i._id,this._handleSort)):this.stop()},gt.prototype._prepareMove=function(){if(this._isActive&&this._item._isActive){var e=this._getGrid()._settings.dragAxis,t=this._dragMoveEvent,o=this._dragPrevMoveEvent||this._dragStartEvent||t;if("y"!==e){var n=t.clientX-o.clientX;this._left=this._left-this._moveDiffX+n,this._gridX=this._gridX-this._moveDiffX+n,this._clientX=this._clientX-this._moveDiffX+n,this._moveDiffX=n}if("x"!==e){var i=t.clientY-o.clientY;this._top=this._top-this._moveDiffY+i,this._gridY=this._gridY-this._moveDiffY+i,this._clientY=this._clientY-this._moveDiffY+i,this._moveDiffY=i}this._dragPrevMoveEvent=t}},gt.prototype._applyMove=function(){if(this._isActive){var e=this._item;e._isActive&&(this._moveDiffX=this._moveDiffY=0,e._setTranslate(this._left,this._top),this._getGrid()._emit("dragMove",e,this._dragMoveEvent),gt.autoScroller.updateItem(e))}},gt.prototype._onScroll=function(e){var t,o,n,i=this._item;i._isActive?(this._scrollEvent=e,t=i._id,o=this._prepareScroll,n=this._applyScroll,ae.add(0,K+t,o),ae.add(2,Q+t,n),de(i._id,this._handleSort)):this.stop()},gt.prototype._prepareScroll=function(){if(this._isActive){var e=this._item;if(e._isActive){var t=e._element,o=this._getGrid()._element,n=t.getBoundingClientRect();if(this._container!==o){var i=st(this._containingBlock,o);this._containerDiffX=i.left,this._containerDiffY=i.top}var r=this._clientX-this._moveDiffX-n.left;this._left=this._left-this._scrollDiffX+r,this._scrollDiffX=r;var a=this._clientY-this._moveDiffY-n.top;this._top=this._top-this._scrollDiffY+a,this._scrollDiffY=a,this._gridX=this._left-this._containerDiffX,this._gridY=this._top-this._containerDiffY}}},gt.prototype._applyScroll=function(){if(this._isActive){var e=this._item;e._isActive&&(this._scrollDiffX=this._scrollDiffY=0,e._setTranslate(this._left,this._top),this._getGrid()._emit("dragScroll",e,this._scrollEvent))}},gt.prototype._onEnd=function(e){var t=this._item,o=t._element,n=this._getGrid(),i=n._settings,r=t._dragRelease;t._isActive?(pe(t._id),be(t._id),Me(t._id),this._finishSort(),this._unbindScrollListeners(),r._containerDiffX=this._containerDiffX,r._containerDiffY=this._containerDiffY,this._reset(),At(o,i.itemDraggingClass),gt.autoScroller.removeItem(t),n._emit("dragEnd",t,e),this._isMigrating?this._finishMigration():r.start()):this.stop()};var vt=/^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/,Lt={};function wt(e){var t=Lt[e];return t||((t=e.replace(vt,""))!==e&&(t=t[0].toLowerCase()+t.slice(1)),Lt[e]=t,t)}function Rt(e,t){for(var o in t)e.style[o]=t[o]}var kt,Tt,St=!(!Element||!ue(Element.prototype.animate)),Et=!!(Element&&(kt=Element.prototype.animate,Tt=window.Symbol,kt&&ue(Tt)&&ue(Tt.toString)&&Tt(kt).toString().indexOf("[native code]")>-1));function Nt(e){this._element=e,this._animation=null,this._duration=0,this._easing="",this._callback=null,this._props=[],this._values=[],this._isDestroyed=!1,this._onFinish=this._onFinish.bind(this)}function Bt(e,t){var o={};for(var n in e)o[t?n:wt(n)]=e[n];return o}function Ct(e,t){return"translateX("+e+"px) translateY("+t+"px)"}function Dt(e){this._item=e,this._animation=new Nt,this._element=null,this._className="",this._didMigrate=!1,this._resetAfterLayout=!1,this._left=0,this._top=0,this._transX=0,this._transY=0,this._nextTransX=0,this._nextTransY=0,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this),this._updateDimensions=this._updateDimensions.bind(this),this._onLayoutStart=this._onLayoutStart.bind(this),this._onLayoutEnd=this._onLayoutEnd.bind(this),this._onReleaseEnd=this._onReleaseEnd.bind(this),this._onMigrate=this._onMigrate.bind(this),this._onHide=this._onHide.bind(this)}function xt(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}function Xt(e){var t=e._element,o=t.style;this._item=e,this._isActive=!1,this._isDestroyed=!1,this._isInterrupted=!1,this._currentStyles={},this._targetStyles={},this._nextLeft=0,this._nextTop=0,this._offsetLeft=0,this._offsetTop=0,this._skipNextAnimation=!1,this._animOptions={onFinish:this._finish.bind(this),duration:0,easing:0},o.left="0px",o.top="0px",e._setTranslate(0,0),this._animation=new Nt(t),this._queue="layout-"+e._id,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}function Yt(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._container=!1,this._containerDiffX=0,this._containerDiffY=0}function Pt(e){var t=e._isActive,o=e._element,n=o.children[0],i=e.getGrid()._settings;if(!n)throw new Error("No valid child element found within item element.");this._item=e,this._isDestroyed=!1,this._isHidden=!t,this._isHiding=!1,this._isShowing=!1,this._childElement=n,this._currentStyleProps=[],this._animation=new Nt(n),this._queue="visibility-"+e._id,this._finishShow=this._finishShow.bind(this),this._finishHide=this._finishHide.bind(this),o.style.display=t?"":"none",He(o,t?i.itemVisibleClass:i.itemHiddenClass),this.setStyles(t?i.visibleStyles:i.hiddenStyles)}Nt.prototype.start=function(e,t,o){if(!this._isDestroyed){var n=this._element,i=o||{};if(!St)return Rt(n,t),this._callback=ue(i.onFinish)?i.onFinish:null,void this._onFinish();var r,a,s,c=this._animation,p=this._props,b=this._values,M=i.duration||300,d=i.easing||"ease",l=!1;if(c&&(a=0,M===this._duration&&d===this._easing||(l=!0),!l)){for(r in t)if(++a,-1===(s=p.indexOf(r))||t[r]!==b[s]){l=!0;break}a!==p.length&&(l=!0)}if(l&&c.cancel(),this._callback=ue(i.onFinish)?i.onFinish:null,!c||l){for(r in p.length=b.length=0,t)p.push(r),b.push(t[r]);this._duration=M,this._easing=d,this._animation=n.animate([Bt(e,Et),Bt(t,Et)],{duration:M,easing:d}),this._animation.onfinish=this._onFinish,Rt(n,t)}}},Nt.prototype.stop=function(){!this._isDestroyed&&this._animation&&(this._animation.cancel(),this._animation=this._callback=null,this._props.length=this._values.length=0)},Nt.prototype.getCurrentStyles=function(){return yt(element,currentProps)},Nt.prototype.isAnimating=function(){return!!this._animation},Nt.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=null,this._isDestroyed=!0)},Nt.prototype._onFinish=function(){var e=this._callback;this._animation=this._callback=null,this._props.length=this._values.length=0,e&&e()},Dt.prototype._updateDimensions=function(){this.isActive()&&Rt(this._element,{width:this._item._width+"px",height:this._item._height+"px"})},Dt.prototype._onLayoutStart=function(e,t){var o=this._item;if(-1!==e.indexOf(o)){var n=o._left,i=o._top,r=this._left,a=this._top;if(this._left=n,this._top=i,t||this._didMigrate||r!==n||a!==i){var s,c,p,b=n+o._marginLeft,M=i+o._marginTop,d=o.getGrid();if(t||!(d._settings.layoutDuration>0)||this._didMigrate)return le(o._id),this._element.style[Ve]=Ct(b,M),this._animation.stop(),void(this._didMigrate&&(d.getElement().appendChild(this._element),this._didMigrate=!1));this._nextTransX=b,this._nextTransY=M,s=o._id,c=this._setupAnimation,p=this._startAnimation,ae.add(0,ee+s,c),ae.add(2,te+s,p)}}else this.reset()},Dt.prototype._setupAnimation=function(){if(this.isActive()){var e=Ot(this._element);this._transX=e.x,this._transY=e.y}},Dt.prototype._startAnimation=function(){if(this.isActive()){var e=this._animation,t=this._transX,o=this._transY,n=this._nextTransX,i=this._nextTransY;if(t!==n||o!==i){var r=this._item.getGrid()._settings,a={},s={};a[Ve]=Ct(t,o),s[Ve]=Ct(n,i),e.start(a,s,{duration:r.layoutDuration,easing:r.layoutEasing,onFinish:this._onLayoutEnd})}else e.isAnimating()&&(this._element.style[Ve]=Ct(n,i),e.stop())}},Dt.prototype._onLayoutEnd=function(){this._resetAfterLayout&&this.reset()},Dt.prototype._onReleaseEnd=function(e){if(e._id===this._item._id){if(!this._animation.isAnimating())return void this.reset();this._resetAfterLayout=!0}},Dt.prototype._onMigrate=function(e){if(e.item===this._item){var t=this._item.getGrid(),o=e.toGrid;t.off(h,this._onReleaseEnd),t.off(s,this._onLayoutStart),t.off(O,this._onMigrate),t.off(M,this._onHide),o.on(h,this._onReleaseEnd),o.on(s,this._onLayoutStart),o.on(O,this._onMigrate),o.on(M,this._onHide),this._didMigrate=!0}},Dt.prototype._onHide=function(e){e.indexOf(this._item)>-1&&this.reset()},Dt.prototype.create=function(){if(this.isActive())this._resetAfterLayout=!1;else{var e,t=this._item,o=t.getGrid(),n=o._settings,i=this._animation;this._left=t._left,this._top=t._top,e=ue(n.dragPlaceholder.createElement)?n.dragPlaceholder.createElement(t):document.createElement("div"),this._element=e,i._element=e,this._className=n.itemPlaceholderClass||"",this._className&&He(e,this._className),Rt(e,{position:"absolute",left:"0px",top:"0px",width:t._width+"px",height:t._height+"px"}),e.style[Ve]=Ct(t._left+t._marginLeft,t._top+t._marginTop),o.on(s,this._onLayoutStart),o.on(h,this._onReleaseEnd),o.on(O,this._onMigrate),o.on(M,this._onHide),ue(n.dragPlaceholder.onCreate)&&n.dragPlaceholder.onCreate(t,e),o.getElement().appendChild(e)}},Dt.prototype.reset=function(){if(this.isActive()){var e,t=this._element,o=this._item,n=o.getGrid(),i=n._settings,r=this._animation;this._resetAfterLayout=!1,le(o._id),e=o._id,ae.remove(2,oe+e),r.stop(),r._element=null,n.off(h,this._onReleaseEnd),n.off(s,this._onLayoutStart),n.off(O,this._onMigrate),n.off(M,this._onHide),this._className&&(At(t,this._className),this._className=""),t.parentNode.removeChild(t),this._element=null,ue(i.dragPlaceholder.onRemove)&&i.dragPlaceholder.onRemove(o,t)}},Dt.prototype.isActive=function(){return!!this._element},Dt.prototype.getElement=function(){return this._element},Dt.prototype.updateDimensions=function(){var e,t;this.isActive()&&(e=this._item._id,t=this._updateDimensions,ae.add(2,oe+e,t))},Dt.prototype.destroy=function(){this.reset(),this._animation.destroy(),this._item=this._animation=null},xt.prototype.start=function(){if(!this._isDestroyed&&!this._isActive){var e=this._item,t=e.getGrid(),o=t._settings;this._isActive=!0,He(e._element,o.itemReleasingClass),o.dragRelease.useDragContainer||this._placeToGrid(),t._emit("dragReleaseStart",e),t._nextLayoutData||e._layout.start(!1)}},xt.prototype.stop=function(e,t,o){if(!this._isDestroyed&&this._isActive){var n=this._item,i=n.getGrid();e||void 0!==t&&void 0!==o||(t=n._left,o=n._top);var r=this._placeToGrid(t,o);this._reset(r),e||i._emit(h,n)}},xt.prototype.isJustReleased=function(){return this._isActive&&!1===this._isPositioningStarted},xt.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},xt.prototype._placeToGrid=function(e,t){if(!this._isDestroyed){var o=this._item,n=o._element,i=o.getGrid()._element,r=!1;if(n.parentNode!==i){if(void 0===e||void 0===t){var a=Ot(n);e=a.x-this._containerDiffX,t=a.y-this._containerDiffY}i.appendChild(n),o._setTranslate(e,t),r=!0}return this._containerDiffX=0,this._containerDiffY=0,r}},xt.prototype._reset=function(e){if(!this._isDestroyed){var t=this._item,o=t.getGrid()._settings.itemReleasingClass;this._isActive=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0,o&&(e&&t._element.clientWidth,At(t._element,o))}},Xt.prototype.start=function(e,t){if(!this._isDestroyed){var o,n,i,r=this._item,a=r._dragRelease,s=r.getGrid()._settings,c=this._isActive,p=a.isJustReleased(),b=p?s.dragRelease.duration:s.layoutDuration,M=p?s.dragRelease.easing:s.layoutEasing,d=!e&&!this._skipNextAnimation&&b>0;if(c&&(se(r._id),r._emitter.burst(this._queue,!0,r)),p&&(a._isPositioningStarted=!0),ue(t)&&r._emitter.on(this._queue,t),this._skipNextAnimation=!1,!d)return this._updateOffsets(),r._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._animation.isAnimating()&&(this._animation._animation.onfinish=null),this._isActive=!0,this._animOptions.easing=M,this._animOptions.duration=b,this._isInterrupted=c,o=r._id,n=this._setupAnimation,i=this._startAnimation,ae.add(0,H+o,n),ae.add(2,j+o,i)}},Xt.prototype.stop=function(e,t,o){if(!this._isDestroyed&&this._isActive){var n=this._item;if(se(n._id),this._animation.isAnimating()){if(void 0===t||void 0===o){var i=Ot(n._element);t=i.x,o=i.y}n._setTranslate(t,o),this._animation.stop()}At(n._element,n.getGrid()._settings.itemPositioningClass),this._isActive=!1,e&&n._emitter.burst(this._queue,!0,n)}},Xt.prototype.destroy=function(){if(!this._isDestroyed){var e=this._item._element.style;this.stop(!0,0,0),this._item._emitter.clear(this._queue),this._animation.destroy(),e[Ve]="",e.left="",e.top="",this._item=null,this._currentStyles=null,this._targetStyles=null,this._animOptions=null,this._isDestroyed=!0}},Xt.prototype._updateOffsets=function(){if(!this._isDestroyed){var e=this._item,t=e._migrate,o=e._dragRelease;this._offsetLeft=o._isActive?o._containerDiffX:t._isActive?t._containerDiffX:0,this._offsetTop=o._isActive?o._containerDiffY:t._isActive?t._containerDiffY:0,this._nextLeft=this._item._left+this._offsetLeft,this._nextTop=this._item._top+this._offsetTop}},Xt.prototype._finish=function(){if(!this._isDestroyed){var e=this._item,t=e._migrate,o=e._dragRelease;e._tX=this._nextLeft,e._tY=this._nextTop,this._isActive&&(this._isActive=!1,At(e._element,e.getGrid()._settings.itemPositioningClass)),o._isActive&&o.stop(),t._isActive&&t.stop(),e._emitter.burst(this._queue,!1,e)}},Xt.prototype._setupAnimation=function(){var e=this._item;if(void 0===e._tX||void 0===e._tY){var t=Ot(e._element);e._tX=t.x,e._tY=t.y}},Xt.prototype._startAnimation=function(){var e=this._item,t=e.getGrid()._settings,o=this._animOptions.duration<=0;this._updateOffsets();var n=Math.abs(e._left-(e._tX-this._offsetLeft)),i=Math.abs(e._top-(e._tY-this._offsetTop));if(o||n<2&&i<2)return(n||i||this._isInterrupted)&&e._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._isInterrupted||He(e._element,t.itemPositioningClass),this._currentStyles[Ve]=Ct(e._tX,e._tY),this._targetStyles[Ve]=Ct(this._nextLeft,this._nextTop),e._tX=e._tY=void 0,this._animation.start(this._currentStyles,this._targetStyles,this._animOptions)},Yt.prototype.start=function(e,t,o){if(!this._isDestroyed){var n,i,r,a,s,c,p,b,M,d,l=this._item,z=l._element,h=l.isActive(),m=l.isVisible(),q=l.getGrid(),_=q._settings,W=e._settings,g=e._element,y=e._items,v=q._items.indexOf(l),L=o||document.body;if("number"==typeof t)n=Ge(y,t,1);else{if(!(i=e.getItem(t)))return;n=y.indexOf(i)}(l.isPositioning()||this._isActive||l.isReleasing())&&(p=(c=Ot(z)).x,b=c.y),l.isPositioning()&&l._layout.stop(!0,p,b),this._isActive&&(p-=this._containerDiffX,b-=this._containerDiffY,this.stop(!0,p,b)),l.isReleasing()&&(p-=l._dragRelease._containerDiffX,b-=l._dragRelease._containerDiffY,l._dragRelease.stop(!0,p,b)),l._visibility.stop(!0),l._drag&&l._drag.destroy(),q._hasListeners(O)&&q._emit(O,{item:l,fromGrid:q,fromIndex:v,toGrid:e,toIndex:n}),e._hasListeners(f)&&e._emit(f,{item:l,fromGrid:q,fromIndex:v,toGrid:e,toIndex:n}),_.itemClass!==W.itemClass&&(At(z,_.itemClass),He(z,W.itemClass)),(M=m?_.itemVisibleClass:_.itemHiddenClass)!==(d=m?W.itemVisibleClass:W.itemHiddenClass)&&(At(z,M),He(z,d)),q._items.splice(v,1),Fe(y,l,n),l._gridId=e._id,h?L!==(r=z.parentNode)&&(L.appendChild(z),a=st(L,r,!0),c||(p=(c=Ot(z)).x,b=c.y),l._setTranslate(p+a.left,b+a.top)):g.appendChild(z),l._visibility.setStyles(m?W.visibleStyles:W.hiddenStyles),h&&(s=st(L,g,!0)),l._refreshDimensions(),l._sortData=null,l._drag=W.dragEnabled?new gt(l):null,h?(this._isActive=!0,this._container=L,this._containerDiffX=s.left,this._containerDiffY=s.top):(this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0),q._hasListeners(u)&&q._emit(u,{item:l,fromGrid:q,fromIndex:v,toGrid:e,toIndex:n}),e._hasListeners(A)&&e._emit(A,{item:l,fromGrid:q,fromIndex:v,toGrid:e,toIndex:n})}},Yt.prototype.stop=function(e,t,o){if(!this._isDestroyed&&this._isActive){var n,i=this._item,r=i._element,a=i.getGrid()._element;this._container!==a&&(void 0!==t&&void 0!==o||(e?(t=(n=Ot(r)).x-this._containerDiffX,o=n.y-this._containerDiffY):(t=i._left,o=i._top)),a.appendChild(r),i._setTranslate(t,o)),this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0}},Yt.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},Pt.prototype.show=function(e,t){if(!this._isDestroyed){var o=this._item,n=o._element,i=ue(t)?t:null,r=o.getGrid()._settings;this._isShowing||this._isHidden?!this._isShowing||e?(this._isShowing||(o._emitter.burst(this._queue,!0,o),At(n,r.itemHiddenClass),He(n,r.itemVisibleClass),this._isHiding||(n.style.display="")),i&&o._emitter.on(this._queue,i),this._isShowing=!0,this._isHiding=this._isHidden=!1,this._startAnimation(!0,e,this._finishShow)):i&&o._emitter.on(this._queue,i):i&&i(!1,o)}},Pt.prototype.hide=function(e,t){if(!this._isDestroyed){var o=this._item,n=o._element,i=ue(t)?t:null,r=o.getGrid()._settings;this._isHiding||!this._isHidden?!this._isHiding||e?(this._isHiding||(o._emitter.burst(this._queue,!0,o),He(n,r.itemHiddenClass),At(n,r.itemVisibleClass)),i&&o._emitter.on(this._queue,i),this._isHidden=this._isHiding=!0,this._isShowing=!1,this._startAnimation(!1,e,this._finishHide)):i&&o._emitter.on(this._queue,i):i&&i(!1,o)}},Pt.prototype.stop=function(e){if(!this._isDestroyed&&(this._isHiding||this._isShowing)){var t=this._item;ce(t._id),this._animation.stop(),e&&t._emitter.burst(this._queue,!0,t)}},Pt.prototype.setStyles=function(e){var t=this._childElement,o=this._currentStyleProps;for(var n in this._removeCurrentStyles(),e)o.push(n),t.style[n]=e[n]},Pt.prototype.destroy=function(){if(!this._isDestroyed){var e=this._item,t=e._element,o=e.getGrid()._settings;this.stop(!0),e._emitter.clear(this._queue),this._animation.destroy(),this._removeCurrentStyles(),At(t,o.itemVisibleClass),At(t,o.itemHiddenClass),t.style.display="",this._isHiding=this._isShowing=!1,this._isDestroyed=this._isHidden=!0}},Pt.prototype._startAnimation=function(e,t,o){if(!this._isDestroyed){var n,i=this._item,r=this._animation,a=this._childElement,s=i.getGrid()._settings,c=e?s.visibleStyles:s.hiddenStyles,p=e?s.showDuration:s.hideDuration,b=e?s.showEasing:s.hideEasing,M=t||p<=0;if(c){if(ce(i._id),M)return Rt(a,c),r.stop(),void(o&&o());var d,l,z;r.isAnimating()&&(r._animation.onfinish=null),d=i._id,l=function(){n=yt(a,c)},z=function(){r.start(n,c,{duration:p,easing:b,onFinish:o})},ae.add(0,F+d,l),ae.add(2,G+d,z)}else o&&o()}},Pt.prototype._finishShow=function(){this._isHidden||(this._isShowing=!1,this._item._emitter.burst(this._queue,!1,this._item))},Pt.prototype._finishHide=function(){if(this._isHidden){var e=this._item;this._isHiding=!1,e._layout.stop(!0,0,0),e._element.style.display="none",e._emitter.burst(this._queue,!1,e)}},Pt.prototype._removeCurrentStyles=function(){for(var e=this._childElement,t=this._currentStyleProps,o=0;o<t.length;o++)e.style[t[o]]="";t.length=0};var It=0;function Ht(){return++It}function jt(e,t,o){var n=e._settings;if(i){if(i.has(t))throw new Error("You can only create one Muuri Item per element!");i.set(t,this)}this._id=Ht(),this._gridId=e._id,this._element=t,this._isDestroyed=!1,this._left=0,this._top=0,this._width=0,this._height=0,this._marginLeft=0,this._marginRight=0,this._marginTop=0,this._marginBottom=0,this._tX=void 0,this._tY=void 0,this._sortData=null,this._emitter=new W,t.parentNode!==e._element&&e._element.appendChild(t),He(t,n.itemClass),"boolean"!=typeof o&&(o="none"!==Ae(t,"display")),this._isActive=o,this._visibility=new Pt(this),this._layout=new Xt(this),this._migrate=new Yt(this),this._drag=n.dragEnabled?new gt(this):null,this._dragRelease=new xt(this),this._dragPlaceholder=new Dt(this)}function Ft(e){var t,o,n,i,r,a=.001,s=.5;function c(e){return((1e3*e+.5|0)/10|0)/100}function p(){this.currentRects=[],this.nextRects=[],this.rectTarget={},this.rectStore=[],this.slotSizes=[],this.rectId=0,this.slotIndex=-1,this.slotData={left:0,top:0,width:0,height:0},this.sortRectsLeftTop=this.sortRectsLeftTop.bind(this),this.sortRectsTopLeft=this.sortRectsTopLeft.bind(this)}if(p.prototype.computeLayout=function(e,t){var o,n,i,r,a,s,p=e.items,b=e.slots,M=!!(1&t),d=!!(2&t),l=!!(4&t),z=!!(8&t),u=!!(16&t),O="number"==typeof p[0];if(!p.length)return e;for(n=O?2:1,o=0;o<p.length;o+=n)O?(r=p[o],a=p[o+1]):(r=(i=p[o])._width+i._marginLeft+i._marginRight,a=i._height+i._marginTop+i._marginBottom),u&&(r=c(r),a=c(a)),s=this.computeNextSlot(e,r,a,M,d),d?s.left+s.width>e.width&&(e.width=s.left+s.width):s.top+s.height>e.height&&(e.height=s.top+s.height),b[++this.slotIndex]=s.left,b[++this.slotIndex]=s.top,(l||z)&&this.slotSizes.push(s.width,s.height);if(l)for(o=0;o<b.length;o+=2)b[o]=e.width-(b[o]+this.slotSizes[o]);if(z)for(o=1;o<b.length;o+=2)b[o]=e.height-(b[o]+this.slotSizes[o]);return this.slotSizes.length=0,this.currentRects.length=0,this.nextRects.length=0,this.rectStore.length=0,this.rectId=0,this.slotIndex=-1,e},p.prototype.computeNextSlot=function(e,t,o,n,i){var r,c,p,b,M,d=this.slotData,l=this.currentRects,z=this.nextRects,u=!1;for(z.length=0,d.left=null,d.top=null,d.width=t,d.height=o,b=0;b<l.length;b++)if((c=l[b])&&(r=this.getRect(c),d.width<=r.width+a&&d.height<=r.height+a)){d.left=r.left,d.top=r.top;break}if(null===d.left&&(i?(d.left=e.width,d.top=0):(d.left=0,d.top=e.height),n||(u=!0)),!i&&d.top+d.height>e.height+a&&(d.left>s&&z.push(this.addRect(0,e.height,d.left,1/0)),d.left+d.width<e.width-s&&z.push(this.addRect(d.left+d.width,e.height,e.width-d.left-d.width,1/0)),e.height=d.top+d.height),i&&d.left+d.width>e.width+a&&(d.top>s&&z.push(this.addRect(e.width,0,1/0,d.top)),d.top+d.height<e.height-s&&z.push(this.addRect(e.width,d.top+d.height,1/0,e.height-d.top-d.height)),e.width=d.left+d.width),!u)for(n&&(b=0);b<l.length;b++)if(c=l[b])for(r=this.getRect(c),p=this.splitRect(r,d),M=0;M<p.length;M++)c=p[M],r=this.getRect(c),(i?r.left+a<e.width-a:r.top+a<e.height-a)&&z.push(c);return z.length>1&&this.purgeRects(z).sort(i?this.sortRectsLeftTop:this.sortRectsTopLeft),this.currentRects=z,this.nextRects=l,d},p.prototype.addRect=function(e,t,o,n){var i=++this.rectId;return this.rectStore[i]=e||0,this.rectStore[++this.rectId]=t||0,this.rectStore[++this.rectId]=o||0,this.rectStore[++this.rectId]=n||0,i},p.prototype.getRect=function(e,t){return t||(t=this.rectTarget),t.left=this.rectStore[e]||0,t.top=this.rectStore[++e]||0,t.width=this.rectStore[++e]||0,t.height=this.rectStore[++e]||0,t},p.prototype.splitRect=(t=[],o=0,n=0,function(e,i){return t.length=0,e.left+e.width<=i.left+a||i.left+i.width<=e.left+a||e.top+e.height<=i.top+a||i.top+i.height<=e.top+a?(t.push(this.addRect(e.left,e.top,e.width,e.height)),t):((o=i.left-e.left)>=s&&t.push(this.addRect(e.left,e.top,o,e.height)),(o=e.left+e.width-(i.left+i.width))>=s&&t.push(this.addRect(i.left+i.width,e.top,o,e.height)),(n=i.top-e.top)>=s&&t.push(this.addRect(e.left,e.top,e.width,n)),(n=e.top+e.height-(i.top+i.height))>=s&&t.push(this.addRect(e.left,i.top+i.height,e.width,n)),t)}),p.prototype.isRectAWithinRectB=function(e,t){return e.left+a>=t.left&&e.top+a>=t.top&&e.left+e.width-a<=t.left+t.width&&e.top+e.height-a<=t.top+t.height},p.prototype.purgeRects=(i={},r={},function(e){for(var t,o=e.length;o--;)if(t=e.length,e[o])for(this.getRect(e[o],i);t--;)if(e[t]&&o!==t&&(this.getRect(e[t],r),this.isRectAWithinRectB(i,r))){e[o]=0;break}return e}),p.prototype.sortRectsTopLeft=function(){var e={},t={};return function(o,n){return this.getRect(o,e),this.getRect(n,t),e.top<t.top&&e.top+a<t.top?-1:e.top>t.top&&e.top-a>t.top?1:e.left<t.left&&e.left+a<t.left?-1:e.left>t.left&&e.left-a>t.left?1:0}}(),p.prototype.sortRectsLeftTop=function(){var e={},t={};return function(o,n){return this.getRect(o,e),this.getRect(n,t),e.left<t.left&&e.left+a<t.left?-1:e.left>t.left&&e.left-a<t.left?1:e.top<t.top&&e.top+a<t.top?-1:e.top>t.top&&e.top-a>t.top?1:0}}(),e){var b=new p;self.onmessage=function(e){var t=new Float32Array(e.data),o=t.subarray(4,t.length),n=new Float32Array(o.length),i=t[3],r={items:o,slots:n,width:t[1],height:t[2]};b.computeLayout(r,i),t[1]=r.width,t[2]=r.height,t.set(r.slots,4),postMessage(t.buffer,[t.buffer])}}return p}jt.prototype.getGrid=function(){return n[this._gridId]},jt.prototype.getElement=function(){return this._element},jt.prototype.getWidth=function(){return this._width},jt.prototype.getHeight=function(){return this._height},jt.prototype.getMargin=function(){return{left:this._marginLeft,right:this._marginRight,top:this._marginTop,bottom:this._marginBottom}},jt.prototype.getPosition=function(){return{left:this._left,top:this._top}},jt.prototype.isActive=function(){return this._isActive},jt.prototype.isVisible=function(){return!!this._visibility&&!this._visibility._isHidden},jt.prototype.isShowing=function(){return!(!this._visibility||!this._visibility._isShowing)},jt.prototype.isHiding=function(){return!(!this._visibility||!this._visibility._isHiding)},jt.prototype.isPositioning=function(){return!(!this._layout||!this._layout._isActive)},jt.prototype.isDragging=function(){return!(!this._drag||!this._drag._isActive)},jt.prototype.isReleasing=function(){return!(!this._dragRelease||!this._dragRelease._isActive)},jt.prototype.isDestroyed=function(){return this._isDestroyed},jt.prototype._refreshDimensions=function(e){if(!(this._isDestroyed||!0!==e&&this._visibility._isHidden)){var t=this._element,o=this._dragPlaceholder,n=t.getBoundingClientRect();this._width=n.width,this._height=n.height,this._marginLeft=Math.max(0,fe(t,"margin-left")),this._marginRight=Math.max(0,fe(t,"margin-right")),this._marginTop=Math.max(0,fe(t,"margin-top")),this._marginBottom=Math.max(0,fe(t,"margin-bottom")),o&&o.updateDimensions()}},jt.prototype._refreshSortData=function(){if(!this._isDestroyed){var e,t=this._sortData={},o=this.getGrid()._settings.sortData;for(e in o)t[e]=o[e](this,this._element)}},jt.prototype._addToLayout=function(e,t){!0!==this._isActive&&(this._isActive=!0,this._left=e||0,this._top=t||0)},jt.prototype._removeFromLayout=function(){!1!==this._isActive&&(this._isActive=!1,this._left=0,this._top=0)},jt.prototype._canSkipLayout=function(e,t){return this._left===e&&this._top===t&&!this._migrate._isActive&&!this._layout._skipNextAnimation&&!this._dragRelease.isJustReleased()},jt.prototype._setTranslate=function(e,t){return(this._tX!==e||this._tY!==t)&&(this._tX=e,this._tY=t,this._element.style[Ve]=Ct(e,t),!0)},jt.prototype._destroy=function(e){if(!this._isDestroyed){var t=this._element,o=this.getGrid()._settings;this._dragPlaceholder.destroy(),this._dragRelease.destroy(),this._migrate.destroy(),this._layout.destroy(),this._visibility.destroy(),this._drag&&this._drag.destroy(),this._emitter.destroy(),At(t,o.itemClass),e&&t.parentNode.removeChild(t),i&&i.delete(t),this._isActive=!1,this._isDestroyed=!0}};var Gt=Ft(),$t=null,Ut=[];function Vt(e,t){if(this._options=0,this._processor=null,this._layoutQueue=[],this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={},this._workers=[],this._onWorkerMessage=this._onWorkerMessage.bind(this),this.setOptions(t),(e="number"==typeof e?Math.max(0,e):0)&&window.Worker&&window.URL&&window.Blob)try{this._workers=function(e,t){var o=[];if(e>0){$t||($t=URL.createObjectURL(new Blob(["("+Ft.toString()+")(true)"],{type:"application/javascript"})));for(var n,i=0;i<e;i++)n=new Worker($t),t&&(n.onmessage=t),o.push(n),Ut.push(n)}return o}(e,this._onWorkerMessage)}catch(e){this._processor=new Gt}else this._processor=new Gt}Vt.prototype._sendToWorker=function(){if(this._layoutQueue.length&&this._workers.length){var e=this._layoutQueue.shift(),t=this._workers.pop(),o=this._layoutWorkerData[e];delete this._layoutWorkerData[e],this._layoutWorkers[e]=t,t.postMessage(o.buffer,[o.buffer])}},Vt.prototype._onWorkerMessage=function(e){var t=new Float32Array(e.data),o=t[0],n=this._layouts[o],i=this._layoutCallbacks[o],r=this._layoutWorkers[o];n&&delete this._layouts[o],i&&delete this._layoutCallbacks[o],r&&delete this._layoutWorkers[o],n&&i&&(n.width=t[1],n.height=t[2],n.slots=t.subarray(4,t.length),this._finalizeLayout(n),i(n)),r&&(this._workers.push(r),this._sendToWorker())},Vt.prototype._finalizeLayout=function(e){var t=e._grid,o=2&e._settings,n="border-box"===t._boxSizing;return delete e._grid,delete e._settings,e.styles={},o?e.styles.width=(n?e.width+t._borderLeft+t._borderRight:e.width)+"px":e.styles.height=(n?e.height+t._borderTop+t._borderBottom:e.height)+"px",e},Vt.prototype.setOptions=function(e){var t,o,n,i,r;e&&(t="boolean"==typeof e.fillGaps?e.fillGaps?1:0:1&this._options,o="boolean"==typeof e.horizontal?e.horizontal?2:0:2&this._options,n="boolean"==typeof e.alignRight?e.alignRight?4:0:4&this._options,i="boolean"==typeof e.alignBottom?e.alignBottom?8:0:8&this._options,r="boolean"==typeof e.rounding?e.rounding?16:0:16&this._options,this._options=t|o|n|i|r)},Vt.prototype.createLayout=function(e,t,o,n,i,r){if(this._layouts[t])throw new Error("A layout with the provided id is currently being processed.");var a=2&this._options,s={id:t,items:o,slots:null,width:a?0:n,height:a?i:0,_grid:e,_settings:this._options};if(!o.length)return s.slots=[],this._finalizeLayout(s),void r(s);if(this._processor)return s.slots=window.Float32Array?new Float32Array(2*o.length):new Array(2*o.length),this._processor.computeLayout(s,s._settings),this._finalizeLayout(s),void r(s);var c,p,b,M=new Float32Array(4+2*o.length);for(M[0]=t,M[1]=s.width,M[2]=s.height,M[3]=s._settings,c=0,p=3;c<o.length;c++)b=o[c],M[++p]=b._width+b._marginLeft+b._marginRight,M[++p]=b._height+b._marginTop+b._marginBottom;return this._layoutQueue.push(t),this._layouts[t]=s,this._layoutCallbacks[t]=r,this._layoutWorkerData[t]=M,this._sendToWorker(),this.cancelLayout.bind(this,t)},Vt.prototype.cancelLayout=function(e){if(this._layouts[e]&&(delete this._layouts[e],delete this._layoutCallbacks[e],this._layoutWorkerData[e])){delete this._layoutWorkerData[e];var t=this._layoutQueue.indexOf(e);t>-1&&this._layoutQueue.splice(t,1)}},Vt.prototype.destroy=function(){for(var e in this._layoutWorkers)this._workers.push(this._layoutWorkers[e]);!function(e){for(var t,o,n=0;n<e.length;n++)(t=e[n]).onmessage=null,t.onerror=null,t.onmessageerror=null,t.terminate(),(o=Ut.indexOf(t))>-1&&Ut.splice(o,1);$t&&!Ut.length&&(URL.revokeObjectURL($t),$t=null)}(this._workers),this._workers.length=0,this._layoutQueue.length=0,this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={}};var Jt=0;function Kt(e){var t=Object.prototype.toString.call(e);return"[object HTMLCollection]"===t||"[object NodeList]"===t}var Qt=Object.prototype.toString;function Zt(e){return"object"==typeof e&&"[object Object]"===Qt.call(e)}function eo(){}var to,oo="number",no="string",io="instant",ro=0;function ao(e,t){if(typeof e===no&&(e=document.querySelector(e)),!(e.getRootNode?e.getRootNode({composed:!0})===document:document.body.contains(e))||e===document.documentElement)throw new Error("Container element must be an existing DOM element.");var o,i,r=function(e,t){var o=so({},e);return t&&(o=so(o,t)),t&&t.visibleStyles?o.visibleStyles=t.visibleStyles:e&&e.visibleStyles&&(o.visibleStyles=e.visibleStyles),t&&t.hiddenStyles?o.hiddenStyles=t.hiddenStyles:e&&e.hiddenStyles&&(o.hiddenStyles=e.hiddenStyles),o}(ao.defaultOptions,t);r.visibleStyles=co(r.visibleStyles),r.hiddenStyles=co(r.hiddenStyles),ue(r.dragSort)||(r.dragSort=!!r.dragSort),this._id=Ht(),this._element=e,this._settings=r,this._isDestroyed=!1,this._items=[],this._layout={id:0,items:[],slots:[]},this._isLayoutFinished=!0,this._nextLayoutData=null,this._emitter=new W,this._onLayoutDataReceived=this._onLayoutDataReceived.bind(this),n[this._id]=this,He(e,r.containerClass),o=this,typeof(i=r.layoutOnResize)!==oo&&(i=!0===i?0:-1),i>=0&&(o._resizeHandler=function(e,t){var o=++Jt,n=0,i=0,r=!1,a=function(t){r||(i&&(n-=t-i),i=t,n>0?function(e,t){ae.add(0,re+e,t)}(o,a):(n=i=0,e()))};return function(s){if(!r){if(!(t<=0))return!0===s?(r=!0,n=i=0,a=void 0,void function(e){ae.remove(0,re+e)}(o)):void(n<=0?(n=t,a(0)):n=t);!0!==s&&e()}}}(function(){o.refreshItems().layout()},i),window.addEventListener("resize",o._resizeHandler)),this.add(function(e,t){if("*"===t)return e.children;if(typeof t===no){for(var o=[],n=e.children,i=0;i<n.length;i++)Ie(n[i],t)&&o.push(n[i]);return o}return Array.isArray(t)||Kt(t)?t:[]}(e,r.items),{layout:!1}),r.layoutOnInit&&this.layout(!0)}function so(e,t){var o,n,i,r=Object.keys(t),a=r.length;for(i=0;i<a;i++)o=Zt(t[n=r[i]]),Zt(e[n])&&o?e[n]=so(so({},e[n]),t[n]):o?e[n]=so({},t[n]):Array.isArray(t[n])?e[n]=t[n].slice(0):e[n]=t[n];return e}function co(e){var t,o,n={},i=document.documentElement.style;for(t in e)e[t]&&(o=w(i,t))&&(n[o]=e[t]);return n}function po(e){for(var t={},o=0;o<e.length;o++)t[e[o]._id]=o;return t}function bo(e,t,o){return e[t._id]-e[o._id]}ao.Item=jt,ao.ItemLayout=Xt,ao.ItemVisibility=Pt,ao.ItemMigrate=Yt,ao.ItemDrag=gt,ao.ItemDragRelease=xt,ao.ItemDragPlaceholder=Dt,ao.Emitter=W,ao.Animator=Nt,ao.Dragger=x,ao.Packer=Vt,ao.AutoScroller=Xe,ao.defaultPacker=new Vt(2),ao.defaultOptions={items:"*",showDuration:300,showEasing:"ease",hideDuration:300,hideEasing:"ease",visibleStyles:{opacity:"1",transform:"scale(1)"},hiddenStyles:{opacity:"0",transform:"scale(0.5)"},layout:{fillGaps:!1,horizontal:!1,alignRight:!1,alignBottom:!1,rounding:!1},layoutOnResize:150,layoutOnInit:!0,layoutDuration:300,layoutEasing:"ease",sortData:null,dragEnabled:!1,dragContainer:null,dragHandle:null,dragStartPredicate:{distance:0,delay:0},dragAxis:"xy",dragSort:!0,dragSortHeuristics:{sortInterval:100,minDragDistance:10,minBounceBackAngle:1},dragSortPredicate:{threshold:50,action:a,migrateAction:a},dragRelease:{duration:300,easing:"ease",useDragContainer:!0},dragCssProps:{touchAction:"none",userSelect:"none",userDrag:"none",tapHighlightColor:"rgba(0, 0, 0, 0)",touchCallout:"none",contentZooming:"none"},dragPlaceholder:{enabled:!1,createElement:null,onCreate:null,onRemove:null},dragAutoScroll:{targets:[],handle:null,threshold:50,safeZone:.2,speed:Xe.smoothSpeed(1e3,2e3,2500),sortDuringScroll:!0,smoothStop:!1,onStart:null,onStop:null},containerClass:"muuri",itemClass:"muuri-item",itemVisibleClass:"muuri-item-shown",itemHiddenClass:"muuri-item-hidden",itemPositioningClass:"muuri-item-positioning",itemDraggingClass:"muuri-item-dragging",itemReleasingClass:"muuri-item-releasing",itemPlaceholderClass:"muuri-item-placeholder"},ao.prototype.on=function(e,t){return this._emitter.on(e,t),this},ao.prototype.off=function(e,t){return this._emitter.off(e,t),this},ao.prototype.getElement=function(){return this._element},ao.prototype.getItem=function(e){if(this._isDestroyed||!e&&0!==e)return null;if(typeof e===oo)return this._items[e>-1?e:this._items.length+e]||null;if(e instanceof jt)return e._gridId===this._id?e:null;if(i){var t=i.get(e);return t&&t._gridId===this._id?t:null}for(var o=0;o<this._items.length;o++)if(this._items[o]._element===e)return this._items[o];return null},ao.prototype.getItems=function(e){if(this._isDestroyed||void 0===e)return this._items.slice(0);var t,o,n=[];if(Array.isArray(e)||Kt(e))for(t=0;t<e.length;t++)(o=this.getItem(e[t]))&&n.push(o);else(o=this.getItem(e))&&n.push(o);return n},ao.prototype.refreshItems=function(e,t){if(this._isDestroyed)return this;var o,n,i,r,a=e||this._items;if(!0===t)for(r=[],o=0;o<a.length;o++)(n=a[o]).isVisible()||n.isHiding()||((i=n.getElement().style).visibility="hidden",i.display="",r.push(i));for(o=0;o<a.length;o++)a[o]._refreshDimensions(t);if(!0===t){for(o=0;o<r.length;o++)(i=r[o]).visibility="",i.display="none";r.length=0}return this},ao.prototype.refreshSortData=function(e){if(this._isDestroyed)return this;for(var t=e||this._items,o=0;o<t.length;o++)t[o]._refreshSortData();return this},ao.prototype.synchronize=function(){if(this._isDestroyed)return this;var e,t,o=this._items;if(!o.length)return this;for(var n=0;n<o.length;n++)(t=o[n]._element).parentNode===this._element&&(e=e||document.createDocumentFragment()).appendChild(t);return e?(this._element.appendChild(e),this._emit("synchronize"),this):this},ao.prototype.layout=function(e,t){if(this._isDestroyed)return this;var o=this._nextLayoutData;o&&ue(o.cancel)&&o.cancel();var n=ro=ro%16777216+1;this._nextLayoutData={id:n,instant:e,onFinish:t,cancel:null};for(var i=this._items,r=[],a=0;a<i.length;a++)i[a]._isActive&&r.push(i[a]);this._refreshDimensions();var s,c=this._width-this._borderLeft-this._borderRight,p=this._height-this._borderTop-this._borderBottom,b=this._settings.layout;return ue(b)?s=b(this,n,r,c,p,this._onLayoutDataReceived):(ao.defaultPacker.setOptions(b),s=ao.defaultPacker.createLayout(this,n,r,c,p,this._onLayoutDataReceived)),ue(s)&&this._nextLayoutData&&this._nextLayoutData.id===n&&(this._nextLayoutData.cancel=s),this},ao.prototype.add=function(e,t){if(this._isDestroyed||!e)return[];var o,n=Kt(o=e)?Array.prototype.slice.call(o):Array.prototype.concat(o);if(!n.length)return n;var i,r,a,s,c=t||{},p=c.layout?c.layout:void 0===c.layout,b=this._items,M=!1;for(s=0;s<n.length;s++)(r=n[s]).parentNode!==this._element&&(i=i||document.createDocumentFragment()).appendChild(r);for(i&&this._element.appendChild(i),s=0;s<n.length;s++)r=n[s],(a=n[s]=new jt(this,r,c.active))._isActive&&(M=!0,a._layout._skipNextAnimation=!0);for(s=0;s<n.length;s++)(a=n[s])._refreshDimensions(),a._refreshSortData();return Fe(b,n,c.index),this._hasListeners("add")&&this._emit("add",n.slice(0)),M&&p&&this.layout(p===io,ue(p)?p:void 0),n},ao.prototype.remove=function(e,t){if(this._isDestroyed||!e.length)return[];var o,n,i,r=t||{},a=r.layout?r.layout:void 0===r.layout,s=!1,c=this.getItems(),p=[],M=[];for(i=0;i<e.length;i++)(n=e[i])._isDestroyed||-1!==(o=this._items.indexOf(n))&&(n._isActive&&(s=!0),p.push(n),M.push(c.indexOf(n)),n._destroy(r.removeElements),this._items.splice(o,1));return this._hasListeners(b)&&this._emit(b,p.slice(0),M),s&&a&&this.layout(a===io,ue(a)?a:void 0),p},ao.prototype.show=function(e,t){return!this._isDestroyed&&e.length&&this._setItemsVisibility(e,!0,t),this},ao.prototype.hide=function(e,t){return!this._isDestroyed&&e.length&&this._setItemsVisibility(e,!1,t),this},ao.prototype.filter=function(e,t){if(this._isDestroyed||!this._items.length)return this;var o,n,i=[],r=[],a=typeof e===no,s=ue(e),c=t||{},p=!0===c.instant,b=c.syncWithLayout,M=c.layout?c.layout:void 0===c.layout,l=ue(c.onFinish)?c.onFinish:null,z=-1,u=eo;if(l&&(u=function(){++z&&l(i.slice(0),r.slice(0))}),s||a)for(n=0;n<this._items.length;n++)o=this._items[n],(s?e(o):Ie(o._element,e))?i.push(o):r.push(o);return i.length?this.show(i,{instant:p,syncWithLayout:b,onFinish:u,layout:!1}):u(),r.length?this.hide(r,{instant:p,syncWithLayout:b,onFinish:u,layout:!1}):u(),(i.length||r.length)&&(this._hasListeners(d)&&this._emit(d,i.slice(0),r.slice(0)),M&&this.layout(M===io,ue(M)?M:void 0)),this},ao.prototype.sort=function(){var e,t,o,n;function i(i,r){for(var a,s,c,p,b=0,M=0;M<e.length;M++)if(a=e[M][0],s=e[M][1],c=(i._sortData?i:i._refreshSortData())._sortData[a],p=(r._sortData?r:r._refreshSortData())._sortData[a],b="desc"===s||!s&&t?p<c?-1:p>c?1:0:c<p?-1:c>p?1:0)return b;return b||(n||(n=po(o)),b=t?bo(n,r,i):bo(n,i,r)),b}function r(i,r){var a=t?-e(i,r):e(i,r);return a||(n||(n=po(o)),a=t?bo(n,r,i):bo(n,i,r)),a}return function(a,s){if(this._isDestroyed||this._items.length<2)return this;var c=this._items,p=s||{},b=p.layout?p.layout:void 0===p.layout;if(t=!!p.descending,o=c.slice(0),n=null,ue(a))e=a,c.sort(r);else if(typeof a===no)e=a.trim().split(" ").filter(function(e){return e}).map(function(e){return e.split(":")}),c.sort(i);else{if(!Array.isArray(a))throw e=t=o=n=null,new Error("Invalid comparer argument provided.");c.length=0,c.push.apply(c,a)}return this._hasListeners(l)&&this._emit(l,c.slice(0),o),b&&this.layout(b===io,ue(b)?b:void 0),e=t=o=n=null,this}}(),ao.prototype.move=function(e,t,o){if(this._isDestroyed||this._items.length<2)return this;var n,i,s=this._items,c=o||{},p=c.layout?c.layout:void 0===c.layout,b=c.action===r,M=b?r:a,d=this.getItem(e),l=this.getItem(t);return d&&l&&d!==l&&(n=s.indexOf(d),i=s.indexOf(l),b?Ue(s,n,i):$e(s,n,i),this._hasListeners(z)&&this._emit(z,{item:d,fromIndex:n,toIndex:i,action:M}),p&&this.layout(p===io,ue(p)?p:void 0)),this},ao.prototype.send=function(e,t,o,n){if(this._isDestroyed||t._isDestroyed||this===t)return this;if(!(e=this.getItem(e)))return this;var i=n||{},r=i.appendTo||document.body,a=i.layoutSender?i.layoutSender:void 0===i.layoutSender,s=i.layoutReceiver?i.layoutReceiver:void 0===i.layoutReceiver;return e._migrate.start(t,o,r),e._migrate._isActive&&e._isActive&&(a&&this.layout(a===io,ue(a)?a:void 0),s&&t.layout(s===io,ue(s)?s:void 0)),this},ao.prototype.destroy=function(e){if(this._isDestroyed)return this;var t,o,i,r=this._element,a=this._items.slice(0),s=this._layout&&this._layout.styles||{};for((i=this)._resizeHandler&&(i._resizeHandler(!0),window.removeEventListener("resize",i._resizeHandler),i._resizeHandler=null),t=0;t<a.length;t++)a[t]._destroy(e);for(o in this._items.length=0,At(r,this._settings.containerClass),s)r.style[o]="";return this._emit("destroy"),this._emitter.destroy(),delete n[this._id],this._isDestroyed=!0,this},ao.prototype._emit=function(){this._isDestroyed||this._emitter.emit.apply(this._emitter,arguments)},ao.prototype._hasListeners=function(e){return!this._isDestroyed&&this._emitter.countListeners(e)>0},ao.prototype._updateBoundingRect=function(){var e=this._element.getBoundingClientRect();this._width=e.width,this._height=e.height,this._left=e.left,this._top=e.top,this._right=e.right,this._bottom=e.bottom},ao.prototype._updateBorders=function(e,t,o,n){var i=this._element;e&&(this._borderLeft=fe(i,"border-left-width")),t&&(this._borderRight=fe(i,"border-right-width")),o&&(this._borderTop=fe(i,"border-top-width")),n&&(this._borderBottom=fe(i,"border-bottom-width"))},ao.prototype._refreshDimensions=function(){this._updateBoundingRect(),this._updateBorders(1,1,1,1),this._boxSizing=Ae(this._element,"box-sizing")},ao.prototype._onLayoutDataReceived=(to=[],function(e){if(!this._isDestroyed&&this._nextLayoutData&&this._nextLayoutData.id===e.id){var t,o,n,i,r=this,a=this._nextLayoutData.instant,b=this._nextLayoutData.onFinish,M=e.items.length,d=M;for(this._nextLayoutData=null,!this._isLayoutFinished&&this._hasListeners(p)&&this._emit(p,this._layout.items.slice(0)),this._layout=e,to.length=0,i=0;i<M;i++)(t=e.items[i])?(o=e.slots[2*i],n=e.slots[2*i+1],t._canSkipLayout(o,n)?--d:(t._left=o,t._top=n,t.isActive()&&!t.isDragging()?to.push(t):--d)):--d;if(e.styles&&Rt(this._element,e.styles),!this._hasListeners(s)||(this._emit(s,e.items.slice(0),!0===a),this._layout.id===e.id)){var l=function(){if(!(--d>0)){var t=r._layout.id!==e.id,o=ue(a)?a:b;t||(r._isLayoutFinished=!0),ue(o)&&o(e.items.slice(0),t),!t&&r._hasListeners(c)&&r._emit(c,e.items.slice(0))}};if(!to.length)return l(),this;for(this._isLayoutFinished=!1,i=0;i<to.length&&this._layout.id===e.id;i++)to[i]._layout.start(!0===a,l);return this._layout.id===e.id&&(to.length=0),this}}}),ao.prototype._setItemsVisibility=function(e,t,o){var n,i,r=this,a=e.slice(0),c=o||{},p=!0===c.instant,b=c.onFinish,d=c.layout?c.layout:void 0===c.layout,l=a.length,z=t?"showStart":M,u=t?"showEnd":"hideEnd",O=t?"show":"hide",A=!1,f=[],h=[];if(l){for(i=0;i<a.length;i++)n=a[i],(t&&!n._isActive||!t&&n._isActive)&&(A=!0),n._layout._skipNextAnimation=!(!t||n._isActive),t&&n._visibility._isHidden&&h.push(n),t?n._addToLayout():n._removeFromLayout();h.length&&(this.refreshItems(h,!0),h.length=0),A&&!1!==c.syncWithLayout?this.on(s,m):m(),A&&d&&this.layout(d===io,ue(d)?d:void 0)}else ue(b)&&b(a);function m(){for(A&&!1!==c.syncWithLayout&&r.off(s,m),r._hasListeners(z)&&r._emit(z,a.slice(0)),i=0;i<a.length;i++)a[i]._gridId===r._id?a[i]._visibility[O](p,function(e,t){e||f.push(t),--l<1&&(ue(b)&&b(f.slice(0)),r._hasListeners(u)&&r._emit(u,f.slice(0)))}):--l<1&&(ue(b)&&b(f.slice(0)),r._hasListeners(u)&&r._emit(u,f.slice(0)))}};const Mo=ao;var lo=o(88903),zo=o(38745),uo=o(56155);const Oo=[];let Ao,fo;const ho=()=>{let e=document.querySelector(".SearchResult-dragContainer");return e||(e=(0,zo.A)("div",{className:"SearchResult-dragContainer"}),document.body.appendChild(e)),e},mo=()=>{const e=fo.querySelector(":scope .SearchResult-board"),t=()=>{if(e){const n=e.lastChild;if(n instanceof Element){const i=n.classList.contains("frame")?e.querySelector(".SearchResult-board-column:nth-last-child(-n+2)"):e.lastChild;i instanceof Element&&o.observe(i),Ao.off("layoutEnd",t);const r=e.closest(".Popup");r instanceof HTMLDivElement&&document.body.style.setProperty("--BoardContainer-zIndex",(parseInt(r.style.zIndex)+1).toString())}}},o=new IntersectionObserver(e=>{for(const t of e){const{isIntersecting:e,target:n}=t;if(e&&!n.classList.contains("frame")){o.unobserve(n);const e=fo.querySelector(":scope button.moreColumns-button");e&&e.click()}}},{root:fo,rootMargin:"25px",threshold:.75});Ao.on("layoutEnd",t)},qo=(e,t)=>{const o=t.parentNode;if(o instanceof HTMLDivElement){const n=new IntersectionObserver(e=>{for(const t of e){const{isIntersecting:e,target:i}=t;if(e){n.unobserve(i);const e=o?.querySelector(":scope button.moreCards-button");e&&e.click()}}},{root:o,rootMargin:"25px",threshold:.75}),i=()=>{const o=t.lastChild;o instanceof Element&&(n.observe(o),e.off("layoutEnd",i))};e.on("layoutEnd",i)}};let _o,Wo,go;(0,uo.A)(".is-muuri .SearchResult-boardContainer",e=>{fo=e;const t=e.querySelector(":scope div.SearchResult-board");if(!t)return;Ao=new Mo(t,{items:".SearchResult-board-column",layoutDuration:300,layoutEasing:"cubic-bezier(0.625, 0.225, 0.100, 0.890)",layout:(e,t,o,n,i,r)=>(Mo.defaultPacker.setOptions({horizontal:!0}),Mo.defaultPacker.createLayout(e,t,o,n,i,e=>{delete e.styles,r(e)})),dragEnabled:!1,dragAxis:"x",dragSortHeuristics:{sortInterval:0},dragHandle:".BoardView-title",dragRelease:{duration:300,easing:"cubic-bezier(0.625, 0.225, 0.100, 0.890)",useDragContainer:!1},dragAutoScroll:{targets:[{element:fo,axis:Mo.AutoScroller.AXIS_X}]}});const o=fo.querySelector(".SearchResult-board-errors");(0,uo.A)(".SearchResult-board-errors-close",e=>{e.onclick=()=>{o&&(o.innerHTML="")}}),mo()}),(0,uo.A)(".SearchResult-items .SearchResult-boardContainer",e=>{const t=e.closest(".SearchResult-items");t?.classList.add("is-muuri")}),(0,uo.A)("ol.BoardView-list",e=>{const t=e.closest(".SearchResult-board"),o=!!t?.hasAttribute("data-dragEnabled"),n=new Mo(e,{items:".BoardView-card",showDuration:300,showEasing:"ease",hideDuration:300,hideEasing:"ease",layoutDuration:300,layoutEasing:"cubic-bezier(0.625, 0.225, 0.100, 0.890)",dragEnabled:o,dragSort:()=>Oo.filter(e=>t?.contains(e.getElement())),dragContainer:ho(),dragRelease:{duration:300,easing:"cubic-bezier(0.625, 0.225, 0.100, 0.890)",useDragContainer:!0},dragStartPredicate:(e,t)=>{const o=t.target,n=e.getElement();return!("A"===o.tagName||o.className.includes("ContentSummary-info")||n&&n.hasAttribute("data-archived"))},dragPlaceholder:{enabled:!0,createElement:e=>{const t=e.getElement();return t?.cloneNode(!0)}},dragAutoScroll:{targets:e=>[window,{element:fo,priority:1,axis:Mo.AutoScroller.AXIS_X},{element:e.getGrid()?.getElement().parentNode,priority:1,axis:Mo.AutoScroller.AXIS_Y}],sortDuringScroll:!1}});let i;new MutationObserver(e=>{for(const t of e){const e=t.target;if("childList"===t.type&&e instanceof HTMLElement){new ResizeObserver((t,o)=>{n.refreshItems().layout(),o.unobserve(e)}).observe(e)}}}).observe(e,{childList:!0,subtree:!0}),n.on("dragReleaseEnd",e=>{if(i===e){const t=e.getElement();t instanceof HTMLElement&&t.classList.add("is-saving"),r(e);let o=null,i=null;if(_o){const e=_o.getElement().closest(".SearchResult-board-column");o=e?.querySelector(".BoardView-title")}if(n){const e=n.getElement().closest(".SearchResult-board-column");i=e?.querySelector(".BoardView-title")}if(o instanceof HTMLElement){const e=o.dataset.count;e&&(o.dataset.count=(parseInt(e)-1).toString())}if(i instanceof HTMLElement){const e=i.dataset.count;e&&(i.dataset.count=(parseInt(e)+1).toString())}}i=null,Wo=0}),n.on("dragStart",e=>{const t=e.getGrid();if(t instanceof Mo){_o=t,Wo=n.getItems().indexOf(e);const o=n.getElement();if(o){const e=o.closest(".SearchResult-board-column"),t=e?.getAttribute("data-boardFieldValue");t&&(go=t)}const i=e.getElement();i&&(i.style.width=e.getWidth()+"px",i.style.height=e.getHeight()+"px")}}),n.on("dragMove",e=>{n===_o&&null!==Wo&&n.move(e,Wo,{layout:"instant"})}),n.on("layoutStart",()=>{Ao&&Ao.refreshItems().layout()}),n.on("receive",e=>{i=e.item});const r=async e=>{const t=e.getElement(),o=t?.getAttribute("data-objectId"),i=document.querySelector('li[data-objectId="'+o+'"]');let r,a,s;if(i){const e=i.closest(".SearchResult-board");e&&(r=e.getAttribute("data-boardField"),s=e.getAttribute("data-search"))}if(t){const e=t.closest(".SearchResult-board-column");a=e?.getAttribute("data-boardFieldValue")}const c=new Headers,p=lo.A.get("bsp.csrf");p&&c.append("Brightspot-CSRF",p);const b=new FormData;o&&b.append("objectId",o),r&&b.append("boardField",r),a&&b.append("boardFieldValue",a),s&&b.append("search",s),b.append("previousBoardFieldValue",go);const M=await fetch(window.CONTEXT_PATH+"board/fieldUpdate",{method:"post",credentials:"include",headers:c,body:b}),d=await M.text();if(M.ok){const t=n.getItems().indexOf(e);n.remove([e],{removeElements:!0});const o=document.createElement("template");o.innerHTML=d;const i=o.content.firstChild;i instanceof HTMLElement&&n.add(i,{index:t})}else if(d){n.send(e,_o,Wo);const t=document.querySelector(".SearchResult-board-errors");t&&(t.innerHTML=d)}};qo(n,e),Oo.push(n)}),window.addEventListener("brightspot-frame-load",e=>{const t=e.target;if(t instanceof HTMLElement)if(t.classList.contains("BoardResults")){const e=[...t.querySelectorAll("li.BoardView-card")],o=t.closest(".BoardView-listContainer"),n=o?.querySelector("ol.BoardView-list");Oo.forEach(t=>{t instanceof Object&&t.getElement()===n&&(qo(t,n),t.add(e))})}else t.classList.contains("BoardResults-Horiz")&&(mo(),Ao.add([...t.querySelectorAll("div.SearchResult-board-column")]))})},94473(e,t,o){"use strict";(0,o(56155).A)(".Page .Page-broadcastAlert",e=>{const t=e.querySelector(".pagination");if(!t)return;const o=t.querySelector(".pagination-count");if(!o)return;const n=e.querySelectorAll(".Page-broadcastAlert-messages > *");if(!n)return;const i=t.querySelector(".previous");if(!i)return;const r=i.querySelector(":scope > a");if(!r)return;const a=t.querySelector(".next");if(!a)return;const s=a.querySelector(":scope > a");if(!s)return;const c=n.length;for(let e=1;e<c;e++)n[e].hidden=!0;let p=0;const b=()=>{o.textContent=`${p+1} / ${c}`};b();const M=e=>{n[p].hidden=!0,p+=e?1:-1,n[p].hidden=!1,b();const t=0===p;i.classList.toggle("is-disabled",t),r.tabIndex=t?-1:0;const o=p===c-1;a.classList.toggle("is-disabled",o),s.tabIndex=o?-1:0};i.addEventListener("click",e=>{e.preventDefault(),p>0&&M(!1)}),a.addEventListener("click",e=>{e.preventDefault(),p<c-1&&M(!0)})})},34409(e,t,o){"use strict";var n=o(56155),i=o(38745),r=o(88903),a=o(99022),s=o(30473);(0,n.A)(".BulkWorkflow-button",e=>{let t=null;e.addEventListener("keydown",t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e.click())}),e.addEventListener("click",async o=>{o.preventDefault(),o.stopPropagation();const n=o.target;let c;if(n instanceof HTMLElement&&(c=n.getAttribute("action-url")),!c)return;if(!t){const e=new Headers,o=r.A.get("bsp.csrf");o&&e.append("Brightspot-CSRF",o);const n=await fetch(c,{headers:e}),a=await n.text();t=(0,i.A)("div",{className:"BulkWorkflow",innerHTML:a,role:"dialog","aria-modal":"true"}),document.body.appendChild(t),t.addEventListener("keydown",e=>{if("Escape"===e.key){e.stopPropagation();const o=t?.querySelector(".closeButton");o&&o.click()}})}e.closest(".Popup")&&(t.style.zIndex=(0,s.default)().toString()),a.A.toggle(e,t,()=>{const o=e.classList.toggle("is-open");return t?.classList.toggle("is-open"),o&&requestAnimationFrame(()=>{const e=t?.querySelector(".closeButton");e&&e.focus()}),o});const p=t.querySelector(".closeButton");p?.addEventListener("click",()=>{const o=a.A.toggles.get(e);o&&o.closeListener&&window.removeEventListener("click",o.closeListener,!0),e.classList.remove("is-open"),t?.classList.remove("is-open"),t?.remove(),t=null;const n=e.closest(".SearchResult")?.querySelector(".SearchResult-actions-toggle");n&&n.focus()})})})},70660(e,t,o){"use strict";o.d(t,{A:()=>q}),o(44764),o(84978),o(13722),o(25809),o(91672);var n=o(29171),i=o(17319),r=o(76904),a=o(80133),s=o(31400);function c(){c=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!M(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?u(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=z(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:l(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=l(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function p(e){var t,o=z(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function b(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function M(e){return e.decorators&&e.decorators.length}function d(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function l(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function z(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},O.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}const f=window.localStorage,h=window.BRIGHTSPOT?.ui.tooltips.collapse,m=window.BRIGHTSPOT?.ui.tooltips.expand;let q=(_=[(0,i.EM)("btu-cig-cluster")],W=(0,r.j)((0,a.m)(n.WF)),g=c(),y=function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",key:"_collapsed",value:()=>!0},{kind:"field",decorators:[(0,i.MZ)({type:String,reflect:!0,attribute:"cluster-title"})],key:"clusterTitle",value:void 0},{kind:"field",decorators:[(0,i.MZ)({type:String})],key:"tab",value:void 0},{kind:"set",decorators:[(0,i.MZ)()],key:"collapsed",value:function(e){this._collapsed=e;const t=this.closest(".CIG"),o=t?.dataset.type,n=this.clusterTitle?.trim(),i=`BSP.ContentEdit.clusterExpanded.${o}.${n}`;o&&n&&(e?f.removeItem(i):f.setItem(i,"1")),this._collapsed?this.states.delete("btu-expanded"):this.states.add("btu-expanded"),this.requestUpdate()}},{kind:"get",key:"collapsed",value:function(){return this._collapsed}},{kind:"method",key:"_toggleRowVisibility",value:function(e){this.querySelectorAll(":scope > :not(.CIG-title)").forEach(t=>{t.childNodes.length&&(t.toggleAttribute("hidden",e),t.classList.toggle("TC-unselected",e))})}},{kind:"method",key:"connectedCallback",value:function(){var e,t,n,i,r;(e=o,t="connectedCallback",n=this,r=O(A(1&(i=3)?e.prototype:e),t,n),2&i&&"function"==typeof r?function(e){return r.apply(n,e)}:r)([]);const a=this.closest(".CIG"),s=a?.dataset.type,c=`BSP.ContentEdit.clusterExpanded.${s}.${this.clusterTitle}`;this.collapsed=!f.getItem(c)}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"firstUpdated",value:function(){this.emit("btu-cig-cluster-ready");const e=this.querySelector(".CIG-title"),t=this.firstChild;t instanceof Element&&!t.classList.contains("CIG-title")&&e&&this.insertBefore(e,t),this.dataset.tab=this.tab;const o=Array.from(this.querySelectorAll(".CIG-row")).filter(e=>e.childNodes.length);this.toggleAttribute("hidden",!o.length),Array.from(this.querySelectorAll(".CIG-row")).filter(e=>!e.childNodes.length).forEach(e=>e.toggleAttribute("hidden",!0)),this.querySelectorAll(".CIG-row > .Message.is-error").length>0?this.states.add("btu-error"):this.states.delete("btu-error")}},{kind:"method",key:"render",value:function(){return this._toggleRowVisibility(this.collapsed),n.qy`<h2 class="CIG-title" data-tab=${this.tab}>
3
3
  <button
4
4
  type="button"
@@ -69,7 +69,7 @@
69
69
  readonly
70
70
  @focus="${e=>{e.target instanceof HTMLInputElement&&(e.target.readOnly=!1)}}"
71
71
  />
72
- </btu-input>`}}]},_=m.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(M(r.descriptor)||M(i.descriptor)){if(b(r)||b(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(b(r)){if(b(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}p(r,i)}else t.push(r)}return t}(q.d.map(c)),O),m.initializeClassElements(q.F,_.elements),m.runClassFinishers(q.F,_.finishers));var O,A,f,h,m,q,_},91334(e,t,o){"use strict";o.a(e,async(e,n)=>{try{o.d(t,{A:()=>w}),o(44764),o(84978),o(25809),o(91672);var i=o(29171),r=o(17319),a=o(79911),s=o(7176);function c(e,t,o,n){var i=p();if(n)for(var r=0;r<n.length;r++)i=n[r](i);var a=t(function(e){i.initializeInstanceElements(e,s.elements)},o),s=i.decorateClass(d(a.d.map(b)),e);return i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}function p(){p=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!l(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,m(t)||h(t)||A(t)||O()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=g(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:u(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=u(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function b(e){var t,o=g(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function M(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function d(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(z(r.descriptor)||z(i.descriptor)){if(l(r)||l(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(l(r)){if(l(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}M(r,i)}else t.push(r)}return t}function l(e){return e.decorators&&e.decorators.length}function z(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function u(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function O(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(e,t){if(e){if("string"==typeof e)return f(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(e){if(Array.isArray(e))return e}function q(e,t,o,n){return q="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(e,t,o,n){var i,r=v(e,t);if(r){if((i=Object.getOwnPropertyDescriptor(r,t)).set)return i.set.call(n,o),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(n,t)){if(!i.writable)return!1;i.value=o,Object.defineProperty(n,t,i)}else W(n,t,o);return!0},q(e,t,o,n)}function _(e,t,o,n,i){if(!q(e,t,o,n||e)&&i)throw new TypeError("failed to set property");return o}function W(e,t,o){return(t=g(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function g(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function v(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=L(e)););return e}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}window.BRIGHTSPOT?.ui.cms.enableV5UI||await o.e(5385).then(o.bind(o,85385));let w=c([(0,r.EM)("btu-textarea-input")],function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"method",key:"find",value:function(){return this.querySelector(":scope > textarea")}},{kind:"set",key:"child",value:function(e){var t;t=e,_(L(o.prototype),"_child",t,this,1),this.input=e}},{kind:"method",key:"createRenderRoot",value:function(){return this}}]}},(0,s.r)((0,a.s)(i.WF)));n()}catch(R){n(R)}},1)},32817(e,t,o){"use strict";var n=o(56155),i=o(99022);(0,n.A)(".GraphQL",e=>{e.addEventListener("onegraph-click",()=>{e.dispatchEvent(new Event("mousedown",{bubbles:!0})),e.dispatchEvent(new Event("click",{bubbles:!0}))})}),(0,n.A)(".GraphQL-controls-toggle",e=>{const t=e.closest(".GraphQL-controls-menu"),o=t?.querySelector(".GraphQL-controls-list");o&&t&&e.addEventListener("click",n=>{i.A.toggle(e,o,()=>t.classList.toggle("is-open"))})}),(0,n.A)(".GraphQL-copy",e=>{e.addEventListener("click",t=>{t.stopPropagation(),t.preventDefault();const o=e.getAttribute("data-code");o&&window.navigator.clipboard.writeText(o),e.setAttribute("data-copied","");const n=e.nextElementSibling;n&&(n.removeAttribute("hidden"),setTimeout(()=>{n.setAttribute("hidden",""),e.removeAttribute("data-copied")},1500))})})},9389(e,t,o){"use strict";(0,o(56155).A)("div.GraphQL-previewControls",e=>{const t=e.querySelector("form[id]");if(!t)return;const o=t.querySelector(".deviceWidthSelect");o&&o.addEventListener("change",e=>{const o=document.querySelector("iframe[name='"+t.target+"']");o&&e?.currentTarget instanceof HTMLSelectElement&&(o.style.width=e?.currentTarget?.selectedOptions[0].value+"px"),window.dispatchEvent(new Event("resize")),t.submit()})})},80990(e,t,o){"use strict";var n=o(95628);(0,o(32246).A)(".Admin-main.is-miller .Widget",e=>{setTimeout(()=>{e.scrollIntoView({block:"end"})},0);const t=(0,n.A)(e,".is-selected");t&&setTimeout(()=>{t.scrollIntoView({block:"center"})},0)})},78062(e,t,o){"use strict";var n=o(5292),i=o(68243),r=o(10013);const a=CSS.supports("field-sizing: content");(0,r.A)("textarea",e=>{const t=e.parentNode;if(a)return void(t.classList.contains("AutoExpand")&&t.classList.add("is-noShim"));const o=()=>`${e.value||e.placeholder} `;let r;if(t.classList.contains("AutoExpand"))r=()=>{t.dataset.value=o();const n=e.style.opacity;e.style.opacity=.99999999,e.style.opacity=n};else{e.rows=1;const t=(0,n.A)("div",{className:"AutoExpand"}),a=(0,n.A)("div",{className:"AutoExpand-shim"});r=()=>a.innerText=o();const s=window.getComputedStyle(e),c=a.style;for(const e of s)c.setProperty(e,s.getPropertyValue(e));c.gridArea="1 / 1 / 2 / 2",c.height="auto",c.visibility="hidden",c.width="auto",(0,i.A)(t,e),t.appendChild(a),t.appendChild(e)}const s=()=>e.parentNode.classList.toggle("is-noShim",0===e.getClientRects().length);r(),s(),new MutationObserver(e=>{for(const{attributeName:t}of e)"class"===t||"style"===t?s():r()}).observe(e,{attributes:!0,attributeFilter:["class","placeholder","style"]}),e.addEventListener("change",r),e.addEventListener("input",r)})},57366(e,t,o){"use strict";o.d(t,{A:()=>a}),o(50144),o(84978),o(39589);var n=o(1439),i=o.n(n),r=o(27170);class a{constructor(e){if(this._form=e.closest("form, .NestedForm"),!this._form)return;this.submit=this.submit.bind(this),e.addEventListener("change",this.submit),e.addEventListener("input",(0,r.A)(500,this.submit));for(const t of e===this._form?e.querySelectorAll("input, select, textarea"):[e])t.autocomplete="off";const t=this._form.target;t&&document.querySelector(`.frame[name="${t}"]:not(.loading):not(.loaded)`)&&this._form.requestSubmit()}submit({target:e}){const t=this._form;if(t&&e.name)if(t instanceof HTMLFormElement){const o=new FormData(t);this._lastData&&JSON.stringify([...this._lastData.entries()])===JSON.stringify([...o.entries()])||(window.BRIGHTSPOT.ajaxInitiator={action:t.action,id:e.name,nodeName:e.nodeName.toLowerCase(),shadowField:e.shadowField},t.requestSubmit()),this._lastData=o}else{const e=i()(t),o=e.find(":input").serialize();this._lastData!==o&&(this._lastData=o,e.trigger("submit"))}}}},73136(e,t,o){"use strict";o(84978),o(25809);var n=o(59314),i=o.n(n),r=o(32246),a=o(1439);const s=document.createElement("style");s.className="Bridge",document.head.appendChild(s);const c=s.sheet,p={};function b(e,t){"function"==typeof t||t.startsWith("RichTextEditor-")||(Array.isArray(e)?e:[e]).forEach(e=>{e.indexOf(",")<0&&c.insertRule(`${e}:not(.${t}) { display: none; }`)}),(0,r.A)(e,e=>{"function"==typeof t?t(e):e.classList.contains(t)||(p[t]||(p[t]=!0,i().debug(`Bridged to ${t}`,e)),e.classList.add(t))})}b([".actions",".buttons"],"ActionBar"),b(".withLeftNav","Admin"),b(".withLeftNav > .leftNav","Admin-nav"),b(".withLeftNav > .main","Admin-main"),b(".ToolUserAvatar","Avatar"),b(".MimeTypeCount","Badge"),b(".button","Button"),b(".contentForm","ContentEdit"),b(".ContentFormCreate","ContentForm-create"),b('.ContentEdit[data-content-locked-out="true"]',"is-locked"),b(".contentForm-aside > .widget-publishing","ContentEdit-bar"),b(".OverlayProviderSelect","ContentEdit-overlayList"),b(".widget-publishingWorkflow","ContentEdit-workflow"),b(".widget-publishingPublish","ContentEdit-publish"),b(".widget-publishingWorkflowLog","ContentEdit-workflowLog"),b('.widget-publishing > .widget-publishingPublish > button[name="action-publish"]',"ContentEdit-publishButton"),b(".contentForm-main","ContentEdit-left"),b(".contentForm-main > .widget-content","ContentEdit-main"),b(".contentForm-main > .widget-content > h1","ContentEdit-title"),b(".contentForm-aside > .contentWidgets","ContentEdit-right"),b(".contentForm-main > .contentWidgets","ContentEdit-bottom"),b(['.ContentEdit-bar > button[name="action-draft"]','.ContentEdit-bar > button[name="action-newDraft"]'],"ContentEdit-saveButton"),b(['.ContentEdit-controls button[name="action-restore"]','.ContentEdit-controls button[name="action-restore-draft"]'],"ContentEdit-restoreButton"),b([".objectInputs:not(.BulkUploadProcessor)",".SocialPublishContentEditWidget-inputs"],"CIG"),b("form > .inputContainer","CIG-row"),b("form > .inputContainer > .inputSmall","CIG-small"),b("form > .inputContainer > .inputLabel","CIG-label"),b(".cms-contentTools","ContentTools"),b(".CIG .inputContainer","CIG-row"),b([".objectInputs-readOnly",".CIG .inputContainer-readOnly"],"is-readOnly"),b(".CIG .inputContainer-unlabeled","is-unlabeled"),b(".CIG .inputLabel","CIG-label"),b(".CIG .inputLabel > .icon-object-guide","CIG-help"),b(".CIG .inputPending","CIG-pending"),b(".CIG .inputUpdated","CIG-updated"),b(".CIG .inputNote","CIG-note"),b(".CIG .inputSmall","CIG-small"),b(".CIG .inputLarge","CIG-large"),b(".objectId-select","ContentSelector-search"),b(".objectId-edit","ContentSelector-edit"),b(".objectId-clear","ContentSelector-clear"),b(".objectId-placeholder","ContentSelector-placeholder"),b(".dashboard-columns","DashboardRow"),b(".dashboard-column","DashboardRow-column"),b(".dashboard-widget","DashboardRow-cell"),b(".dashboard-widget > .widget","DashboardWidget"),b(".DashboardWidget > h1","DashboardWidget-title"),b([".DashboardWidget > .scheduledEvents-controls",".DashboardWidget > .widget-controls",".DashboardWidget > .widgetControls"],"DashboardWidget-controls"),b([".DashboardWidget > .pagination",".DashboardWidget .scheduledEvents-datePagination",".PR > .pagination"],"DashboardWidget-pagination"),b([".DashboardWidget > .widget-filters",".DashboardWidget > div > .widget-filters",".DashboardWidget .scheduledEvents-dateDisplay"],"DashboardWidget-filters"),b(".table-striped:not(.links)","DT"),b(".calendarButton","DateTimeInput"),b(".UploadChooser","FileInput"),b(".imageEditor","ImageEditor"),b(".imageEditor-image","ImageEditor-main"),b(".imageEditor-aside","ImageEditor-aside"),b(".imageEditor-focus","ImageEditor-focus"),b(".imageEditor-edit","ImageEditor-edit"),b(".imageEditor-adjustment","ImageEditor-adjustment"),b(".imageEditor-sizes","ImageEditor-sizes"),b(".imageEditor-sizeButton","ImageEditor-size"),b(".imageEditor-sizePreview","ImageEditor-sizePreview"),b(".imageEditor-sizeLabel","ImageEditor-sizeLabel"),b(".imageEditor-resetCrop","ImageEditor-sizeReset"),b('.objectInputs[data-type="com.psddev.theme.Theme"]',"ThemeBundle"),b('.objectInputs[data-type="com.psddev.theme.Theme"] .TabBar-item[data-tab="Overrides"]',"ThemeBundle-tabOverrides"),b('[data-field="bundle"] .objectId-edit',"ThemeBundle-edit"),b('.Tab[data-tab-class="com.psddev.theme.ThemeFieldsTab"]',"ThemeBundle-inputs"),b([".ContentEditSites-owner",".ContentEditSites-access",".widget-urlsItem"],"InputRow"),b(".visibilityLabel","Label"),b(".link","Link"),b([".link.icon-action-delete",".link.icon-action-trash",".link.icon-action-cancel"],"is-red"),b(".links:not(.LinkList)","LinkTable"),b([".message",".message-info",".embargo-warning"],"Message"),b([".message.error",".message-error",".embargo-warning"],"is-error"),b([".message.warning",".message-warning"],"is-warning"),b([".message.success",".message-success"],"is-success"),b(".uploadable .message","is-upload"),b(".embargo-emphasis","is-emphasis"),b("body","Page"),b(".hasToolBroadcast","is-broadcasting"),b(".noToolUser","is-unauthenticated"),b(".toolBroadcast","Page-broadcast"),b(".toolHeader","Page-header"),b(".toolHeader-hasEnvironment","is-env"),b(".toolNav","Page-nav"),b(".toolTitle","Page-title"),b(".toolSearch","Page-search"),b(".toolUserSiteDisplay","Page-site"),b(".toolUserAvatarProfile","Page-avatar"),b(".toolUserWelcome","Page-user"),b(".toolEnv","Page-env"),b(".toolContent","Page-content"),b(".toolBackground","Page-background"),b(".widget-logIn","Page-login"),b(['[target="miscSearch"]','[target="profilePanel"]'],e=>e.setAttribute("data-popup-mode","noGap fromTop")),b([".objectId-select","rte2-enhancement-toolbar-change"],e=>e.setAttribute("data-popup-mode","fromRight")),b([".ContentSelector-create",".ContentSelector-edit",".rte2-enhancement-toolbar-edit",'form[target^="objectId-create-"]'],e=>e.setAttribute("data-popup-mode","noGap fromBottom")),b(".popup-objectId-edit-heading","Popup-heading"),b(".repeatableInputs","Repeatable"),b(".Repeatable > ul > li","Repeatable-item"),b(".Repeatable-item > .repeatableLabel","Repeatable-title"),b(".Repeatable > .addButtonContainer","Repeatable-controls"),b(".Repeatable-controls > .addButton","Repeatable-add"),b(".repeatableForm","RCIG"),b(".repeatableForm.addToTop","is-addToTop"),b(".repeatableForm-previewable","is-previewable"),b([".repeatableForm > ol",".repeatableForm > ul"],"RCIG-list"),b(".RCIG-list > li","RCIG-item"),b(".RCIG-item > .repeatableLabel","RCIG-title"),b(".RCIG-item > .removeButton","RCIG-remove"),b(".RCIG > .addButtonContainer","RCIG-controls"),b(".RCIG-controls > .addButton","RCIG-add"),b(".RCIG-controls > .addButtonSelectContainer","RCIG-addSelect"),b(".repeatableForm-weighted","is-weighted"),b(".repeatableForm-weightResetButton","RCIG-resetWeights"),b(".repeatableForm-itemWeights","RCIG-weightBar"),b(".repeatableForm-itemWeight","RCIG-weightBarItem"),b(".repeatableForm-itemWeight-marker","RCIG-weightBarMarker"),b(".repeatableForm-itemWeightHandle","RCIG-weightBarHandle"),b(".repeatableLabel-weightLabel","RCIG-weightLabel"),b(".repeatableLabel-color","RCIG-weightColor"),b([".repeatableObjectId",".repeatableDropdown"],"RCS"),b(".repeatableObjectId.addToTop","is-addToTop"),b([".repeatableObjectId > ol",".repeatableObjectId > ul",".repeatableDropdown > ol",".repeatableDropdown > ul"],"RCS-list"),b(".RCS-list > li","RCS-item"),b(".RCS-item > .removeButton","RCS-remove"),b([".repeatableObjectId > .addButtonContainer",".repeatableDropdown > .addButtonContainer"],"RCS-controls"),b(".RCS-controls > .addButton","RCS-add"),b(".repeatableText","RTI"),b([".repeatableText > ol",".repeatableText > ul"],"RTI-list"),b(".RTI-list > li > .removeButton","RTI-remove"),b(".repeatableText > .addButtonContainer","RTI-add"),b(".searchInput","SearchInput"),b([".Admin-nav .SearchInput",'.Popup[name="siteSwitch"] .SearchInput'],"is-filter"),b(".searchResult-container","SearchResult"),b(".searchResult-view","SearchResult-view"),b(".searchResult-views","SearchResult-views"),b(".searchResult-items","SearchResult-items"),b(".searchResult-pagination","SearchResult-pagination"),b(".searchResult-fields","SearchResult-fields"),b(".searchResult-sorts","SearchResult-sorts"),b(".searchResult-list","SearchResult-list"),b(".searchResult-mixed","SearchResult-mixed"),b(".searchResult-images","SearchResult-images"),b(".searchResult-selectionReset","SearchResult-selectionReset"),b(".searchResult-actions","SearchResult-actions"),b(".searchResult-actions-body","SearchResult-actions-body"),b(".searchResult-action-simple","SearchResult-action"),b(".searchPagination","SearchResult-pagination"),b(".searchSorter","SearchResult-sorts"),b(".searchResultImages","SearchResult-images"),b(".searchResultList","SearchResult-items"),b(".queryRestrictions","SearchResult-query"),b('.Popup[name="siteSearchTermAnalyticsPage"]',"SiteSearchTermAnalytics"),b('.Popup[name="siteSearchTermAnalyticsPage"] .Widget-controls',"SiteSearchTermAnalytics-controls"),b('.Popup[name="siteSearchTermAnalyticsPage"] .pagination',"SiteSearchTermAnalytics-results"),b(".queryField","QueryField"),b(".queryField_frame","QueryField-frame"),b(".queryField_frame .searchControls","QueryField-searchControls"),b(".queryField_frame .searchForm","QueryField-searchForm"),b(['.widget[name="searchAdvancedFull"]','.Widget[name="searchAdvancedFull"]'],"SearchWidget"),b('.SearchWidget[name="miscSearch"]',"is-global"),b(".SearchWidget > h1","SearchWidget-title"),b(".widget-queryField > h1","SearchWidget-title"),b(".searchForm","SearchWidget-form"),b(".searchHistory","SearchWidget-history"),b(".searchRecent","SearchWidget-recent"),b(".searchSaved","SearchWidget-saved"),b(".searchFilters","SearchWidget-controls"),b(".searchFilters .searchInput","SearchWidget-query"),b(".searchFiltersType","SearchWidget-type"),b([".searchFilters > .search-reset",".searchFilters > .action-cancel"],"SearchWidget-reset"),b(".searchFilter","SearchWidget-filter"),b(".searchFilterItem","SearchWidget-filterItem"),b(".searchFilter-advancedQuery","is-advanced"),b(".searchFilter-date","is-date"),b(".searchFilter-record","is-record"),b(".searchCreate","SearchWidget-create"),b(".searchResult","SearchWidget-result"),b(".searchResultTable","SearchResult-table"),b(".WidgetSearchAdvancedQuery","SearchWidgetAdvanced"),b(".WidgetSearchAdvancedQuery .fixedScrollable","SearchWidgetAdvanced-scrollpane"),b(".standardForm","StandardForm"),b([".DashboardTabSelect > ul",".tabs"],"TabBar"),b(".TabBar > li:not(.TabBar-menu)","TabBar-item"),b([".objectInputs",".tabbed"],"TC"),b(".tabbed > [data-tab]","TC-panel"),b(".searchResultTaxonomy","Taxonomy"),b(".searchResultTaxonomyColumn","Taxonomy-column"),b(".searchResultTaxonomyChildren","Taxonomy-children"),b(".searchResultTaxonomyExpand","Taxonomy-expand"),b("input.secret","is-secret"),b(".widget-urlsRepeatable","UrlsWidget"),b(".widget-urlsItemLabel","UrlsWidget-itemLabel"),b(".EditFieldUpdateViewers","Viewers"),b(".EditFieldUpdateViewers-some","Viewers-some"),b(".EditFieldUpdateViewers-none","Viewers-none"),b(".EditFieldUpdateViewers-viewer","Viewers-viewer"),b(".calendar-week","Week"),b(".Week > .calendarRow","Week-row"),b(".Week-row > .calendarDay","Week-day"),b(".Week-day > .calendarDayOfWeek","Week-dow"),b(".Week-day > .calendarDayOfMonth","Week-dom"),b(".Week-row > .calendarCell","Week-content"),b(".calendar-month","Month"),b(".Month > .calendarRow","Month-row"),b(".Month-row > .calendarDay","Month-day"),b(".Month-day > .calendarDayOfWeek","Month-dow"),b(".Month-day > .calendarDayOfMonth","Month-dom"),b(".Popup-content > .frame.loaded",e=>{for(const t of e.children){if(t.classList.contains("Widget"))return;if(t.classList.contains("widget"))return void t.classList.add("Widget")}const t=e.getAttribute("name");e.classList.add("miscSearch"===t||t.startsWith("objectId-")&&t.endsWith("-select")?"SearchWidget":"Widget")}),window.DISABLE_VIDEO_EDITOR_UI||(b('[data-type="brightspot.elemental.AwsElementalVideoProvider"]',"VideoEditor"),b('[data-type="brightspot.elemental.AwsElementalVideoInputWrapper"]',"VideoEditor-fileContainer"),b('[data-type="brightspot.elemental.AwsElementalImageOverlayWrapper"]',"VideoEditor-InputOverlay"),b(".VideoEditor-fileContainer .filePreview > div:first-child","FilePreview-actions"),b('.CIG-row[data-field-name="colorCorrector"]',"VideoEditor-InputColors"),b('[data-type="brightspot.elemental.AwsElementalColorCorrector"]',"VideoEditor-InputColors-group")),b([".Admin .widget",".ContentEdit-bottom .widget",".ContentEdit-left .widget",".ContentEdit-right .widget:not(.widget-publishing)",'.Page-content > .widget:not([name="searchAdvancedFull"])',".Popup-content > .frame.loaded:not(.Widget):not(.SearchWidget) > .widget"],"Widget"),b([".Widget > h1:not(.ContentEdit-title)",".Admin-main > .Widget > h2",".Admin-nav > .Widget > h2",".Page-content > .Widget > h2:not(.BuildInformation-resources)",".Popup-content .Widget > h2"],"Widget-title"),b([".Widget > .widget-controls",".Widget > .widgetControls"],"Widget-controls"),b(".CommunityWidget .widget-filters","CommunityWidget-filters"),b(".PR > .widget-filters","PR-filters"),b(".PR > .pagination","PR-pagination"),b(".inputWordCount","CIG-wordCount"),a.plugin2("toggleable",{change:function(){return this.$caller[0].dispatchEvent(new Event("change")),this.$caller},toggle:function(){return this.$caller[0].dispatchEvent(new Event("change")),this.$caller}})},60958(e,t,o){"use strict";(0,o(32246).A)(['.ContentEdit-left input[type="checkbox"]','.SearchWidget-filter input[type="checkbox"]'],e=>{const t=()=>{e.setAttribute("title",e.checked?window.BRIGHTSPOT?.ui.tooltips.toggleOff:window.BRIGHTSPOT?.ui.tooltips.toggleOn)};t(),e.addEventListener("change",t)})},37592(e,t,o){"use strict";(0,o(41044).A)("input.color",async()=>{await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(1950),o.e(2882)]).then(o.bind(o,67177))})},95033(e,t,o){"use strict";o.d(t,{A:()=>d}),o(67219),o(44764),o(84978),o(13722),o(39589),o(25809),o(91672),o(92280);var n=o(5292),i=o(95628),r=o(40627),a=o(89561),s=o(9968),c=o(88903);let p,b=0;const M=window.BRIGHTSPOT?.ui?.tooltips;class d{constructor(e,t){this.handleIntersect=(e,t)=>{for(let t of e)!1===t.isIntersecting?this._list.style.display="none":this._list.style.display="block"},this._select=e,this._reorderSelectOptions(),this._getOptionsIndex=0,this._getOptionsUrl="function"==typeof t.getOptionsUrl&&t.getOptionsUrl,this._modifier=t.modifier,this._duplicates=new Map,this._createNewListItem=null,this._createNewList=null,this._fetchOnce=this._select.hasAttribute("data-fetch-once"),this._optionsLoaded=!1,this._list=(0,n.A)("ul",{id:"_cb"+b++,className:"ComboInput-list","aria-label":e.getAttribute("aria-label")||void 0,role:"listbox","aria-multiselectable":e.hasAttribute("multiple")||void 0,onclick:e=>{if(!e.target.getAttribute("data-create")){e.preventDefault(),e.stopPropagation();const t=e.target.classList.contains("ComboInput-check")?e.target.parentElement:e.target;t.classList.contains("ComboInput-option")&&this.updateValue(t.getAttribute("data-value"),t.getAttribute("data-missing-option"))}},onmouseover:e=>{const t=e.target.getAttribute("data-create")?e.target.closest(".ComboInput-option"):e.target;t.classList.contains("ComboInput-option")&&this._highlightOption(t,0)}}),this._label=(0,n.A)("div",{className:"ComboInput-label",dataset:{placeholder:e.getAttribute("data-placeholder")||e.getAttribute("placeholder")||""}});let o=e.closest(".SearchWidget-filter");if(o){let e=(0,i.A)(o,'input[type="checkbox"]');e&&e.closest(".SearchWidget-filter")===o&&(this._missing=e)}this.updateList();const a=(0,r.A)(this._list,".ComboInput-heading");for(let e=0;e<a.length;e++)a[e].getAttribute("data-value")&&this.updateSelection(a[e]);if(this.updateLabel(),this._filter=(0,n.A)("input",{type:"text",className:"ComboInput-filter","aria-autocomplete":"list","aria-controls":this._list.id,placeholder:window.CONTENT_SELECT_PLACEHOLDER?window.CONTENT_SELECT_PLACEHOLDER:"Search",oninput:this.filterList.bind(this)}),this._container=(0,n.A)("div",{id:e.id||void 0,className:"ComboInput",tabIndex:e.tabIndex||0,role:"combobox","aria-label":e.getAttribute("aria-label")||void 0,"aria-haspopup":"listbox","aria-owns":this._list.id,"aria-expanded":"false","aria-required":e.getAttribute("aria-required")||void 0,onclick:e=>{e.preventDefault(),this.toggleList()},onkeydown:e=>{if(e.ctrlKey||e.altKey||e.metaKey)return;const t=this._getActiveOption(),o="true"===this._container.getAttribute("aria-expanded");switch(e.key){case"Enter":if(this._select.classList.contains("is-readOnly"))return e.preventDefault(),void e.stopPropagation();if(!o)return this.showList(),void e.preventDefault();if(t){if(t.classList.contains("nested"))return e.preventDefault(),void this.toggleCreateNewList();if(t.dataset.sublist||t.dataset.create){const e=t.querySelector("a.objectId-create");e&&(e.click(),this.hideList())}else this.updateValue(t.getAttribute("data-value"),t.getAttribute("data-missing-option")),this.hideList();this._select.multiple||this._container.focus()}return e.preventDefault(),void e.stopPropagation();case"Escape":return void(this._container.matches('[aria-expanded="true"]')&&(this.hideList(),this._container.focus(),e.preventDefault(),e.stopPropagation()));case"ArrowUp":return this.showList(),this._highlightOption(t||this._list.firstChild,-1),this.scrollList(),e.preventDefault(),void e.stopPropagation();case"ArrowDown":return this.showList(),this._highlightOption(t||this._list.lastChild,1),this.scrollList(),e.preventDefault(),void e.stopPropagation();case"ArrowRight":return void this.focusFavorite();case"Tab":return void this.hideList()}this===p||e.shiftKey||this.showList()}},this._label,this._filter,this._list,(0,n.A)("span",{class:"ComboInput-icon","aria-hidden":!0})),!this._container.getAttribute("aria-label")||"type"===this._container.getAttribute("aria-label").toLowerCase()){const t=e.closest(".CIG-small")||e.closest(".CIG-large");if(t){let e=t.previousElementSibling;if(e&&!e.classList.contains("CIG-label")&&e.classList.contains("CIG-note")&&(e=e.previousElementSibling),e&&e.classList.contains("CIG-label")){const t=e.querySelector("label");if(t){const e=t.innerText;e&&this._container.setAttribute("aria-label",e)}}}}e.removeAttribute("id"),this._select.multiple?(this._container.classList.add("is-multiple"),this._container.setAttribute("aria-label",`${this._container.getAttribute("aria-label")}, ${window?.BRIGHTSPOT?.ui?.tooltips?.combo?.multi}`)):this._select.addEventListener("change",e=>{this.updateValue(e.target.value)});const s=new MutationObserver(t=>{let o;for(const n of t){for(const t of n.removedNodes)if(t===e)return void s.disconnect();"data-placeholder"!==n.attributeName&&"placeholder"!==n.attributeName||(o=!0)}o&&(this._label.dataset.placeholder=this._select.dataset.placeholder||this._select.getAttribute("placeholder")),this._select.value&&this._missing&&(this._missing.checked=!1,this._missing.dispatchEvent(new CustomEvent("change",{bubbles:!0}))),this.updateList(),this._setFocus(),this.updateLabel()}).observe(e,{childList:!0,subtree:!0,attributeFilter:["data-placeholder","placeholder"]});e.isConnected&&(e.hidden=!0,e.parentNode.insertBefore(this._container,e.nextSibling))}destroy(){this._container.remove(),this._list.remove(),this._select.hidden=!1;for(const e of[...this._select.classList])e.startsWith("_")&&this._select.classList.remove(e)}_reorderSelectOptions(){this._select.firstChild;for(const e of Array.from((0,r.A)(this._select,"option")).reverse())if(e.selected){const t=e.closest("optgroup")||this._select;t.insertBefore(e,t.firstChild)}}scrollList(){const e=this._getActiveOption();if(!e)return;const t=this._list.getBoundingClientRect(),o=e.getBoundingClientRect();o.bottom>t.bottom?e.scrollIntoView(!1):o.top<t.top&&e.scrollIntoView(!0)}toggleSelection(e,t){e.classList.toggle("is-checked");const o=t.getAttribute("data-value"),n=(0,r.A)(this._list,`.ComboInput-option[data-source="${CSS.escape(o)}"]`);for(let t=0;t<n.length;t++)n[t].setAttribute("aria-selected",e.classList.contains("is-checked"));this.updateLabel()}updateSelection(e){if(e){const t=e.getAttribute("data-value"),o=CSS.escape(t);let n=(0,r.A)(this._list,`.ComboInput-option[data-source="${o}"]:not([data-is-hidden])`);if(0===n.length)return void e.setAttribute("data-hidden",!0);const a=(0,r.A)(this._list,`.ComboInput-option[data-source="${o}"][aria-selected="true"]`);(0,i.A)(e,".ComboInput-selectOption").classList.toggle("is-checked",n.length>0&&n.length===a.length)}}updateList(){if(this._select.dataset.collapseDuplicateOptions)if(this._select.hasAttribute("multiple")){const e=Array.from(this._select.childNodes);for(const t of e){if(this._duplicates.has(t.value))continue;const o=e.filter(e=>e.textContent===t.textContent);o.length>1&&o.forEach((e,t)=>{0===t?this._duplicates.set(e.value,{display:!0,text:e.textContent}):this._duplicates.set(e.value,{display:!1,text:e.textContent})})}}else console.warn('Select element has "data-collapse-duplicate-options" without a "multiple" attribute.',this._select);this._list.innerHTML="",this._createOptions(this._select,0)}_createOptions(e,t,o,a){a||(a=0);for(const i of e.childNodes)switch(i.tagName){case"OPTGROUP":{const e=`${this._list.id}-g${a++}`,o=(0,n.A)("ul",{className:"ComboInput-optionGroup",role:"group","aria-labelledby":e}),r=(0,n.A)("div",{id:e,className:"ComboInput-heading"},i.label),s=(0,n.A)("li",r,o);i.getAttribute("data-select-option")&&(o.dataset.selectOption=i.dataset.selectOption,r.dataset.value=i.getAttribute("value"),r.appendChild((0,n.A)("span",{className:"ComboInput-selectOption",onclick:e=>{this.toggleSelection(e.target,r)}}))),this._list.appendChild(s),t=this._createOptions(i,t,o,a);break}case"OPTION":{let r=i.dataset.dropDownHtml||i.dataset.labelHtml;if(i.getAttribute("data-create"))if(i.getAttribute("data-create-types")&&!i.closest(".SearchWidget-filter")){const e=JSON.parse(i.dataset.createTypes);this._createNewList=(0,n.A)("ul",{role:"listbox",hidden:"true"},e.map(e=>(0,n.A)("li",{className:"ComboInput-option","data-sublist":!0,role:"none",id:`${this._list.id}-o${t++}`},(0,n.A)("a",{className:"objectId-create nested",tabIndex:"-1",href:e.href,target:`create-new-object-${this._list.id}`,"data-create":!0,"data-popup-mode":"noGap fromBottom",innerHTML:e.label||""})))),this._createNewListItem=(0,n.A)("li",{className:"ComboInput-option nested","data-create":!0,role:"button","aria-expanded":!1,"aria-label":i.label,id:`${this._list.id}-o${t++}`,onclick:e=>{"A"!==e.target.tagName&&(e.preventDefault(),e.stopPropagation(),this.toggleCreateNewList(),this._filter.focus())}},(0,n.A)("span",{innerHTML:i.label||"",className:"ComboInput-option-nestedLabel","data-create":!0},(0,n.A)("span",{className:"ComboInput-option-arrow"},(0,n.A)("span",{class:"ComboInput-option-arrow-icon","aria-hidden":!0}))),this._createNewList),this._list.insertBefore(this._createNewListItem,this._list.firstElementChild)}else i.getAttribute("data-create")&&!i.closest(".SearchWidget-filter")&&this._list.insertBefore((0,n.A)("li",{id:`${this._list.id}-o${t++}`,className:"ComboInput-option",role:"option","aria-selected":!1,"data-create":!0},(0,n.A)("span",{class:"ComboInput-check","aria-hidden":!0}),(0,n.A)("a",{className:"objectId-create",href:i.getAttribute("data-href"),target:`create-new-object-${this._list.id}`,"data-create":!0,"data-popup-mode":"noGap fromBottom",innerHTML:i.label||""})),this._list.firstElementChild);else{const a=(0,n.A)("li",{id:`${this._list.id}-o${t++}`,className:"ComboInput-option",role:"option","aria-selected":!(this._missing&&this._missing.checked)&&(i.selected||i.value===e.value),"data-value":i.value},(0,n.A)("span",{class:"ComboInput-check","aria-hidden":!0}),r?(0,n.A)("div",{className:"ComboInput-option-iframe",innerHTML:r}):i.label||"");if(a.textContent||!e.dataset.placeholder&&!e.getAttribute("placeholder")||a.appendChild((0,n.A)("div",{className:"ComboInput-option-iframe"},(0,n.A)("span",{className:"ContentSelector-placeholder"},e.dataset.placeholder||e.getAttribute("placeholder")))),this._duplicates.has(i.value)&&!this._duplicates.get(i.value).display&&a.classList.add("is-hidden"),!i.label&&a.children.length<=1&&(a.classList.add("is-empty"),a.setAttribute("aria-label",M?.combo?.empty)),"is-hidePlaceholder"===this._modifier){const e=""===i.value&&a.querySelector(".ContentSelector-placeholder");(a.classList.contains("is-empty")||e||"true"===i.dataset.allTypes)&&(a.role="presentation",a.setAttribute("aria-selected","false"),a.classList.add("ComboInput-placeholder-option"),a.classList.remove("ComboInput-option"))}if(this._duplicates.has(i.value)&&!this._duplicates.get(i.value).display&&a.classList.add("is-hidden"),i.getAttribute("data-can-favorite")){let e="ComboInput-option-favorite",t=M?.action?.unfavorite;if(!i.parentElement.getAttribute("data-favorites")){const o=this._select.querySelector("optgroup[data-favorites]");o&&o.querySelector(`option[value="${CSS.escape(i.value)}"]`)||(e+=" is-unstarred",t=M?.action?.favorite)}const o=(0,n.A)("button",{className:e,type:"button","data-id":i.value,title:t,"aria-label":t,onkeydown:async e=>{switch(e.code){case"ArrowLeft":return void this._filter.focus();case"ArrowUp":case"ArrowDown":return this._filter.focus(),this.showList(),this._highlightOption(this._getActiveOption(),"ArrowUp"===e.code?-1:1),void this.scrollList();case"Escape":return this.hideList(),this._container.focus(),void e.stopPropagation();case"Tab":return this._filter.focus(),void this.hideList()}},onclick:async e=>{let t;this._list.querySelectorAll(`\n .ComboInput-option-favorite[data-id="${CSS.escape(i.value)}"]`).forEach(e=>{const t=e.classList.contains("is-unstarred")?M?.action?.unfavorite:M?.action?.favorite;e.title=t,e.nextElementSibling.textContent=t,e.classList.toggle("is-unstarred"),e.setAttribute("aria-label",t)});let o=i.getAttribute("data-typeids");if(o){let e=o.split(",").join("&typeIds=");t=CONTEXT_PATH+"update-dropdown-favorites?action=update&typeIds="+e+"&id="+i.value}else t=CONTEXT_PATH+"update-dropdown-favorites?action=update&typeIds="+i.value;const n=new Headers;n.append("Brightspot-CSRF",c.A.get("bsp.csrf"));try{const e=await fetch(t,{method:"POST",headers:n});if(e.redirected&&e.url.includes(window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.auth.LogInPage"]))throw new Error("ComboInput: Redirected response received for click.")}catch(e){console.error(e)}}},(0,n.A)("span",{class:"ComboInput-option-favorite-icon","aria-hidden":!0}));a.appendChild(o),a.appendChild((0,n.A)("span",{"aria-live":"polite",class:"screen-reader-only"}))}i.getAttribute("data-source")&&a.setAttribute("data-source",i.getAttribute("data-source")),o?o.appendChild(a):this._list.appendChild(a)}break}}if(this._missing&&!(0,i.A)(this._list,"[data-missing-option=true]")){const e=(0,n.A)("li",{id:`${this._list.id}-o${t++}`,className:"ComboInput-option",role:"option","data-missing-option":!0,"aria-selected":this._missing.checked},(0,n.A)("span",{class:"ComboInput-check","aria-hidden":!0}),window.SEARCH_FILTER_IS_MISSING?window.SEARCH_FILTER_IS_MISSING:"Is Missing");this._list.firstElementChild.getAttribute("data-value")?this._list.insertBefore(e,this._list.firstElementChild):this._list.insertBefore(e,this._list.firstElementChild.nextElementSibling)}if(this._select.multiple&&this._select.getAttribute("data-allow-select-all")){const e=(0,n.A)("li",{id:`${this._list.id}-o${t++}`,className:"ComboInput-option",role:"option","data-select-all":!0,"aria-selected":(0,r.A)(this._list,"[aria-selected=true]").length===this._getOptions().length},(0,n.A)("span",{class:"ComboInput-check","aria-hidden":!0}),this._select.getAttribute("data-select-all-label"));this._list.insertBefore(e,this._list.firstElementChild)}return t}_getOptions(){return(0,r.A)(this._list,".ComboInput-option")}_highlightOption(e,t){if(!e)return;const o=[];for(const e of this._getOptions())e.classList.remove("is-active"),e.hidden||e.parentElement.hidden||o.push(e);const n=o.length;let i;for(let t=0;t<n;++t)if(e===o[t]){i=t;break}for(i=(i+t)%n;i<0;)i+=n;const r=o[i];r&&(this._filter.setAttribute("aria-activedescendant",r.id),r.classList.add("is-active"))}_getActiveOption(){return(0,i.A)(this._list,".ComboInput-option.is-active")}_setFocus(){let e=0;if(this._list.querySelector('li[aria-selected="true"]')){const t=this._getOptions();for(;e<t.length&&t[e].matches('[aria-selected="false"]');)e++}this._highlightOption((0,i.A)(this._list,".ComboInput-option"),e)}updateLabel(){this._label.innerHTML="",this._selectParent=this._select.parentElement,this._actionCreateEl=this._selectParent?this._selectParent.querySelector(".action.action-create"):null;const e=(0,i.A)(this._list,"[data-select-all=true][aria-selected=true]");if(e)this._label.appendChild((0,n.A)("div",{className:"ComboInput-selected"},e.textContent||""));else{const e=Array.prototype.filter.call(this._getOptions(),e=>"true"===e.getAttribute("aria-selected")&&!e.getAttribute("data-no-permission")),t=[];for(const o of e){const e=o.cloneNode(!0),n=this._select.closest(".SearchWidget-filterItem");let r;if(n&&this._select.classList.toggle("is-readOnly",n.parentNode.classList.contains("is-multiple")&&e.getAttribute("data-value")),e.querySelector("[data-id]")?.remove(),e.getAttribute("data-missing-option")){let t=(0,i.A)(this._list,'.ComboInput-option[data-value=""]');t||(t=(0,i.A)(this._list,".ComboInput-placeholder-option")),r=e.textContent+": "+t?.innerHTML}else r=e.innerHTML;r&&!t.some(e=>e===r)&&t.push(r)}let o;const r=t.length;r>0&&(this._select.closest(".CIG-row")?o=t.join(", "):(o=t[0],r>1&&(o+=" +"+(r-1)))),o&&(this._label.appendChild((0,n.A)("div",{className:"ComboInput-selected",innerHTML:o})),this._actionCreateEl&&this._actionCreateEl.setAttribute("aria-label",`${this._actionCreateEl.innerText.toLowerCase()} ${this._label.innerText}`))}}async populateFavorites(){if(this._select.querySelector("option[data-can-favorite]")){const t=this._select.parentNode.querySelector("input[data-typeids]"),o=this._select.getAttribute("data-typeIds");var e=this._select.options;const n=Array.from(e).map(e=>e.value),i=Array.from(e).some(e=>e.hasAttribute("data-typeids"));let r,a=new FormData;if(t&&i){const e=t.getAttribute("data-typeIds").split(",");r=CONTEXT_PATH+"update-dropdown-favorites?action=getExisting&isFavoritedType=false",e.forEach(e=>{a.append("validTypeIds",e)})}else o||n?(r=CONTEXT_PATH+"update-dropdown-favorites?action=getExisting&isFavoritedType=true",(o?o.split(","):n).forEach(e=>{a.append("validTypeIds",e)})):r=CONTEXT_PATH+"update-dropdown-favorites?action=getExisting&isFavoritedType=true";const s=new Headers;s.append("Brightspot-CSRF",c.A.get("bsp.csrf"));try{const e=await fetch(r,{method:"POST",headers:s,body:a});if(e.redirected&&e.url.includes(window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.auth.LogInPage"]))throw new Error("ComboInput: Redirected response received for favorites.");const t=await e.text(),o=(new DOMParser).parseFromString(t,"text/html").body.querySelector("optgroup"),n=this._select.querySelector("optgroup[data-favorites]");if(n){const e=Array.from(this._list.querySelectorAll('li[aria-selected="true"]')),t=new Set(e.map(e=>e.dataset.value));for(const e of this._select.querySelectorAll("option"))t.has(e.value)&&(e.selected=!0);n.remove()}if(o&&o.hasChildNodes()){const e=this._select.querySelector("option[data-all-types]"),t=this._select.querySelector("option[data-mirror]");e?e.after(o):t?t.after(o):this._select.prepend(o)}}catch(e){console.error(e)}}}focusFavorite(){const e=(this._getActiveOption()||this._list.lastChild).querySelector(".ComboInput-option-favorite");e&&e.focus()}showList(){if("true"===this._container.getAttribute("aria-expanded"))return!0;if(this._select.classList.contains("is-readOnly"))return;p&&p.hideList(),this._container.style.width=`${this._container.getBoundingClientRect().width}px`,this._container.setAttribute("aria-expanded","true"),this._filter.value="",this._filter.focus(),this.filterList(),this._setFocus();for(const e of(0,r.A)(this._list,".ComboInput-heading"))e.getAttribute("data-value")&&this.updateSelection(e);p=this,this._list.classList.add("is-expanded"),this._tether=new s.A(this._container,this._list);this._observer||(this._observer=new IntersectionObserver(this.handleIntersect,{root:null,rootMargin:"0px",threshold:0})),this._observer.observe(this._container)}hideList(){if("false"===this._container.getAttribute("aria-expanded"))return!0;if(this._observer&&this._observer.unobserve(this._container),this._tether&&this._tether.destroy(),this._filter.value="",this._filter.dispatchEvent(new Event("input",{bubbles:!0})),p=null,this._container.style.width="","true"===this._createNewListItem?.getAttribute("aria-expanded")&&this.toggleCreateNewList(),this._container.setAttribute("aria-expanded","false"),this._list.classList.remove("is-expanded"),this._select.multiple){const e=new Set;for(const t of this._getOptions())"true"!==t.getAttribute("aria-selected")||t.getAttribute("data-select-all")||e.add(t.getAttribute("data-value"));let t=!1;for(const o of(0,r.A)(this._select,"option")){const n=e.has(o.value);o.selected!==n&&(t=!0),o.selected=n}this._reorderSelectOptions(),t&&this._select.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}this._select.dispatchEvent(new CustomEvent("combo-input:hide",{bubbles:!0}))}toggleList(){"true"===this._container.getAttribute("aria-expanded")?this.hideList():this.showList()}toggleCreateNewList(){if("true"===this._container.getAttribute("aria-expanded")&&"true"===this._createNewListItem.getAttribute("aria-expanded")){this._createNewList.setAttribute("hidden",""),this._createNewListItem.setAttribute("aria-expanded","false");for(const e of this._createNewList.children)e?.setAttribute("role","none")}else if("false"===this._createNewListItem.getAttribute("aria-expanded")){this._createNewList.removeAttribute("hidden"),this._createNewListItem.setAttribute("aria-expanded","true");for(const e of this._createNewList.children)e?.setAttribute("role","option")}}async filterList(){const e=this._filter.value,t=this._getOptionsUrl?this._getOptionsUrl(this._filter.value):null;if(!t||this._fetchOnce&&this._optionsLoaded)if(e&&!this._select.getAttribute("data-dynamic-value-generator")){const t=new RegExp(e.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");let o;for(const e of this._getOptions())t.test(e.textContent)?(e.hidden=!1,o||(o=!0,this._highlightOption(e,0))):e.hidden=!0}else{for(const e of this._getOptions())e.hidden=!1;this.populateFavorites()}else{try{++this._getOptionsIndex;const e=this._getOptionsIndex,o=this._fetchOnce?this._getOptionsUrl(""):t,n=await fetch(o,{credentials:"include"});if(n.redirected&&n.url.includes(window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.auth.LogInPage"]))throw new Error("ComboInput: Redirected response received for options update.");const i=await n.text();if(this._getOptionsIndex===e){const e=[],t=new Set;!this._select.value&&this._select.firstChild&&(this._select.firstChild.selected=!0);for(const o of(0,r.A)(this._select,"option"))o.selected&&(e.push(o),t.add(o.value));this._select.innerHTML=i;for(const e of(0,r.A)(this._select,"option"))t.has(e.value)&&e.remove();const o=this._select.firstChild;for(const t of e)this._select.insertBefore(t,o);this._fetchOnce&&(this._optionsLoaded=!0)}}catch(e){console.error(e)}e&&0!==e.trim().length||this.populateFavorites()}}updateValue(e,t){const o=(0,i.A)(this._list,"[data-select-all=true]");if(this._select.multiple){if(o&&e===o.getAttribute("data-value"))o.setAttribute("aria-selected","true"!==o.getAttribute("aria-selected")),(0,r.A)(this._list,".ComboInput-option:not([data-select-all])").forEach(e=>{e.setAttribute("aria-selected",o.getAttribute("aria-selected"))});else{const t=CSS.escape(e),n=(0,i.A)(this._list,`.ComboInput-option[data-value="${t}"]`);if(!n)return;if(this._duplicates.has(e)){for(const e of this._duplicates.keys())if(this._duplicates.get(e).text===n.textContent){const t=(0,i.A)(this._list,`.ComboInput-option[data-value="${CSS.escape(e)}"]`);t.setAttribute("aria-selected","true"!==t.getAttribute("aria-selected"))}}else n.setAttribute("aria-selected","true"!==n.getAttribute("aria-selected"));o&&o.setAttribute("aria-selected",(0,r.A)(this._list,"[aria-selected=true]").length===this._getOptions().length);const a=n.getAttribute("data-source");null!=a&&this.updateSelection((0,i.A)(this._list,`.ComboInput-heading[data-value="${CSS.escape(a)}"]`))}this._filter.focus(),this._filter.select()}else{if(t){(0,i.A)(this._list,"[data-missing-option=true]").setAttribute("aria-selected",!this._missing.checked);const e=Array.from(this._getOptions()).find(e=>"option"===e.getAttribute("role")&&"true"===e.getAttribute("aria-selected")&&"true"!==e.getAttribute("data-missing-option"));e&&e.setAttribute("aria-selected","false")}else for(const t of this._getOptions())"option"===t.getAttribute("role")&&(e===t.getAttribute("data-value")?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"));this.hideList(),t?(this._missing.checked?this._missing.checked=!1:(this._missing.checked=!0,this._select.value=e),this._missing.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this._select.value!==e?(this._select.value=e,this._select.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._missing&&(this._missing.checked=!1,this._missing.dispatchEvent(new CustomEvent("change",{bubbles:!0})))):this._missing&&this._missing.checked&&(this._missing.checked=!1,this._missing.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}this.updateLabel()}}window.addEventListener("click",(0,a.A)(e=>{p&&!p._container.contains(e.target)&&p.hideList()}))},49080(e,t,o){"use strict";o(84978),o(25809);var n=o(32246),i=o(9968);(0,n.A)(".CommunityWidget",e=>{const t=e.querySelectorAll(".LinkTable td form");t.length&&t.forEach(e=>{const t=e.querySelector(".CommunityWidget-actionsToggle"),o=e.querySelector(".CommunityWidget-actionsList");t.addEventListener("click",n=>{i.A.toggle(t,o,()=>e.classList.toggle("is-actionsMenuOpen"))}),o.querySelectorAll("li button").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault();const o=e.closest("form");o.querySelector('input[name^="community.widget.workflow-transition"').value=e.getAttribute("value"),o.submit()})})})})},12857(e,t,o){"use strict";o(67219),o(44764),o(84978),o(39589),o(25809);var n=o(25734),i=o(79492),r=o.n(i),a=o(5292),s=o(95628),c=o(40627),p=o(68243),b=o(45594),M=o(47554),d=o(32246),l=o(36711),z=o(9968),u=o(27170),O=o(26594),A=o(47626),f=(o(13722),o(91672),o(7095));class h{static gcd(e,t){return t?h.gcd(t,e%t):e}static getObserver(){return this._observer??=new IntersectionObserver(e=>{for(const t of e){const e=t.target.querySelector(".Preview-overlayTooltip");if(t.isIntersecting)e?.setAttribute("position","top");else{if(null===t.rootBounds)return;const o=t.intersectionRect,n=t.boundingClientRect;n.bottom>o.bottom?e?.setAttribute("position","top"):n.top<o.top&&e?.setAttribute("position","bottom")}}},{threshold:1}),this._observer}constructor(){this.getPreviewFrame=e=>{let t;return e?t=document.querySelector(`iframe[data-container-id="${e}"]`):(t=document.querySelector(".ContentEdit-previewDisplay iframe:first-of-type"),t||(t=document.querySelector(".PreviewFrame-typeDisplay iframe:first-of-type"))),t},this.updateOverlays=(0,O.A)(()=>{const e=this.getPreviewFrame(this._previewContainerId);Object.assign(this._overlayFrame.style,{transform:e.style.transform,width:e.style.width}),this.Overlays?.forEach(e=>{this.setDimensions(e)})})}async initialize(e){this._previewContainerId=e.previewContainerId,this._allOverlays=e.overlays,this._pauseUpdate=!1;const t=document.createElement("iframe");t.src="about:blank",t.style="visibility:hidden;",t.setAttribute("onload","this.style.visibility='visible';"),t.scrolling="no",t.classList.add("Preview-overlayFrame"),t.setAttribute("role","none");const o=this.getPreviewFrame(this._previewContainerId);o.parentNode.insertBefore(t,o.nextSibling),t?.contentDocument?.body.classList.add("overlay-hidden"),this._overlayWindow=t.contentWindow,h._previewOverlays.set(this._previewContainerId,this._overlayWindow),this._overlayFrame=t,Object.assign(t.style,{background:"none",backgroundColor:"transparent",transform:o.style.transform,width:o.style.width}),this._viewport=parseInt(o.style.width,10),this._deferred=!1,this._overlayWindow.addEventListener("message",async({data:e})=>{if("object"!=typeof e)return;const t=e.type;if("BSP.ContentEdit.UpdateOverlayBehaviors"===t){const t=this.Overlays.get(e.key);this.update(t,t.element,{behaviors:e.behaviors})}else"BSP.Preview.UpdateOverlays"===t?e.overlays.forEach(e=>{const{id:t,name:o}=e;this.Overlays.get(`${t}/${o}`).hasFormField=!0}):"BSP.Preview.UpdateInitToggle"===t&&(this._deferred=e.deferPreviewInit)}),this._overlayWindow.addEventListener("click",e=>{if(e.target.closest(".Preview-overlay")){const t=e.target.closest(".Preview-overlay"),o=t.dataset.id+"/"+t.getAttribute("data-type"),i=this.Overlays.get(o);i&&(this.update(i,i.element,{isSelected:!0}),this.Overlays.forEach((e,t)=>{e.element&&t!==o&&this.update(e,e.element,{isSelected:!1,isHover:!1})}),n(i))}else this.Overlays?.forEach(e=>{this.update(e,e.element,{isSelected:!1})})});const n=e=>{let t=e.parentKey,o=e,n=[];const{left:i,right:r}=e.element.getBoundingClientRect(),a=this._overlayWindow.innerWidth,s=i-e.depth*h._gapSize>=0&&r+e.depth*h._gapSize<=a;for(;null!==t;){const e=this.Overlays.get(t),i=o.element?.getBoundingClientRect();n.push(e),e.element&&this.update(e,e.element,{isVisible:!0},{updateWidth:s,maxWidth:a,top:i.top,bottom:i.bottom,left:i.left,right:i.right}),t=e.parentKey,o=e}};let i,r,a,s=new Set;const c=(0,f.A)(100,e=>{if(void 0===this._deferred||!0===this._deferred)return;const t=this._overlayWindow.document;if(e.target.closest(".Preview-overlay")){const o=[...t.elementsFromPoint(e.clientX,e.clientY)].find(e=>e.classList.contains("Preview-imageOverlay"));(o&&!o.isSameNode(a)||!o&&a)&&t.querySelectorAll(".Preview-imageOverlay.is-visible").forEach(e=>e.classList.remove("is-visible")),o&&o.classList.add("is-visible"),a=o}else a&&t.querySelectorAll(".Preview-imageOverlay.is-visible").forEach(e=>e.classList.remove("is-visible"))});this._overlayWindow.addEventListener("mousemove",e=>{c(e)}),this._overlayWindow.addEventListener("mouseover",e=>{if(void 0===this._deferred||!0===this._deferred){const e=this.getPreviewFrame(this._previewContainerId);return this._deferred=!1,void e.contentWindow.postMessage({type:"BSP.Preview.Init"},"*")}const t=e.target,o=this._overlayWindow.document;this._pauseUpdate=!0;const a=o.querySelector(".Preview-overlay.is-selected");let c;if(a&&(c=a.dataset.id+"/"+a.getAttribute("data-type")),t.closest(".Preview-overlay")){const t=e.target.closest(".Preview-overlay"),o=t.dataset.id+"/"+t.getAttribute("data-type"),a=this.Overlays.get(o);if(a){this.update(a,a.element,{isHover:!0}),this.Overlays.forEach((e,t)=>{e.element&&t!==o&&this.update(e,e.element,{isHover:!1,isVisible:!1,isSelected:e.isSelected})});const e=i?.element.dataset.id+"/"+i?.element.getAttribute("data-type");i&&i.parentKey===o?(s.has(o)||s.add(o),n(r)):i&&e===a.parentKey&&s.has(o)?n(r):(n(a),r=a,s.clear(),s.add(o)),i=a}}else this.Overlays?.forEach((e,t)=>{e.element&&t!==c&&this.update(e,e.element,{isHover:!1,isVisible:!1,isSelected:e.isSelected})}),i=null,r=null,s.clear()}),t?.addEventListener("mouseleave",()=>{t?.contentDocument?.body.classList.remove("overlay-visible"),t?.contentDocument?.body.classList.add("overlay-hidden"),this._pauseUpdate=!1}),t?.addEventListener("mouseenter",()=>{t?.contentDocument?.body.classList.add("overlay-visible"),t?.contentDocument?.body.classList.remove("overlay-hidden"),this._pauseUpdate=!1}),this._updateInterval=setInterval(()=>{this._pauseUpdate||this.updateOverlays()},500),window.addEventListener("scroll",this.updateOverlays);const p=async()=>{const e=this._overlayWindow.document,t=e.documentElement,o=this.getPreviewFrame(this._previewContainerId),n=parseFloat(o.getAttribute("previewScale")),i=window.document.documentElement,r=i.getAttribute("dir")?i.getAttribute("dir"):"ltr",a=i.getAttribute("data-theme"),s=window.localStorage.getItem("BSP.Theme"),c=PREVIEW_EDIT_FIELD_PLACEHOLDER,p=e.body;t.setAttribute("dir","ltr"),t.setAttribute("data-preview-overlay",!0),p.style.background="none",p.style.backgroundColor="transparent",p.style.visibility="hidden";const b=e.createElement("link");e.head.appendChild(b),b.setAttribute("href","https://fonts.googleapis.com/css?family=Noto+Sans:400,700");const M=b.relList;M&&M.supports("preload")?(b.setAttribute("as","style"),b.setAttribute("rel","preload"),b.setAttribute("onload",'this.rel="stylesheet"'),b.setAttribute("crossOrigin","anonymous")):b.setAttribute("rel","stylesheet"),t.style.setProperty("--PreviewScale",`${n}`),n<.6&&t.classList.add("should-upscale"),t.setAttribute("dir",r),a&&t.setAttribute("data-theme",a),s&&this._overlayWindow.localStorage.setItem("BSP.Theme",s),t.setAttribute("data-preview-field-placeholder",c);const d=(()=>{const e=window.document.head;let t=[];const o=e.querySelector('link[id="dist-v4-css"]'),n=e.querySelector('link[id="dist-v5-css"]'),i=e.querySelector('script[id="dist-v4-js"]'),r=e.querySelector('script[id="dist-v5-js"]');let a=o||n||e.firstChild;const s=r?r.nextSibling:i.nextSibling;for(;a!==s;)"SCRIPT"!==a.tagName&&"LINK"!==a.tagName||t.push({tag:a.tagName,ref:a.getAttribute("href")||a.getAttribute("src"),id:a.dataset.id,text:a.textContent,isv4:a===i||a===o}),a=a.nextSibling;return t})();await(async()=>{await Promise.all(d.map(async t=>{await(async t=>new Promise(o=>{const n=t.tag,i=t.ref,r=t.id;let a=null;"LINK"===n?(a=e.createElement("link"),a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),a.setAttribute("href",i),t.isv4?a.onload=()=>{o()}:o()):"SCRIPT"===n&&(a=e.createElement("script"),a.setAttribute("type","text/javascript"),a.innerText=t.text,i&&a.setAttribute("src",i),t.isv4?a.onload=()=>{o()}:o()),r&&a.setAttribute("id",r),e.head.appendChild(a)}))(t)})),p.style.visibility="visible"})()};this._overlayFrame.contentDocument.getElementsByTagName("html")[0].style.setProperty("--PreviewScale",this._overlayFrame.getAttribute("previewScale")),"complete"===this._overlayWindow.document.readyState||"interactive"===this._overlayWindow.document.readyState?await p():await new Promise(e=>{this._overlayWindow.addEventListener("load",async()=>{await p(),e()})})}static async create(e){const t=new h;return await t.initialize(e),t}static getOverlayWindow(e){return h._previewOverlays.get(e)}reload(e,t,o){this._previewContainerId=t.previewContainerId,this._allOverlays=t.overlays,o&&o!==this._viewport&&(this._viewport=o,this.updateOverlays());const n=[...t.overlays.keys()];(e=new Map([...e.entries()].sort((e,t)=>e[1].parentKey===t[1].parentKey?n.indexOf(e[0])-n.indexOf(t[0]):e[0]===t[1].parentKey?-1:t[0]===e[1].parentKey?1:n.indexOf(e[1].parentRoot)-n.indexOf(t[1].parentRoot)))).forEach((e,t)=>{const o=this._allOverlays.get(t);if(o&&Object.assign(e,o),e.isShared||(e.linked=null),e.linked){const t=this._allOverlays.get(`${e.linked}`);t&&(e.dimensions=t.dimensions[`${e.linkedIdx}`]??e.dimensions)}}),this.Overlays?(e.forEach((e,t)=>{const o=this.Overlays.get(t);o?this.update(o,o.element,e):(this.Overlays.set(t,e),this.renderOverlay(e,t))}),this.Overlays.forEach((e,t)=>{const o=this._allOverlays.get(t);if(o){if(this.update(e,e.element,Object.assign({},o,{isRemoved:!1})),e.parentKey){const t=this.Overlays.get(e.parentKey);t&&this.update(t,t.element,{isRemoved:!1})}}else{if(e.parentKey&&this.Overlays.get(e.parentKey)){const t=this.Overlays.get(e.parentKey);let o=0;this.Overlays.forEach(t=>{t.parentKey&&t.parentKey===e.parentKey&&o++}),o<=1&&this.update(t,t.element,{isRemoved:!0})}this.update(e,e.element,{isRemoved:!0})}})):(this.Overlays=new Map(e),this.Overlays.forEach((e,t)=>{this.renderOverlay(e,t)})),this.ImageTooltips=new Map(t.imageData),this._overlayWindow.document.querySelectorAll(".Preview-imageOverlay").forEach(e=>{e.parentNode.removeChild(e)}),this.ImageTooltips.forEach((e,t)=>{this.renderImageTooltip(e)})}destroy(){clearInterval(this._updateInterval)}updateLabel(e,t){const o=e.querySelector(".Preview-overlayLabel");if(!o)return;o.textContent=t;const n=e.getBoundingClientRect().height,{height:i}=o.getBoundingClientRect();o.style.top=i>=n?`-${o.getBoundingClientRect().height}px`:"0px"}update(e,t,o,n){if(!t)return;let i=Object.assign(e,Object.fromEntries(Object.entries(o).filter(([e,t])=>null!=t)));if(i.isShared?(t.classList.add("is-shared"),t.dataset.editAction=i.isShared):(t.classList.remove("is-shared"),delete t.dataset.editAction),!0===i.isLocked?t.classList.add("is-locked"):!1===i.isLocked&&t.classList.remove("is-locked"),!0===i.isRoot)e.depth=1,t.classList.add("is-root");else if(!1===i.isRoot){const o=this.Overlays.get(e.parentKey);e.depth=o?.depth+1,e.parentRoot=o?.parentRoot,o?.isSelected&&(t.classList.add("is-visible"),e.isVisible=!0)}!0===i.isVisible?t.classList.add("is-visible"):!1===i.isVisible&&t.classList.remove("is-visible"),!0===i.isSelected?t.classList.add("is-selected"):!1===i.isSelected&&t.classList.remove("is-selected"),!0===i.isHover?t.classList.add("is-hover"):!1===i.isHover&&t.classList.remove("is-hover"),!0===i.isEmpty?t.classList.add("is-empty"):!1===i.isEmpty&&(this.updateLabel(t,e.label||e.name),t.classList.remove("is-empty")),!0===i.isRemoved?t.classList.add("is-removed"):t.classList.remove("is-removed"),this.setDimensions(e,n)}renderImageTooltip(e){const t=this._overlayWindow.document.body,o=document.createElement("div");o.classList.add("Preview-imageOverlay");const n=document.createElement("div");if(n.className="Preview-overlayTooltip",n.innerHTML="<b>Image</b>",e){const t=+e.width,o=+e.height;let i=null;if(n.classList.add("is-grid"),n.append((0,a.A)("span",(t>0?t:"auto")+" x "+(o>0?o:"auto"))),t>0&&o>0){const e=h.gcd(t,o);e>0&&(i=`${t/e}:${o/e}`)}n.append((0,a.A)("hr"),(0,a.A)("hr"),(0,a.A)("span",window.BRIGHTSPOT?.ui?.tooltips?.size),(0,a.A)("span",e.name),null!==i?(0,a.A)("span",window.BRIGHTSPOT?.ui?.tooltips?.aspectRatio):"",null!==i?(0,a.A)("span",i):"")}o.append(n),t.prepend(o),window.requestAnimationFrame(()=>{const{x:t,y:n,width:i,height:r}=e.rect,a=t+window.scrollX;Object.assign(o.style,{height:r,left:a,position:"absolute",top:n+window.scrollY,width:i})}),this.constructor.getObserver().observe(o)}renderOverlay(e){const t=this._overlayWindow.document,o=t.body,n=!!e.isEmpty,{id:i,name:r,type:s}=e;if(!i||!r)return;if("bspField"===s&&!e.dimensions&&!n)return;const c=t.createElement("div");c.classList.add("Preview-overlay"),c.dataset.id=i,c.dataset.type=r;const p=window.parent.parent;c.onclick=t=>{if(p){const t=c.dataset.type;let o=new Map;this.Overlays?.forEach((e,t)=>{if(e.isRoot){const e=this._allOverlays.get(t);e&&(e.isRoot=!0,o.set(t,e))}});let n=e.hasFormField,i=e.parentKey,r=[];for(;!n&&i;){const e=this.Overlays.get(i);r.push({id:e.id,name:e.name,type:e.type,isShared:e.isShared,parentKey:e.parentKey}),n=e.hasFormField,i=e.parentKey}p.postMessage({type:"BSP.Preview.OverlayClick",id:c.dataset.id,label:c.label,name:t.split("/")[0],behavior:c.dataset.editAction,overlayType:e.type,previewContainerId:this._previewContainerId,overlays:this._allOverlays,parentFields:r.reverse(),rootOverlays:o,isEnhancement:e.isEnhancement,hasFormField:e.hasFormField},"*")}},c.querySelector(".Preview-overlayLabel")?.remove();const b=(0,a.A)("div",{className:"Preview-overlayLabel"},e.label||e.name);c.appendChild(b);let M=null;"bspModule"!==e.type||e.isShared||(M=o.querySelector(`.Preview-overlay[data-id="${e.id}"]`)),M?o.insertBefore(c,M):(M=!e.isShared&&o.querySelector(".Preview-overlay.is-shared"),M?o.insertBefore(c,M):o.appendChild(c)),e.element=c,window.requestAnimationFrame(()=>{this.update(e,c,{id:i,name:r,behaviors:e.behaviors,isShared:e.isShared,isEmpty:void 0!==e.isEmpty&&e.isEmpty,isLocked:e.isLocked,isSelected:e.isSelected,isRoot:e.isRoot,isVisible:!1})})}setDimensions(e,t){const o=e.dimensions,n=e.element;if(!n)return;const i=t=>{const{x:o,y:i,width:r,height:a}=t,s=o+window.scrollX,c=s+r;Object.assign(n.style,{height:a,left:s-(0!==s&&"text"===e.internalType?10:0),position:"absolute",top:i+window.scrollY,width:r+(c!==this._overlayWindow.innerWidth&&"text"===e.internalType?20:0)})};if(o&&"bspField"===e.type&&(!e.children&&!e.fieldValue||e.isShared))i(o);else{const t=[...this.Overlays.values()].filter(t=>t.parentKey===e.id+"/"+e.name&&t.dimensions&&!Array.isArray(t.dimensions));if("bspModule"===e.type&&e.dimensions?.length)e.dimensions.forEach(e=>{i(e)});else if(t.length){let e=null,o=null,i=null,r=null;t.forEach(t=>{const n=t.dimensions;n&&(e=null!==e?Math.min(e,n.top):n.top,o=null!==o?Math.min(o,n.left):n.left,i=null!==i?Math.max(i,n.bottom):n.bottom,r=null!==r?Math.max(r,n.right):n.right)}),Object.assign(n.style,{width:r-o,left:o,position:"absolute",top:e,height:i-e})}else o&&i(o)}if(t){const{updateWidth:e,maxWidth:o}=t,{top:i,bottom:r,left:a,right:s}=n.getBoundingClientRect();let c=i,p=r,b=a,M=s;i>=t.top&&(c=t.top-h._gapSize),r<=t.bottom&&(p=t.bottom+h._gapSize),n.style.top=c,n.style.height=p-c,e&&(a>=t.left&&(b=t.left-h._gapSize),s<=t.right&&(M=t.right+h._gapSize),b>=0&&M<=o&&(n.style.left=b,n.style.width=M-b))}}}h._previewOverlays=new Map,h._gapSize=15;var m=o(66556);function q(e,t){if(!t.once||!t.hasExecuted)try{t.callback(e),t.hasExecuted=!0,t.once&&t.subscription&&(t.subscription.remove(),t.subscription=null)}catch(e){console.error("onRTEReady callback failed",e)}}const _=window.BRIGHTSPOT?.ui.tooltips;function W(e,t){const o=e.querySelector(t)?.htmlFor;o&&document.getElementById(o)?.focus()}const g=new Map;let y=0;function v(e,t,o){if(t){for(const n of(0,c.A)(t,o))e.appendChild("li"===o?n:(0,a.A)("li",{},n));t.remove()}}(0,d.A)([".ContentEdit.is-new",".StandardForm.is-new"],e=>{if(document.querySelector(".Admin-nav"))return;const t=e.querySelector(".CIG:not(:empty)");if(!t)return;let o;for(const e of t.querySelectorAll(":scope > [data-tab]")){const n=e.dataset.tab;if(o){if(o!==n)return void(0,d.A)(t,":scope > .TabBar",e=>{W(t,`:scope > .CIG-row:not(.inputContainer-readOnly)[data-tab="${Array.prototype.filter.call(e.querySelectorAll("button[data-tab]"),e=>!e.hidden)[0]?.dataset.tab}"] > .CIG-label > label`)})}else o=n}W(t,":scope > .CIG-row:not(.inputContainer-readOnly) > .CIG-label > label")}),(0,d.A)('.Popup[data-popup-source-class*="ContentSelector-edit"] button.Popup-heading',e=>{e.focus()}),(0,d.A)(".ContentEdit-top .Message",e=>{const t=e.closest(".ContentEdit").querySelector(".ContentEdit-main > .ContentEdit-title");t.parentNode.insertBefore(e,t.nextSibling)}),(0,d.A)(".ContentEdit",e=>{const t=e.closest(".Popup-content");t?t.classList.add("is-editing"):document.body.classList.add("is-editing");const o=(0,s.A)(e,".widget-publishing");if(!o)return;const n=(0,a.A)("ul",{className:"ContentEdit-controlsList",role:"menu","aria-label":_.actions?.contentEdit}),i=new MutationObserver(e=>{e.forEach(e=>{const t=e.target,o=t.classList.contains("is-locked");t.querySelectorAll("[accesskey]").forEach(e=>{o?e.setAttribute("disabled",""):e.removeAttribute("disabled")})})});i.observe(e,{attributeFilter:["class"]});const r=(0,s.A)(e,".ContentEdit-bar"),c=(0,s.A)(e,".widget-publishingExtra-left"),p=(0,s.A)(c,['[name="action-draft"]','[name="action-newDraft"]']),b=(0,s.A)(r,".ContentEdit-workflow")||(0,s.A)(r,".ContentEdit-publish");if(null!==p){const t=p.cloneNode(!0);"action-draft"===t.name&&t.addEventListener("click",()=>{const t=e.querySelector('input[name="publishDate"]');t&&(t.value="")}),b?r.insertBefore(t,b):r.appendChild(t),p.closest(".ContentEdit").classList.contains("is-new")||"action-draft"===p.getAttribute("name")?p.parentNode.remove():t.style.display="none"}v(n,(0,s.A)(e,".widget-contentCreate"),"li"),v(n,c,"li"),v(n,(0,s.A)(e,".widgetControls"),"a"),v(n,(0,s.A)(e,".widget-publishingExtra-right"),"li"),v(n,(0,s.A)(e,".widget-publishing > .widget-controls"),"a");const M=(0,s.A)(n,".widgetControlsEditInFull");M&&!e.closest(".Popup")&&M.closest("li").remove();const d=(0,a.A)("div",{className:"ContentEdit-controls"}),l=(0,a.A)("button",{className:"ContentEdit-controlsToggle",type:"button",title:_.actions?.actions,"aria-haspopup":"menu","aria-expanded":"false","aria-label":_.actions?.contentEdit,onclick:()=>{(0,m.AM)(n,l,d)}});(0,m.D1)(n,l),d.appendChild(l),d.appendChild(n),d.setAttribute("data-tether-anchor",""),o.appendChild(d)}),(0,d.A)(".ContentEdit-controlsList .DraftAndReturnAction",e=>e.setAttribute("aria-hidden","true")),(0,d.A)(".ContentEdit-controlsList .NewDraftAndReturnAction",e=>e.setAttribute("aria-hidden","true")),(0,d.A)(".ContentEdit-restore",e=>{const t=e.closest(".ContentEdit-controls");t.parentNode.insertBefore(e,t);const o=(0,a.A)("div",{className:"ContentEdit-restoreToggle",onclick:()=>{z.A.toggle(o,e,()=>e.classList.toggle("is-open",o.classList.toggle("is-open")))}},e.getAttribute("data-restore-label")||"restore");e.parentNode.insertBefore(o,e)}),(0,d.A)(".ContentEdit-workflow",e=>{const t=e.closest("btu-dialog");e.setAttribute("hidden","");const o=e=>{"Escape"===e.key?(t?.close(e),b.click(),b.focus()):"Tab"!==e.key||document.activeElement.closest(".ContentEdit-workflow.is-open")||document.activeElement.closest(".Popup.is-calendar")||document.activeElement.matches(".Page")||document.activeElement===b||b.click()},n=e=>{if(window.BRIGHTSPOT?.ui.cms.enableV5UI)return;const t=e.target.closest(".Popup"),o=(0,s.A)(document,".ProseMirror-fullscreen-container:not(.hide)");(t&&!e.target.matches(".Popup-close")||o&&e.target.closest(".ProseMirrorToolbar-action")||e.target.closest(".ProseMirror-fullscreen-container")||e.target.matches(".rte2-toolbar-fullscreen"))&&b.click()},i=(0,s.A)(e,".ContentEdit-workflowWrapper > .ContentEdit-workflowBody");let r=0;const p=(0,s.A)(e.parentNode,".ContentEdit-publish"),b=(0,a.A)("button",{"aria-expanded":!1,"aria-haspopup":!0,className:"ContentEdit-workflowToggle",onclick:()=>{if(z.A.toggle(b,e,()=>{const t=b.classList.toggle("is-open"),i=(0,s.A)(document,".Popup"),r=(0,s.A)(document,".ProseMirror-fullscreen-container:not(.hide)");return t?(e.removeAttribute("hidden"),window.addEventListener("keyup",o),window.addEventListener("click",n)):(window.removeEventListener("keyup",o),i||r||window.removeEventListener("click",n)),b.setAttribute("aria-expanded",t?"true":"false"),e.classList.toggle("is-open",t)}),p)for(const t of(0,c.A)(e,".ContentEdit-workflowWrapper"))t.classList.toggle("is-active","workflow"===t.getAttribute("data-name"))},type:"button"},e.getAttribute("data-workflow-label")||"Workflow");e.parentNode.insertBefore(b,e),e.closest(".ContentEdit").classList.add("is-workflow");const M=e.querySelectorAll('.ContentEdit-workflowActions button[name="action-workflow"]');if(e.querySelector(".ContentEdit-workflowActions button[data-workflow-comment-required]")&&(0,d.A)('.CIG-row[data-field-name="comment"] > .AutoExpand > textarea',e=>{e.addEventListener("input",()=>{M.forEach(t=>{t.disabled?""!==e.value.trim()?t.removeAttribute("disabled"):t.setAttribute("disabled","true"):""===e.value.trim()&&t.setAttribute("disabled","true")})})}),p){(0,s.A)(e,'.ContentEdit-workflowWrapper[data-name="publishOverride"] > .ContentEdit-workflowBody').appendChild(p),e.classList.add("is-publishOverride");for(const t of(0,c.A)(e,".ContentEdit-workflowWrapper > .ContentEdit-workflowLink"))t.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),"workflow"===t.parentNode.getAttribute("data-name")&&(r=i.offsetHeight+"%");for(const o of(0,c.A)(e,".ContentEdit-workflowWrapper"))o.classList.toggle("is-active",o.getAttribute("data-name")===t.getAttribute("data-action")),o.classList.contains("is-active")&&o.querySelector(".DateTimeInput, .AutoExpand textarea")?.focus();(0,s.A)(e,'.ContentEdit-workflowWrapper:not([data-name="workflow"]) > .ContentEdit-workflowBody').style.height=r})}}),(0,d.A)(".ContentEdit-publish .ContentEdit-publishButton",e=>{const t=e.closest(".ContentEdit-publish"),o=t.querySelector('input[name="publishDate.date"]'),n=t.querySelector('input[name="publishDate.time"]');if(!o||!n)return;const i=t.querySelector(".DateTimeInput"),r=(0,s.A)(e.parentNode.parentNode,".ContentEdit-overrideMessage"),a=e.textContent;function c(){o.value&&n.value?(t.classList.add("is-scheduling"),e.innerText=e.getAttribute("data-schedule-label"),i.classList.remove("is-empty")):(t.classList.remove("is-scheduling"),e.innerText=a,i.classList.add("is-empty")),r&&(r.innerHTML=t.classList.contains("is-scheduling")?r.getAttribute("data-schedule-message"):r.getAttribute("data-publish-message"))}c(),o.addEventListener("change",c),n.addEventListener("change",c);const p=t.querySelector('select[name="newSchedule"]');p&&p.addEventListener("change",c)}),(0,d.A)(".ContentEdit-workflowActions .ContentEdit-publishButton",e=>{const t=e.closest(".ContentEdit-workflowActions"),o=t.querySelector("input.ContentEdit-workflowScheduleDate"),n=t.querySelector("input.ContentEdit-workflowScheduleTime");if(!o||!n)return;const i=t.querySelector(".ContentEdit-workflowScheduleLink"),r=e.textContent;function a(){o.value&&n.value?(t.classList.add("is-scheduling"),e.innerText=e.getAttribute("data-schedule-label"),i&&i.classList.remove("is-empty")):(t.classList.remove("is-scheduling"),e.innerText=r,i&&i.classList.add("is-empty"))}a(),o.addEventListener("change",a),n.addEventListener("change",a)});const L=window.localStorage;let w=0;(0,d.A)(".ContentEdit",e=>{if(!e.querySelector(".ContentEdit-top"))return;const t=e.getAttribute("data-object-id"),o=e.closest(".Page-content, .Popup");if(!o)return;const i=o.querySelector(".ContentEdit-preview");if(!i)return;i.setAttribute("inert","");const r=i.querySelector(".PreviewFrame");if(!r)return;const a=i.querySelector(".PreviewFrame-typeFrame");if(!a)return;window.addEventListener("viewport-device-changed",e=>{window.requestAnimationFrame(()=>{R(t)?.contentWindow?.postMessage({type:"BSP.ContentEdit.ViewportDeviceChanged"},"*")})}),e.closest(".Page.is-previewToEdit")&&o.setAttribute("data-preview-menu",!1);const s=(0,O.A)(()=>{const e=a.querySelector(".PreviewFrame-typeDisplay");if(e){const t=e.querySelectorAll("iframe");if(t.length<1)return;const n=t[0],i=r.querySelector(".deviceWidthSelect");let s=n.getBoundingClientRect().width;if(n.style.transform="",n.style.width="",i){if(o){o.style.removeProperty("--ContentEdit-previewWidth");const e=i.options[i.selectedIndex];e&&(s=parseInt(e.getAttribute("data-device-width"),10),n.style.width=`${s}px`,s<r.getBoundingClientRect().width&&o.style.setProperty("--ContentEdit-previewWidth",`${s}px`))}}else o&&(o.style.removeProperty("--ContentEdit-previewWidth"),n.style.width="",s=1920);y=s;const c=e.clientWidth/s;n.style.transform=`scale(${c})`,n.setAttribute("previewScale",c),n.style.setProperty("--PreviewFrame-scale",c),h.getOverlayWindow(a.querySelector(":scope iframe:first-of-type").getAttribute("data-container-id"))?.dispatchEvent(new Event("resize"))}});let c=new A.A(r,s);const p=function(){window.addEventListener("resize",s),e.addEventListener("brightspot-content-state-change",()=>c.updatePreview())};window.ContentEditFields=new Map;const b=o.querySelector(".content-edit > .ContentEdit .ContentEdit-left");b&&(0,d.A)(b,'.inputContainer[data-tab="Main"]:not([type="hidden"])',e=>{const t=e.dataset.name;e.closest(".TC-unselected")&&window.ContentEditFields.has(t)?window.ContentEditFields.delete(t):window.ContentEditFields.set(t,e)}),(0,d.A)(e,":scope .ContentEdit-previewButton",t=>{t.type="button",t.ariaLabel=o.classList.contains("is-previewing")?_.preview.close:_.preview.open,t.title=t.ariaLabel;const r=t.closest(".ContentEdit-toolbar");t.onclick=function(){if(o.classList.toggle("is-previewing")){o.classList.contains("Popup")&&o.querySelector(":scope > .Popup-content")?.classList.add("is-previewing"),c.isVisible=!0,i.removeAttribute("inert"),t.title=_.preview.close,t.ariaLabel=_.preview.close,(0,n.iP)(_.preview.opened),L.removeItem("BSP.ContentEdit.previewClosed"),c.reloadPreview(),p();const a=r.querySelector("button.is-active[data-right-tab]");if((!window.BRIGHTSPOT?.ui?.cms?.enableV5UI||o.offsetWidth<900)&&a){const t=e.querySelector(`.ContentEdit-right[data-right-tab="${a.dataset.iconButtonName}"]`);C(a,t,{container:o,updateStorage:!0})}}else o.classList.contains("Popup")&&o.querySelector(":scope > .Popup-content")?.classList.remove("is-previewing"),c.isVisible=!1,i.setAttribute("inert",""),t.title=_.preview.open,t.ariaLabel=_.preview.open,(0,n.iP)(_.preview.closed),L.setItem("BSP.ContentEdit.previewClosed",1),setTimeout(function(){c.deletePreview()},500),window.removeEventListener("resize",s),e.removeEventListener("brightspot-content-state-change",()=>c.updatePreview())},window.innerWidth>=768&&!i.classList.contains("is-previewClosedByDefault")&&!L.getItem("BSP.ContentEdit.previewClosed")&&!o.classList.contains("is-previewing")?(t.title=_.preview.close,t.onclick()):o.classList.contains("is-previewing")&&(c.isVisible||(c.isVisible=!0),c.updatePreview(),p(),i.removeAttribute("inert"))})}),(0,d.A)(".ContentEdit",e=>{const t=e.querySelector(".ContentEdit-top");if(!t)return;const o=e.closest(".Page-content, .Popup");if(!o)return;const n=o.querySelector(".ContentEdit-preview");if(!n)return;let i=n.querySelector(".ContentEdit-previewControls");if(!i)return;let r=i.querySelector("form[id]");if(!r)return;let s=r.querySelector('input[name="_previewObject"]');const p=n.querySelector(".ContentEdit-previewDisplay");if(!p)return;const b=n.querySelector(".ContentEdit-previewTypes");let M=!0;const z=e.getAttribute("data-object-id");e.closest(".Page.is-previewToEdit")&&o.setAttribute("data-preview-menu",!1),(0,d.A)(".ContentEdit-preview",e=>{(0,d.A)(e,[".widget-preview > .ContentEdit-previewControls",'.frame.loaded[name^="previewControls"] .ContentEdit-previewControls'],e=>{const t=e.querySelector("form:last-of-type");if(t){const e=(0,a.A)("div",{class:"ContentEdit-secondaryPreviewControls"});(0,d.A)(t,":scope select:not(.deviceWidthSelect) + .ComboInput",t=>{e.appendChild(t)}),t.appendChild(e)}})}),e.addEventListener("brightspot-content-state-change",e=>{for(const t of(0,c.A)(i,'input[name="_previewObject"]'))t.value=e.detail});const A=document.createElement("A");A.className="ContentEdit-previewButton",A.href="#";const f=(0,a.A)("div",{className:"ContentEdit-previewButtonWrapper"},[(0,a.A)("div",{className:"ContentEdit-previewButtonCircle"}),A]),h=(0,O.A)(()=>{const e=p.querySelectorAll("iframe");if(e.length<1)return;const t=e[0],i=document.querySelector(".deviceWidthSelect");let r=t.getBoundingClientRect().width;if(t.style.transform="",t.style.width="",o.style.removeProperty("--ContentEdit-previewWidth"),i){const e=i.options[i.selectedIndex];e&&(r=parseInt(e.getAttribute("data-device-width"),10),t.style.width=`${r}px`,r<n.getBoundingClientRect().width&&o.style.setProperty("--ContentEdit-previewWidth",`${r}px`))}y=r,t.style.transform=`scale(${p.clientWidth/r})`});window.ContentEditFields=new Map;const m=o.querySelector(".content-edit > .ContentEdit .ContentEdit-left");m&&(0,d.A)(m,'.inputContainer[data-tab="Main"]:not([type="hidden"])',e=>{const t=e.dataset.name;e.closest(".TC-unselected")&&window.ContentEditFields.has(t)?window.ContentEditFields.delete(t):window.ContentEditFields.set(t,e)});const q=(0,u.A)(1e3,()=>{if(s&&""===s.value)return;const e=document.createElement("IFRAME");e.name="ContentEdit-previewFrame"+w++,p.insertBefore(e,p.firstChild),e.setAttribute("data-container-id",z);const t=e.closest(".Popup"),o=(e=null)=>{const o=t??document;o.querySelector(".ContentEdit-previewButtonWrapper")?.classList.toggle("is-animating",e)};o(!0),h(),e.onload=function(){const t=[];for(let o=e;o=o.nextElementSibling;)"IFRAME"!==o.tagName||o.classList.contains("Preview-overlayFrame")||t.push(o);const n=e.parentNode;t.forEach(e=>n.removeChild(e)),o(!1)},(0,l.A)(e,()=>o(!1)),r.target=e.name,r.submit()}),_=function(){window.addEventListener("resize",h),e.addEventListener("brightspot-content-state-change",q)},W=function(){window.removeEventListener("resize",h),e.removeEventListener("brightspot-content-state-change",q)};b&&(0,d.A)(".ContentEdit-previewTypesForm",e=>{const t=e.querySelector('select[name="previewType"]');M="true"===t.selectedOptions[0].getAttribute("data-refresh"),t.onchange=function(){p.innerHTML="",M="true"===t.selectedOptions[0].getAttribute("data-refresh"),q()};const n=b.querySelector('div[name^="previewControls"]');n.onload=function(){const e=s?.value;i=n.querySelector(".ContentEdit-previewControls"),r=i.querySelector("form[id]"),s=r.querySelector('input[name="_previewObject"]'),s&&""===s.value&&(s.value=e),o.classList.contains("is-previewing")&&(M||"true"===t.options[t.selectedIndex].getAttribute("data-refresh"))?(q(),_()):W()}}),A.onclick=function(){return o.classList.toggle("is-previewing")?(L.removeItem("BSP.ContentEdit.previewClosed"),L.removeItem("BSP.ContentEdit.rightPanel"),window.BRIGHTSPOT?.ui?.cms?.enableV5UI||o.style.setProperty("--ContentEdit-rightWidth","0px"),n.removeAttribute("inert"),M&&(q(),_())):(L.setItem("BSP.ContentEdit.previewClosed",1),n.setAttribute("inert",""),M&&(W(),setTimeout(function(){p.querySelectorAll(":scope > iframe").forEach(e=>e.remove())},500))),!1},t.insertBefore(f,t.firstChild),window.innerWidth>=768&&!n.classList.contains("is-previewClosedByDefault")&&!L.getItem("BSP.ContentEdit.previewClosed")&&A.onclick()}),(0,d.A)(".ContentEdit-title",e=>{const t=e.closest("form");if(!t)return;t.insertAdjacentElement("afterbegin",e);const o=(0,s.A)(e.closest(".content-edit"),".ContentEdit-overlayList");if(!o)return;e.insertBefore((0,a.A)("button",{className:"ContentEdit-overlay",type:"button","aria-haspopup":"true","aria-expanded":"false","aria-label":(0,s.A)(o,"li.selected").textContent,onclick:e=>{(0,m.AM)(o,e.target)}},(0,s.A)(o,"li.selected").textContent),e.firstChild);const n=e.querySelector(".ContentEdit-overlay");(0,m.D1)(o,n)});const R=e=>{let t;return e?t=document.querySelector(`iframe[data-container-id="${e}"]`):(t=document.querySelector(".ContentEdit-previewDisplay iframe:first-of-type"),t||(t=document.querySelector(".PreviewFrame-typeDisplay iframe:first-of-type"))),t};(0,d.A)(".CIG > .TabBar",e=>{const t=e.closest(".CIG");(0,d.A)(t,".CIG-row.is-overlaid",o=>{const n=o.dataset.tab,i=(0,s.A)(e,`:scope > .TabBar-item[data-tab="${n}"]`);if(!i)return;let r=0;for(const e of(0,c.A)(t,`:scope > [data-tab="${n}"]`))r+=e.classList.contains("is-overlaid")?1:(0,c.A)(e,".is-overlaid").length;const p=(0,s.A)(i,":scope > .Badge");r>0?p?p.textContent=r:(0,M.A)((0,a.A)("div",{className:"Badge"},r),i):p.remove()})}),(0,d.A)([".Page-content .publishing-workflow",".Popup .publishing-workflow"],e=>{const t=(0,s.A)(e,":scope > .progress"),o=(0,s.A)(e,":scope > ul"),n=(0,s.A)(o,".icon-step-forward"),i=(0,s.A)(o,".icon-stop");e.closest(".Page-content, .Popup").classList.add("is-workstream"),e.classList.add("ContentEdit-workstreamMessage"),e.removeAttribute("style"),t.classList.add("ContentEdit-workstreamProgressText"),t.removeAttribute("style"),o.classList.add("ContentEdit-workstreamActions"),n.classList.add("ContentEdit-workstreamSkip"),i.classList.add("ContentEdit-workstreamStop"),(0,b.A)(e,(0,p.A)((0,a.A)("div",{className:"ContentEdit-workstream"},(0,a.A)("div",{className:"ContentEdit-workstreamProgress"},(0,s.A)(t,":scope > .progressBar"),t),o),e))});const k=(e,t)=>{const o=(0,s.A)(document,`.CIG-row[data-name='${e}/${t}']`),n=(0,s.A)(document,`.EIG-title[data-object-id='${e}']`),i=(0,s.A)(document,`option[value='${e}'], input.objectId[value='${e}']`),r=(0,s.A)(document,`[data-rte-container] .Enhancement[data-state*="${e}"]`),a=(0,s.A)(document,`.RCIG-title[data-object-id="${e}"]`);if(o){const n=o.querySelector(`:scope .RCS ol[data-sortable-input-name='${e}/${t}']`);return n?{type:"RCS",element:n}:{type:"CIG",element:o}}return i?{type:"OPTION",element:i}:r?{type:"ENHANCEMENT",element:r}:n?{type:"EIG",element:n}:a?{type:"RCIG",element:a}:(console.debug("Form element does not exist for the preview overlay"),null)},T=(e,t,o,n)=>{if(e.classList.contains("is-new-item")&&e.classList.remove("is-new-item"),!e.closest(".is-preview-menu"))return;const i=e.parentNode;let r;const s=e.nextElementSibling,c=()=>{t.classList.remove("is-visible"),r.removeChild(M),d&&r.removeChild(d);const o=e.classList.contains("RCS-item")&&e.querySelector(":scope > .ContentSelector-clear");o&&o.classList.remove("is-visible"),i.insertBefore(e,s),r.remove()},p=(0,a.A)("div",{className:"Preview-popupCancel",onclick:e=>{c()}}),b=document.createElement("button");b.classList.add("is-save"),b.classList.add("is-dominant"),b.textContent="Save & Close";const M=(0,a.A)("div",{className:"ActionBar"});let d;M.appendChild(b),n&&(d=(0,a.A)("div",{className:"Preview-popupHeading"},n)),r=(0,a.A)("div",{className:"Preview-popup is-previewEditing"},d,e,p,M),o.appendChild(r),b.addEventListener("click",e=>{c()}),t.classList.add("is-visible")};window.addEventListener("message",async({data:e})=>{if("object"!=typeof e)return;const t=e.id,o=e.type,n=e.name;if("BSP.Preview.onChangedHeight"===o){const t=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(t){const o=t.closest(".Page-content, .Popup"),n=o?.querySelector(".ContentEdit-preview");n?.style.setProperty("--PreviewFrame-height",`${e.height}px`)}}else if("BSP.Preview.OverlayClick"===o){const o=e.parentFields,i=e.hasFormField,a=()=>{const a=k(t,n);if(!a)return;(0,c.A)(document.body,".RCIG-item").forEach(e=>{const t=(0,s.A)(e,":scope > .RCIG-title");t&&(e.contains(a.element)||e.isEqualNode(a.element)?e.classList.contains("is-collapsed")&&t.click():e.classList.contains("is-collapsed")||t.click())});const p=a.element.closest(".CIG-row");if(p&&p.classList.contains("is-inHiddenCluster"))for(let e=p;e=e.previousElementSibling;)if(e.classList.contains("CIG-title")){e.click();break}(e=>{if(!e)return;let t=e,o=null,n=[];const i=function(e){return e?e.closest("[data-tab]"):null};for(;o=i(t),o;){const e=o.getAttribute("data-tab"),i=o.parentNode.querySelector(":scope > .TabBar");i&&n.push(i.querySelector(`[data-tab="${e}"]`)),t=o.parentNode}return n})(a.element).forEach(e=>{e&&!e.classList.contains("is-selected")&&e.click()});const b=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});if("CIG"===a.type||"EIG"===a.type){r()(a.element,{align:{top:0,topOffset:10}});const e=a.element.querySelector(".CIG-small");e&&(0,d.A)(e,[":scope > btu-input input",":scope > textarea",":scope > btu-textarea-input > textarea",":scope > .ComboInput",":scope > input"],t=>{const o=e.querySelector(".ProseMirrorContainer > .ProseMirror");o?o.focus():t.focus()})}else if("RCS"===a.type){const e=a.element.closest(".CIG-small");if(e.classList.contains("RCS")){let t=a.element.closest(".RCS-item")??e;r()(t,{align:{top:0,topOffset:10}}),t.dispatchEvent(b)}else e&&(0,d.A)(e,":scope > .ComboInput",e=>{e.focus()}),r()(a.element.closest(".CIG-row"),{align:{top:0,topOffset:10}});a.element.dispatchEvent(b)}else if("OPTION"===a.type){const e=a.element.closest(".CIG-small");if(e.classList.contains("RCS")){let t=a.element.closest(".RCS-item")??e;r()(t,{align:{top:0,topOffset:0}}),t.dispatchEvent(b)}else e&&(0,d.A)(e,":scope > .ComboInput",e=>{e.focus()}),r()(a.element.closest(".CIG-row"),{align:{top:0,topOffset:10}});a.element.dispatchEvent(b)}else if("RCIG"===a.type)r()(a.element,{align:{top:0,topOffset:10}});else if("ENHANCEMENT"===a.type){let e,t=0;const o=a.element.closest(".ProseMirrorContainer");o&&(t=o.querySelector(".ProseMirrorToolbar")?.offsetHeight);let n=parseInt(window.getComputedStyle(a.element).marginTop);isNaN(n)||(e=Math.abs(t-n)),r()(a.element,{align:{top:0,topOffset:e}})}if(e.behavior){let e=a.element;"OPTION"===a.type&&e.closest(".RCS-item")&&(e=e.closest(".RCS-item"));const t=e.querySelector(".ContentSelector-edit");t?.click()}i||(o.push({id:e.id,name:e.name}),h.getOverlayWindow(e.previewContainerId).postMessage({type:"BSP.Preview.UpdateOverlays",overlays:o},"*"))},p=t=>{const o=t.key,{id:n,name:i,overlayType:r,isEnhancement:s}=e;let c;s?c=`.CIG-row[data-name='${o}'] .ProseMirrorContainer`:"bspField"===r?c=`.CIG-row[data-name='${n}/${i}']`:"bspModule"===r&&(c="RCS"===t.ui.type?`input.objectId[value="${n}"]`:`.repeatableLabel[data-object-id="${n}"]`),(0,d.A)(c,()=>{a()})};if(i)a();else{let t=[];o.forEach((o,n)=>{const{id:i,name:a,type:s}=o;let c="";"bspField"===s?c=`.CIG-row[data-name='${i}/${a}']`:"bspModule"===s&&(c=`.repeatableLabel[data-object-id="${i}"]`);const p=(t,o)=>{(0,d.A)(c,()=>{let n=k(i,a);if(!n)return void o("Could not load edit ui: fields for one or more parent overlay(s) are missing in the form");const s=n.element;r()(s,{align:{top:0,topOffset:10}}),e.isEnhancement&&function(t,o){const{once:n=!0}={},i="string"==typeof o?document.querySelector(o):o;if(!(i instanceof HTMLTextAreaElement))return()=>{};const a={callback:t=>{const o=t.view.dom.querySelector(`[data-state*='_id":"${e.id}']`);o&&(r()(o),o.click())},once:n,hasExecuted:!1,subscription:null};return null!==(s=i)&&"rte"in s&&"object"==typeof s.rte&&i.rte.loaded&&(q(i.rte,a),n)?()=>{}:(a.subscription=window.PubSub.subscribe("rteLoaded",e=>{e.ctx===i&&q(e,a)}),()=>a.subscription?.remove());var s}(0,s.querySelector("textarea.richtext")),"RCIG"===n.type&&s?.closest(".is-collapsed")&&s.click();const c=s.closest(".CIG-row");if(c&&c.classList.contains("is-inHiddenCluster"))for(let e=c;e=e.previousElementSibling;)if(e.classList.contains("CIG-title")){e.click();break}t&&t({ui:n,key:i+"/"+a})})};t.push(new Promise((e,t)=>{p(e,t)}))}),Promise.all(t).then(e=>{const t=e[e.length-1];p(t)}).catch(e=>{console.debug(e)})}}else if("BSP.Preview.ContentLoad"===o){const t=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`),o=t?.closest(".Page-content.is-previewing")||t?.closest(".Popup.is-previewing"),n=document.activeElement;let i=n.closest(".Preview-overlayFrame")||n.closest(`iframe[data-container-id="${e.previewContainerId}"]`),r=!o||!i;const a=R(e.previewContainerId);a?.contentWindow.postMessage({type:"BSP.Preview.UpdateInitToggle",deferPreviewInit:r},"*");let s=h.getOverlayWindow(e.previewContainerId);s?.postMessage({type:"BSP.Preview.UpdateInitToggle",deferPreviewInit:r},"*")}else if("BSP.Preview.DOMParsed"===o){const t=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(!t?.closest(".Page-content.is-previewing")&&!t?.closest(".Popup.is-previewing"))return;let o=new Map;const n=(e,t,n)=>{o.set(e,t),n&&("bspModule"!==n.type||n.dimensions||(n.childKeys?n.childKeys.push(e):n.childKeys=[e]))},i=(t,r,a,s,c)=>{const p=t===e.previewContainerId,b=o.get(c),M=r.querySelector(`.RCIG-title[data-object-id="${t}"]`),d=r.querySelector(`.EIG-title[data-object-id="${t}"]`);let l,z;const u=r.querySelector(`.objectInputs[data-object-id="${t}"]`);if(!M&&!d||u){let o=a,b=s;if(z=u||r,l=[...z.querySelectorAll(`div.inputContainer[data-name^="${t}"]:not([hidden])`)].filter(e=>!e.closest(".TC-unselected")),M||d){const t=e.overlays.get(c);b=c;let i={id:c.split("/")[0],hasFormField:!0,parentKey:s,parentRoot:a.parentRoot,depth:a.depth+1,type:"bspModule",name:c.split("/")[1]};t&&(i=Object.assign(i,t)),n(c,i,o),o=i}l.forEach(t=>{const a=t.dataset.name;let s;const c=e.overlays.get(a);let M,d;if(!c||c.isEmpty)return;if("bspField"===c.type){M=!p&&t.querySelector(`select[name="${a}.id"]`),d=t.querySelector(`select[name="${a}.id"]`);const e=S(a,t,c.fieldValue?.split("/")[0]),i=c.hasElement;if(e&&!i)return;let r=`${a}_acEdit`;e&&(e.dataset.previewAction=r),s=Object.assign({isShared:!!e&&r,isLocked:E(t),isInitialized:!0,depth:p?1:o.depth+1,parentRoot:p?a:o.parentRoot,parentKey:p?null:b,hasFormField:!0,isDropdown:d},c),M||n(a,s,o)}else"bspModule"===c.type&&c.referencesRichText&&r.querySelectorAll(".Enhancement").forEach(e=>{e.dataset.state&&JSON.parse(e.dataset.state)._id===c.id&&(s=Object.assign({isShared:!1,isInitialized:!0,depth:p?1:o.depth+1,parentRoot:o.parentRoot,parentKey:b,hasFormField:!0},c),n(a,s,o))});let l=[];s.children?l=[...s.children]:!s.isShared&&s.fieldValue&&l.push(s.fieldValue);const z=t.querySelector(`.RCS ol[data-sortable-input-name='${a}']`);if("text"===s.internalType){const o=function(t){(new DOMParser).parseFromString(t,"text/html").querySelectorAll("[data-state]").forEach(t=>{const o=t.getAttribute("data-state"),i=JSON.parse(o);i&&Object.keys(i).forEach(t=>{if(!/^_|^theme./.test(t)){const o=i._id+"/"+t,r=e.overlays.get(o);r&&!r.isInitialized&&n(o,Object.assign({behaviors:!1,isLocked:!1,isInitialized:!0,isRoot:!1,parentKey:a,depth:s.depth+1,hasFormField:!1,isEnhancement:!0,parentRoot:s.parentRoot},r),s)}})})},i=t.querySelector('[data-rte-container="true"]'),r=t.querySelector("textarea");i&&r&&(i.dataset.value?o(i.dataset.value):r.value&&o(r.value))}const u=z?.querySelectorAll(`input[name="${a}"]`);l?.forEach((r,c)=>{const p=e.overlays.get(r);let d,l,O=r.split("/")[0],A=`${a}_${O}_acEdit`;z&&(d=[...u].find(e=>e.value===O),l=S(O,d,void 0,a),l&&(l.dataset.previewAction=A));const f={id:O,isInitialized:!0,parentKey:a,parentRoot:s.parentRoot,depth:s.depth+1,type:"bspModule",name:r.split("/")[1],isShared:!(!d||!l)&&A,hasFormField:!0};d&&d.dataset.label&&(f.label=d.dataset.label),M?i(r.split("/")[0],t,o,b,r):(p?n(r,Object.assign(f,p),s):(n(r,f,s),e.overlays.set(r,Object.assign({},f))),i(r.split("/")[0],t,s,a,r))})})}else{let o=[];const i=r.querySelector(`input[name="${s}.id"][value="${t}"]`)?.parentNode,a=i?.querySelector(`input[name="${s}.data"]`).value;if(a){const t=JSON.parse(a),i=(t,r,a,s)=>{let c=a.children?.find(e=>e.split("/")[0]===t._id),p=a;if(c){const t=e.overlays.get(c);let o={id:c.split("/")[0],hasFormField:!1,parentKey:a.id+"/"+a.name,parentRoot:a.parentRoot,depth:a.depth+1,type:"bspModule",name:c.split("/")[1]};t&&(o=Object.assign(o,t)),n(c,o,a),p=o}r.forEach(r=>{if(!/^_|^theme./.test(r)){let c,b,M;const d=t[r];if(t._id){const i=t._id+"/"+r;o.push(i);const a=e.overlays.get(i);a&&(d&&"object"==typeof d&&(b=Object.keys(d).includes(a.name),Object.keys(d).find(e=>!/^_|^theme./.test(e))||(M=!0)),b&&!s||(c=Object.assign({parentKey:p.id+"/"+p.name,parentRoot:p.parentRoot,depth:p.depth+1,isInitialized:!0,hasFormField:!1,isShared:t[r]._ref?i+"_acEdit":null,isEnhancement:!!s,isDropdown:M},a),n(i,c,p)))}!s&&(b?c=p:c||(c=a),d)&&("object"==typeof d?Array.isArray(d)?d.forEach(t=>{if(t._ref){const o=c.children?.find(e=>t._ref===e.split("/")[0]),i=e.overlays.get(o);if(i){const e=Object.assign({parentKey:c.id+"/"+c.name,parentRoot:c.parentRoot,depth:p.depth+1,isInitialized:!0,hasFormField:!1,isShared:c.id+"/"+c.name+"_"+i.id+"_acEdit"});n(o,e,c)}}else i(t,Object.keys(t),c)}):i(d,Object.keys(d),c):"string"==typeof d&&(new DOMParser).parseFromString(d,"text/html").querySelectorAll("[data-state]").forEach(e=>{const t=e.getAttribute("data-state"),o=JSON.parse(t);o&&i(o,Object.keys(o),c,!0)}))}})};i(t,Object.keys(t),b)}}};if(i(e.previewContainerId,document),[...o.values()].filter(e=>e.isDropdown&&!e.linked&&!e.isShared).forEach(e=>{const t=e.id+"/"+e.name;[...o.values()].find(e=>e.parentKey===t&&e.dimensions)?delete e.isDropdown:o.delete(t)}),g.get(e.previewContainerId)){let t=R(e.previewContainerId);g.get(e.previewContainerId)?._overlayFrame.contentDocument.getElementsByTagName("html")[0].style.setProperty("--PreviewScale",t.getAttribute("previewScale")),g.get(e.previewContainerId).reload(o,e,y)}else{const t=await h.create(e);g.set(e.previewContainerId,t),g.get(e.previewContainerId).reload(o,e,y),(0,l.A)(g.get(e.previewContainerId)._overlayFrame,()=>{g.get(e.previewContainerId).destroy(),g.get(e.previewContainerId),g.delete(e.previewContainerId)})}}else if("BSP.Preview.OverlayActionClick"===o){const t=e.key,o=document.querySelector(`.CIG-row[data-name="${t}"]`),n=document.querySelector(".ContentEdit-previewModal"),i=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(e.handler){const t=(e.elementId?document.querySelector(`.repeatableLabel[data-object-id="${e.elementId}"]`):null).parentElement;return"moveUp"===e.handler?t.parentElement.insertBefore(t,t.previousElementSibling):"moveDown"===e.handler&&t.parentElement.insertBefore(t,t.nextElementSibling?.nextElementSibling),void i.dispatchEvent(new Event("change",{bubbles:!0}))}if("text"===e.internalType)T(o,n,i);else{const t=e.elementId?document.querySelector(`.repeatableLabel[data-object-id="${e.elementId}"]`):null,o=(t?t.parentNode:document).querySelector(`[data-preview-action="${e.actionId}"]`);if(o.classList.contains("RCIG-addSelect")?(0,d.A)(o,":scope > .ComboInput",e=>{e.click()}):o.click(),t&&o.classList.contains("removeButton")&&(t.click(),r()(t)),o.classList.contains("RCIG-add")){const e=o.closest(".RCIG");(0,d.A)(e,":scope > .RCIG-list > li.RCIG-item.is-new-item",e=>{T(e,n,i)})}else if(o.classList.contains("RCS-add")){const t=o.closest(".RCS"),r=e.label;(0,d.A)(t,":scope > .RCS-list > li.RCS-item.is-new-item",e=>{T(e,n,i,r)})}else if(o.classList.contains("EIG-add")){const e=o.closest(".EIG");(0,d.A)(e,":scope > .EIG-item",e=>{T(e,n,i)})}else{const e=o.closest(".RCIG-item, .EIG-item");T(e,n,i)}}}});const S=(e,t,o,n)=>{if(null===t)return;let i,r=t.querySelector(`input[name="${e}"]`);return r&&!n?(o&&(r=t.querySelector(`input[name="${o}/${e.split("/")[1]}"]`)??r),r&&(i=!(r.parentNode.classList.contains("RCIG-item")||r.parentNode.classList.contains("RCS-item"))&&r.parentNode.querySelector(":scope > .ContentSelector-edit"))):t.getAttribute("name")===n&&(i=t.parentNode.querySelector(":scope > .ContentSelector-edit")),i},E=e=>!!e.closest(".is-readOnly")||!!(e.classList.contains("is-readOnly")||e.classList.contains("is-pending")||e.closest(".is-pending"))||!!e.closest(".is-locked")||null;function N(e,t){if(!e.closest(".Page.is-guideOpen"))return;const o=[];for(let t,n=e;t=n.closest(".CIG-row");)n=t.closest(".CIG"),o.unshift({typeId:n.dataset.typeId,field:t.dataset.fieldName});if(o.length<1)return;let n="";for(let e=0,i=o.length;e<i;++e){const{typeId:r,field:a}=o[e];if(n+=`.Guide-content[data-type-id="${r}"] > .Guide-field[data-field="${a}"] `,e+1===i){const i=document.querySelector(`${n} > form > select`);i&&(i.value=t(o[e]),i.dispatchEvent(new Event("change",{bubbles:!0})))}}const i=new MutationObserver(async()=>{const e=document.querySelector(n);e&&(i.disconnect(),e.scrollIntoView(),e.classList.add("is-focus"))});i.observe(document,{attributes:!0,childList:!0,subtree:!0})}(0,d.A)([".ContentEdit",".enhancementForm",".standardForm"],e=>{e.addEventListener("focusin",({target:e})=>{N(e,e=>e.typeId)}),e.addEventListener("focusout",()=>{for(const e of document.querySelectorAll(".Guide-field"))e.classList.remove("is-focus")})}),(0,d.A)('.CIG-row[data-type="record"] > .CIG-small > select, .CIG-row[data-type="record"] > .CIG-small > btu-toggleable > select',e=>{e.addEventListener("change",()=>{N(e,()=>{const t=e.selectedIndex;return t>=0?e.options[t].dataset.type:null})})}),(0,d.A)(".Guide-field.is-embedded",e=>{const t=e.querySelector("select");if(!t)return;const o=e.closest(".Guide-content[data-type-id]")?.dataset?.typeId;if(!o)return;const n=document.querySelector(`.CIG[data-type-id='${o}'] > .CIG-row[data-field-name='${e.dataset.field}'] .CIG`)?.dataset?.typeId;n&&(t.value=n,t.dispatchEvent(new Event("change",{bubbles:!0})),t.form.requestSubmit())});const B="BSP.ContentEdit.rightPanel",C=(e,t,o)=>{const n=e.classList.toggle("is-active");e.ariaExpanded=n,t.classList.toggle("is-visible",n);const i=t.querySelector(".ContentEdit-right-title")?.textContent;if(e.ariaLabel=`${n?_.close:_.open} ${i}`,e.title=e.ariaLabel,"manage_search"!==e.dataset.iconButtonName){const t=e.closest(".ContentEdit-toolbar"),i=o?.container||t?.closest(".Page-content, .Popup-content, .Popup");if(i)if(n)i.classList.add("has-widget-panel-open");else{const e=t?.querySelector('button.is-active:not([data-icon-button-name="manage_search"])');e||i.classList.remove("has-widget-panel-open")}}if(!o)return;const{container:r,updateStorage:a}=o;let s;r&&(s=n?t.dataset.width:"0px",r.style.setProperty("--ContentEdit-rightWidth",s)),!r.classList.contains("Popup")&&a&&(n?L.setItem(B,e.dataset.iconButtonName):L.removeItem(B))};(0,d.A)(".ContentEdit-toolbar",e=>{const t=e.closest(".Page-content, .Popup-content, .Popup");t.style.setProperty("--ContentEdit-rightWidth","0px");const o=e.closest(".ContentEdit");if(!o)return;const n=o.dataset.objectId,i=L.getItem(B);[...e.querySelectorAll("button[data-right-tab]")].forEach(r=>{if("manage_search"===r.dataset.iconButtonName)return;const a=r.dataset.iconButtonName,s=o.querySelector(`.ContentEdit-right[data-right-tab="${a}"]`);if(!s)return;const c=n+"/"+a;if(s.id=c,!s.dataset.width){const e=getComputedStyle(s).getPropertyValue("--contentRight-width");s.dataset.width=parseFloat(e)?e:"320px"}r.setAttribute("aria-controls",s.id);const p=`${_.open} ${r.ariaLabel}`;r.ariaLabel=p,r.title=p,r.ariaExpanded=!1,(0,d.A)(".ContentEdit-right .Widget.is-error",e=>{const t=e.closest(".ContentEdit-right");if(!t)return;const o=document.querySelector(`button[aria-controls="${t.id}"]`);o&&o.classList.add("is-error")});const b=s.querySelector(".ContentEdit-right-close");b.ariaLabel=_.close,b.title=_.close,b.onclick=()=>{C(r,s,{container:t,updateStorage:!0}),r.focus()},r.onclick=n=>{const i=e.querySelector('button.is-active:not([data-icon-button-name="manage_search"])'),c=r.classList.contains("is-active");if(window.BRIGHTSPOT?.ui?.cms?.enableV5UI&&!c&&t.classList.contains("is-previewing")&&t.offsetWidth<900){const t=e.querySelector(".ContentEdit-previewButton");t?.click()}if(C(r,s,{container:t,updateStorage:!0}),i){if(i.dataset.iconButtonName!==a){const e=o.querySelector(`.ContentEdit-right.is-visible[data-right-tab=${i.dataset.iconButtonName}]`);C(i,e)}}else!window.BRIGHTSPOT?.ui.cms.enableV5UI&&t.classList.contains("is-previewing")&&e.querySelector(".ContentEdit-previewButton").click();!c&&r.classList.contains("is-active")&&n.isTrusted&&t.addEventListener("transitionend",function e(o){"grid-template-columns"===o.propertyName&&(t.removeEventListener("transitionend",e),r.classList.contains("is-active")&&b.focus())})},i===a&&r.click()}),window.BRIGHTSPOT?.ui?.cms?.enableV5UI&&new ResizeObserver(()=>{if(t.offsetWidth<900&&t.classList.contains("is-previewing")&&t.querySelector(".ContentEdit-right.is-visible")){const t=e.querySelector(".ContentEdit-previewButton");t?.click()}}).observe(t)})},52265(e,t,o){"use strict";o(44764),o(84978),o(25809);var n=o(53186),i=o.n(n),r=o(88903),a=o(32246),s=o(5292),c=o(52215);let p,b=!1;const M=[];function d(e,t,o,n,i,a){if(clearInterval(e),t.emit(a+".leaving",o),l(i)&&0===n.length)if(navigator.sendBeacon){const e=new FormData;e.append("unlock",!0),e.append("contentId",a),e.append("_csrf",r.A.get("bsp.csrf")),navigator.sendBeacon(CONTEXT_PATH+"contentLock",e)}else fetch(CONTEXT_PATH+"contentLock",{method:"POST",headers:{"Brightspot-CSRF":r.A.get("bsp.csrf"),"Content-Type":"application/x-www-form-urlencoded"},body:"unlock=true&contentId="+a}).catch(e=>console.log(e))}function l(e){return document.documentElement.getAttribute("data-user-id")===e.getAttribute("data-content-lock-owner")}function z(e,t){fetch(CONTEXT_PATH+"contentLock"+t).then(function(e){if(!e.ok)throw Error(e.statusText);return e.text()}).then(function(t){try{const o=JSON.parse(t);Array.isArray(e)?function(e,t){e.forEach(e=>{const o=e.getAttribute("data-rtc-content-id"),n=t.lockOwnerIds[o];n&&(e.setAttribute("data-content-lock-owner",n),A(e,n))})}(e,o):"FORM"===e.nodeName&&u(e,o)}catch(e){console.error(e)}}).catch(t=>{Array.isArray(e)||"FORM"!==e.nodeName||function(e){if(!l(e)||b)return;const t=e.getAttribute("data-lock-network-timeout"),o=(0,s.A)("div",{className:"ContentLockMessage-timeout message message-error"}),n=(0,s.A)("span");n.innerHTML="Disconnected from network. Trying to reconnect. The lock might be dropped in: ";const i=(0,s.A)("span",{class:"ContentLockTimer"});i.innerHTML=(t<10?"0"+t:t)+":00",o.appendChild(n),o.appendChild(i);const r=e.querySelector(".ContentEdit-main")||e;r.insertBefore(o,r.firstChild),b=!0,function(e,t){let o,n,i=e;const r=setInterval(function(){o=parseInt(i/60,10),n=parseInt(i%60,10),o=o<10?"0"+o:o,n=n<10?"0"+n:n,t.textContent=o+":"+n,(--i<0||!b)&&clearInterval(r)},1e3)}(60*t-1,i)}(e),console.error(t)})}function u(e,t){if(t.hardTimeout)return e.setAttribute("data-content-lock-owner",null),void(window.location.href=CONTEXT_PATH);const o=e.getAttribute("data-rtc-content-id"),n=t.lockOwnerId;if(!n)return;if(b){const t=e.querySelector(".ContentLockMessage-timeout");t&&t.remove(),b=!1}const i=n!==document.documentElement.getAttribute("data-user-id"),r=e.getAttribute("data-content-lock-owner")!==n,a="true"===e.getAttribute("data-unlocking-disabled")!==t.unlockingDisabled,c=e.querySelector(".ContentEdit-main")||e,M=document.querySelector(".Widget-controls");if(e.classList.toggle("is-locked",i),e.setAttribute("data-content-lock-owner",n),e.setAttribute("data-unlocking-disabled",t.unlockingDisabled),M&&M.classList.toggle("is-locked",i),r){let o=e.querySelector(".ContentLockMessage-eviction");t.evictionMessage?(o||(o=(0,s.A)("div",{className:"ContentLockMessage-eviction message message-warning"}),c.insertBefore(o,c.firstChild)),o.innerHTML=t.evictionMessage):o&&o.remove()}let d=e.querySelector(".ContentLockMessage-status");if(i&&(r||a)){d&&d.remove(),d=(0,s.A)("div",{className:"ContentLockMessage-status message message-warning"}),c.insertBefore(d,c.firstChild),d.innerHTML=t.statusMessage;const n=d.querySelector(".ContentLock-link");n&&(n.onclick=()=>{const t=new FormData;t.append("forceUnlock",!0),t.append("contentId",o),O(e,n,t)}),document.activeElement&&document.activeElement.blur()}else if(!i){if(t.statusMessage){if(r||a){d&&d.remove(),d=(0,s.A)("div",{className:"ContentLockMessage-status message message-info"}),c.insertBefore(d,c.firstChild),d.innerHTML=t.statusMessage;const n=d.querySelector(".ContentLock-link");n&&(n.onclick=()=>{const t=new FormData;t.append("disableUnlock",!0),t.append("contentId",o),O(e,n,t)})}}else d&&d.remove();const n=e.querySelector(".ContentLockMessage-eviction");n&&n.remove()}let l=e.querySelector(".ContentLockMessage-inactive");if(t.inactivityMessage)if(i&&!l){l=(0,s.A)("div",{className:"ContentLockMessage-inactive message message-info"}),c.insertBefore(l,c.firstChild),l.innerHTML=t.inactivityMessage;const n=l.querySelector(".ContentLock-link");n&&(n.onclick=()=>{const t=new FormData;t.append("inactiveUnlock",!0),t.append("contentId",o),O(e,n,t)})}else i||p||(p=document.title,document.title=t.inactivityMessage);else l&&l.remove(),p&&(document.title=p,p=null);r&&A(e,n)}function O(e,t,o){const n=t.getAttribute("data-confirm");n&&confirm(n)&&function(e,t){fetch(CONTEXT_PATH+"contentLock",{method:"post",headers:{"Brightspot-CSRF":r.A.get("bsp.csrf")},body:t}).then(function(e){return e.text()}).then(function(t){try{if(e){const o=JSON.parse(t);u(e,o)}}catch(e){console.error(e)}})}(e,o)}function A(e,t){e.querySelectorAll(".EditFieldUpdateViewers-viewer").forEach(e=>{e.toggleAttribute("data-locked",e.getAttribute("data-user-id")===t)})}(0,a.A)('form[data-rtc-content-id][data-content-locking="true"]',e=>{const t=e.getAttribute("data-rtc-content-id"),o=Date.now(),n=i().client(),r=t+".viewing",s=t+".leaving",p=[],b={viewer:o};n.on(r,function(e){const t=e.viewer;t&&-1===p.indexOf(t)&&(p.push(e.viewer),n.emit(r,b))}),n.on(s,function(e){const t=e.viewer;if(t){const e=p.indexOf(t);-1!==e&&p.splice(e,1)}}),n.emit(r,b);const M="?contentId="+t+"&typeId="+e.getAttribute("data-type-id");z(e,M);const u=setInterval(()=>{const t=M+"&isLockOwner="+l(e)+"&isInactive="+document.hidden;z(e,t)},5e3);window.addEventListener("unload",()=>{d(u,n,b,p,e,t)}),(0,a.A)("[data-rtc-unlock-onreceive]",o=>{o.dataset.rtcUnlockOnreceive&&c.default.receive(o.dataset.rtcUnlockOnreceive,o=>{d(u,n,b,p,e,t)})}),(0,a.A)("[data-rtc-unlock-onclick]",o=>{o.addEventListener("click",o=>{d(u,n,b,p,e,t)})})}),(0,a.A)(':not(form)[data-rtc-content-id][data-content-locking="true"]',e=>{if(0===M.length){const t=e.closest("table");t?t.querySelectorAll(':not(form)[data-rtc-content-id][data-content-locking="true"]').forEach(e=>{-1===M.indexOf(e)&&M.push(e)}):M.push(e);let o="?"+M.map(()=>"contentIds="+e.getAttribute("data-rtc-content-id")).join("&");z(M,o);const n=setInterval(()=>{o="?";const e=[];for(let t=M.length-1;t>=0;--t){const n=M[t];if(document.body.contains(n)){const t=n.getAttribute("data-rtc-content-id");-1===e.indexOf(t)&&(e.push(t),o+="contentIds="+t+"&")}else M.splice(t,1)}0!==M.length&&0!==e.length?z(M,o.substring(0,o.length-1)):clearInterval(n)},5e3)}else-1===M.indexOf(e)&&M.push(e)}),(0,a.A)(".EditFieldUpdateViewers-viewer",e=>{const t=e.closest("[data-content-lock-owner]");t&&e.toggleAttribute("data-locked",e.getAttribute("data-user-id")===t.getAttribute("data-content-lock-owner"))})},53560(e,t,o){"use strict";var n=o(32246);(0,n.A)(".ContentReportingWidget div.widgetControls",e=>{const t=document.querySelector("a.ContentReporting-runLink");t&&e.before(t)}),(0,n.A)(".ContentReportingWidget.is-viewOnly",e=>{const t=e.querySelector("div.widgetControls"),o=e.querySelector("div.widget-contentCreate"),n=e.querySelector("div.ActionBar");t&&(t.innerHTML="",t.parentNode.removeChild(t)),o&&(o.innerHTML="",o.parentNode.removeChild(o)),n&&(n.innerHTML="",n.parentNode.removeChild(n))})},3815(e,t,o){"use strict";o(44764);var n=o(40627),i=o(32246),r=o(26594);function a(e){return e.parentNode.getBoundingClientRect().width<500}window.addEventListener("resize",(0,r.A)(()=>{const e=[];for(const t of(0,n.A)(document,".DT"))e.push({table:t,compact:a(t)});for(const{table:t,compact:o}of e)t.classList.toggle("is-compact",o)})),(0,i.A)(".DT",e=>{e.classList.toggle("is-compact",a(e))})},66118(e,t,o){"use strict";var n=o(32246),i=o(69792),r=o.n(i);(0,n.A)("input.date",e=>{e.classList.remove("date"),e.setAttribute("type","hidden");const t=document.querySelector("html").getAttribute("data-time-zone");e.setAttribute("data-time-zone",t);const o=document.createElement("a");o.classList.add("DateTimeInput","is-legacy"),o.setAttribute("target","DateStringCalendarFrame");const n=e.getAttribute("placeholder");n&&o.setAttribute("data-placeholder",n);const i=new URLSearchParams;let s,c;if(i.append("showDate",!0),i.append("showTime",!0),i.append("hideSecond",!0),e.value){const o=r().tz(parseInt(e.value),t);s=o.format("YYYY-MM-DD"),c=o.format("HH:mm:ss.SSS"),i.append("date",s),i.append("time",c)}else o.classList.add("is-empty");a(o,null,s,c),o.href=window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.ui.form.CalendarFrame"]+"?"+i,e.parentNode.insertBefore(o,e.nextSibling)}),(0,n.A)(".DateStringCalendarEmbedded .DateStringCalendar",e=>{b(e,e.closest(".DateStringCalendarEmbedded"))}),(0,n.A)(".Popup .DateStringCalendar",e=>{const t=e.closest(".frame"),o=t.closest(".Popup");o.setAttribute("aria-label",e.getAttribute("data-popupLabel"));const n=o.classList;n.add("is-local"),n.add("is-calendar");const i=t._bspFrameLink;"true"===i.getAttribute("data-hide-popup-close")&&o.querySelector(".Popup-close").classList.add("is-hidden"),b(e,i)});const a=(e,t,o,n,i,r)=>{if(!e)return;"object"==typeof o&&(n=o.getAttribute("data-time"),i=o.getAttribute("data-zoneOffset"),r=o.getAttribute("data-zoneId"),o=o.getAttribute("data-date"));const a=e.getAttribute("data-placeholder");if(!o&&!n&&a)return e.setAttribute("aria-label",a),void(e.innerHTML="");const s=new URLSearchParams;s.append("date",o),s.append("time",n),s.append("zoneOffset",i),s.append("zoneId",r),s.append("formatDateTime",!0),fetch(window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.ui.form.CalendarFrame"]+"?"+s,{method:"get",credentials:"include"}).then(e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.text()}).then(o=>{const n=`${t||""}${o}`;e.setAttribute("aria-label",n),e.innerHTML=n})},s=(e,t,o)=>{const[n,i]=(t.getAttribute("href")||"").split("?"),a=new URLSearchParams(i);let s;if(t.classList.contains("is-legacy")){const n=t.previousSibling;if(o)e.removeAttribute("data-date"),a.delete("date"),e.removeAttribute("data-time"),a.delete("time"),n.value=null;else{const t=e.getAttribute("data-date");a.set("date",t);const o=e.getAttribute("data-time");a.set("time",o),n.value=r().tz(`${t}T${o}`,n.getAttribute("data-time-zone")).valueOf()}s=n}else{const n=t.closest("li, .CIG-large, .CIG-small, .ContentEdit-publish, .ContentEdit-workflowActions, .SearchWidget-customDate"),i="true"===e.getAttribute("data-showDate"),r="true"===e.getAttribute("data-showTime"),c="true"===e.getAttribute("data-showZoneOffset"),p="true"===e.getAttribute("data-showZoneId");if(i){const t=n.querySelector('input[name$=".date"], .DateTimeInput-date');if(o)e.removeAttribute("data-date"),a.delete("date"),t.value=null;else{const o=e.getAttribute("data-date");a.set("date",o),t.value=o}s=t}if(r){const t=n.querySelector('input[name$=".time"], .DateTimeInput-time');if(o)e.removeAttribute("data-time"),a.delete("time"),t.value=null;else{const o=e.getAttribute("data-time");a.set("time",o),t.value=o}if(c){let t=n.querySelector('input[name$=".zoneOffset"]');if(o)e.removeAttribute("data-zoneOffset"),a.delete("zoneOffset"),t.value=null;else{const o=e.getAttribute("data-zoneOffset");a.set("zoneOffset",o),t.value=o}}else if(p){let t=n.querySelector('input[name$=".zoneId"]');if(o)e.removeAttribute("data-zoneId"),a.delete("zoneId"),t.value=null;else{const o=e.getAttribute("data-zoneId");a.set("zoneId",o),t.value=o}}s=t}}return s.dispatchEvent(new Event("change",{bubbles:!0})),n+"?"+a.toString()},c=(e,t)=>{s(e,t),e.closest(`.CIG-row[data-type$="${["/date","/instant","/zonedDateTime","/offsetDateTime","/offsetTime","/localDateTime","/localDate","/localTime"].join('"], .CIG-row[data-type$="')}"]`)?(e=>{const t=e.closest("li"),o=t.getAttribute("data-type");a(t.querySelector(".RCIG-title"),`${o}: `,e)})(e):a(t.closest(".CIG-row").querySelector(".CIG-note"),null,e)},p=(e,t,o)=>{t.setAttribute("href",s(e,t,o)),o?t.classList.add("is-empty"):t.classList.remove("is-empty"),a(t,null,e),e.closest(".Popup").querySelector(".Popup-close").click()},b=(e,t)=>{const o="true"===e.getAttribute("data-isWidgetEmbedded"),n="true"===e.getAttribute("data-showDate"),i="true"===e.getAttribute("data-showTime"),r="true"===e.getAttribute("data-showZoneOffset"),a="true"===e.getAttribute("data-showZoneId"),s=e.querySelector(".DateStringCalendarForm");if(n){const n=e.querySelector(".DateStringCalendarDate"),i=s.querySelector('input[name="date"]');n.querySelector(".Month-body").addEventListener("click",n=>{const r=n.target.closest(".Month-day"),a=r.getAttribute("data-date");i.value=a,e.setAttribute("data-date",a),e.querySelector(".is-selected")?.classList.remove("is-selected"),r.classList.add("is-selected"),o&&c(e,t)}),s.querySelector(".DateStringCalendarForm-previous").addEventListener("click",e=>{const t=e.target.querySelector("input");t.value=!0,t.dispatchEvent(new Event("change",{bubbles:!0}))}),s.querySelector(".DateStringCalendarForm-next").addEventListener("click",e=>{const t=e.target.querySelector("input");t.value=!0,t.dispatchEvent(new Event("change",{bubbles:!0}))})}if(i){const i=e.querySelector(".DateStringCalendarTime-custom"),p=i.querySelector(".DateStringCalendarTime-hour"),b=i.querySelector(".DateStringCalendarTime-meridiem"),M=i.querySelector(".DateStringCalendarTime-minute"),d=i.querySelector(".DateStringCalendarTime-second"),l=i.querySelector(".DateStringCalendarTime-nanosecond"),z=i.querySelector(".DateStringCalendarTime-zoneOffset"),u=i.querySelector(".DateStringCalendarTime-zoneId");d.addEventListener("change",()=>l.value=0);const O=()=>{const i=b.value;let O=parseInt(p.value);"pm"===i&&(O+=12);const A=`${O.toString().padStart(2,"0")}:${M.value.padStart(2,"0")}:${d.value.padStart(2,"0")}.${l.value}`;e.setAttribute("data-time",A),r?e.setAttribute("data-zoneOffset",z.value):a&&e.setAttribute("data-zoneId",u.value),n&&(s.querySelector('input[name="time"]').value=A,r?s.querySelector('input[name="zoneOffset"]').value=z.value:a&&(s.querySelector('input[name="zoneId"]').value=u.value)),o&&c(e,t)};i.addEventListener("change",O);const A=e.querySelector(".DateStringCalendarTime-common");A&&A.addEventListener("change",r=>{const a=r.target.selectedOptions[0].value;"_custom"===r.target.selectedOptions[0].value?(i.classList.remove("is-hidden"),O()):(i.classList.add("is-hidden"),e.setAttribute("data-time",a),n&&(s.querySelector('input[name="time"]').value=a),o&&c(e,t))})}o?c(e,t):(e.querySelector(".DateStringCalendarAction-clear").addEventListener("click",o=>p(e,t,!0)),e.querySelector(".DateStringCalendarAction-set").addEventListener("click",o=>p(e,t))),e.querySelector(".DateStringCalendarAction-now").addEventListener("click",e=>{let t;if(n){const e=s.querySelector('input[name="date"]');e.value=null,s.querySelector('input[name="renderYear"]').value=null,s.querySelector('select[name="renderMonth"]').value=null,t=e}if(i){const e=s.querySelector('input[name="time"]');e.value=null,r?s.querySelector('input[name="zoneOffset"]').value=null:a&&(s.querySelector('input[name="zoneId"]').value=null),t=e}t.dispatchEvent(new Event("change",{bubbles:!0}))})}},53039(e,t,o){"use strict";o.a(e,async(e,t)=>{try{o(67219),o(18136),o(47172),o(62824),o(41956),o(92);var n=o(47397),i=o(82982),r=o(5292),a=o(32246),s=o(41044),c=o(36711),p=o(10013),b=o(40627),M=o(66556),d=(o(89756),o(73136),o(80990),o(66808),o(78062),o(57366)),l=(o(60958),o(37592),o(95033)),z=(o(49080),o(12857),o(52265),o(3815),o(66118),o(82555),o(4389),o(60626),o(39806),o(30003),o(94073),o(3771),o(57519),o(50326),o(80082),o(5894),o(91533),o(95546),o(35066),o(66315),o(19106),o(53560),o(90819),o(11532),o(90880),o(34216),o(83368)),u=(o(93563),o(45080),o(73609)),O=(o(96538),o(95835),o(13411),o(3341),o(48557),o(47626),o(77663),o(7724),o(33482),o(57535),o(38387),o(75850),o(70823),o(64660),o(84977),o(26912),o(59240)),A=o(88903),f=e([O]);function h(){const e=document.createElement("div");Object.assign(e.style,{height:"100px",overflow:"scroll",visibility:"hidden",width:"100px"});const t=document.body;t.appendChild(e),document.documentElement.style.setProperty("--scrollbarSize",e.offsetWidth-e.clientWidth+"px"),t.removeChild(e)}O=(f.then?(await f)():f)[0],o.p=CONTEXT_PATH+"dist/",window.addEventListener("mouseup",e=>{const t=e.target;if(t===document.activeElement){let e=t.tagName;e&&(e=e.toLowerCase(),("a"===e||"button"===e&&!t.classList.contains("TabBar-item"))&&t.blur())}}),(0,a.A)(".autoSubmit:not(:has(:state(btu-loading))), [data-bsp-autosubmit]:not(:has(:state(btu-loading)))",e=>{new d.A(e)}),(0,p.A)("select",e=>{if(!e.isConnected)return;let t="";(e.closest(".RCIG-addSelect")||e.closest(".Page-create")||e.classList.contains("ContentSelector-select")&&e.parentNode.querySelector(".ContentSelector-clear"))&&(t="is-hidePlaceholder");const o=new l.A(e,{getOptionsUrl:t=>{const o=e.getAttribute("data-options-url");return o?o+encodeURIComponent(t):null},modifier:t});(0,c.A)(e,()=>{o.destroy()})}),(0,a.A)(".is-readOnly:not(select)",e=>{for(const t of(0,b.A)(e,"input, textarea, select"))t.type.includes("select")?t.classList.add("is-readOnly"):t.readOnly=!0}),(0,p.A)(".TC",e=>{new u.A(e),e.dispatchEvent(new CustomEvent("tc-loaded",{bubbles:!0}))}),window.addEventListener("brightspot-frame-load",a.A.triggerCallbacks),window.addEventListener("brightspot-frame-load",e=>{const t=window.BRIGHTSPOT.ajaxInitiator;if(t){const{action:o,id:n,nodeName:i,shadowField:r}=t;if("select"!==i&&!r)return;const a=r?`[shadow-field="${r}"]`:`form[action*="${new URL(o).pathname}"] ${i}[name="${n}"] ~ .ComboInput`;(0,s.A)(a,()=>{let t=e.target.querySelector(a);null==t&&(t=document.querySelector(a)),t&&(t.focus(),window.BRIGHTSPOT.ajaxInitiator=null)})}}),(0,a.A)('input[autocomplete="off"]',e=>{if(e.closest("btu-search-input"))return;const t=e;t.readOnly||(t.readOnly=!0,t.addEventListener("focus",()=>{t.readOnly=!1}))}),(0,z.Ts)(),"loading"===document.readyState?window.addEventListener("DOMContentLoaded",()=>{h(),window.location!==window.parent.location&&(document.body.classList.contains("is-inIframe")||document.body.classList.add("is-inIframe"))}):h(),window.BRIGHTSPOT&&(window.BRIGHTSPOT.js={...window.BRIGHTSPOT.js,trapFocusWithin:i.J,getFocusableDescendants:n.l,getFirstAndLastFocusableDescendants:n.q,create:r.A,onFind:a.A,onRemove:c.A,Cookies:A.A,setupMenuForAria:M.D1,toggleMenu:M.AM}),t()}catch(m){t(m)}})},4389(e,t,o){"use strict";o(67219),o(84978),o(92280),(0,o(32246).A)(".ExternalItemAuthLink",e=>{e.addEventListener("click",()=>{document.addEventListener("visibilitychange",e=>{"visible"===document.visibilityState&&document.cookie.split(";").some(e=>e.includes("bsp.csrf=externalTypeAuthenticated"))&&window.location.reload()})})})},82555(e,t,o){"use strict";var n=o(40627);const i=['button:not([type="button"])','input[type="submit"]'].join(",");window.addEventListener("click",function(e,t){const o=Array.isArray(e)?e.join(","):e;return function(...e){if(e[0]instanceof Event||e[0]instanceof window.jQuery.Event){const n=e[0].target;n instanceof Element&&n.matches(o)&&t.apply(n,e)}}}(i,function(){for(const e of(0,n.A)(this.closest("form"),i))e.classList.remove("is-clicked");this.classList.add("is-clicked")})),window.addEventListener("submit",e=>{const t=e.target;if(t.target&&!t.classList.contains("is-loader"))for(const e of(0,n.A)(t,".is-clicked"))e.classList.remove("is-clicked");else t.classList.add("is-submitting")})},60626(e,t,o){"use strict";o(67219),o(84978),o(25809);var n=o(32246);window.addEventListener("click",e=>{const t=e.target;if(t.classList.contains("Hierarchy-expand")){for(const e of t.closest("ul").querySelectorAll(".is-selected"))e.classList.remove("is-selected");t.closest("li").classList.add("is-selected")}},{capture:!0}),window.addEventListener("brightspot-frame-load",e=>{const t=e.target;if(t.classList.contains("HierarchyResults")){const e=[...t.querySelectorAll("li")],o=t.closest(".Hierarchy-column").querySelector("ul");e.forEach(e=>{o.appendChild(e)})}const o=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&document.querySelector(".Hierarchy-moreElements")?.click()})});let n=document.getElementsByClassName("lastHierarchyElement");n.item(0)&&(o.observe(n.item(0)),n.item(0).classList.remove("lastHierarchyElement"))}),(0,n.A)("div[data-popup-source-class*='Page-search'] div.Hierarchy-column a[data-hierarchy-item]",e=>{const t=e.getAttribute("data-type-id"),o=e.getAttribute("data-parent-type-ids"),n=e.closest("div.SearchWidget-form");if(!n||!t)return;const i=n.querySelector("select[name='st'] option[selected]").value;t===i||o&&o.includes(i)||e.setAttribute("data-mismatch-hierarchy-type","true")}),(0,n.A)("div[data-popup-source-class*='objectId-select'] div.Hierarchy-column a[data-hierarchy-item]",e=>{const t=e.getAttribute("data-type-id"),o=e.closest("div.SearchWidget-form");if(!o||!t)return;const n=o.querySelector("div.searchCreate form.objectId-create"),i=n.querySelector("input[name='typeId']")?.value,r=n.querySelector("select[name='typeId']")?.getAttribute("data-typeids");i&&t===i||r&&r.includes(t)||e.setAttribute("data-mismatch-hierarchy-type","true")})},39806(e,t,o){"use strict";o(84978),o(75178);var n=o(56155);const i=window.BRIGHTSPOT?.icons?.materialToLucide??{},r=!!window.BRIGHTSPOT?.ui?.cms?.enableV5UI,a=!r&&Object.keys(i).length>0?Object.keys(i).reduce((e,t)=>(e[i[t]]=t,e),{}):void 0;r||(0,n.A)(["[data-icon]","[data-icon-name]","[data-icon-button-name]"],function(e){const t=e.hasAttribute("data-icon")?"data-icon":e.hasAttribute("data-icon-name")?"data-icon-name":e.hasAttribute("data-icon-button-name")?"data-icon-button-name":null;if(!t)return;const o=e.getAttribute(t);if(null==o)return;const n=o.trim(),i=a&&null!=a[n]?a[n]:n;e.setAttribute(t,i)})},30003(e,t,o){"use strict";(0,o(41044).A)(".imageEditor",async()=>{await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(4582),o.e(9277),o.e(4795),o.e(5857)]).then(o.bind(o,5603))})},94073(e,t,o){"use strict";var n=o(88903);(0,o(32246).A)(".LinkCarousel-item",e=>{e.addEventListener("click",async t=>{const o=t.target;if(o.classList.contains("LinkCarousel-item-favorite")){o.classList.toggle("is-unstarred");const t=o.classList.contains("is-unstarred")?o.getAttribute("data-title-on"):o.getAttribute("data-title-off");o.title=t,o.setAttribute("aria-label",t);let i=CONTEXT_PATH+"update-create-new-favorites?quickStartId="+e.querySelector(".LinkCarousel-item-favorite").getAttribute("data-id");const r=new Headers;r.append("Brightspot-CSRF",n.A.get("bsp.csrf"));try{await fetch(i,{method:"POST",headers:r})}catch(e){console.error(e)}}else{if(e!==o)return;t.stopPropagation(),e.querySelector("a").click()}})})},3771(e,t,o){"use strict";var n=o(5292);(0,o(32246).A)(".LinkList td:not(.LinkList-image, .LinkList-main, .LinkList-viewers, .LinkList-button, .LinkList-type, .LinkList-description, .date-time)",e=>{const t=(0,n.A)("span",{className:"LinkList-icon","aria-hidden":"true"});e.prepend(t)})},57519(e,t,o){"use strict";var n=o(5292),i=o(95628),r=o(40627),a=o(32246);(0,a.A)(".LinkTable .Label",e=>{const t=e.closest("th, td");if(!t||t.classList.contains("LinkTable-label")||e.closest(".CommunityWidget"))return;const o=t.previousElementSibling;if(o&&o.classList.contains("LinkTable-label"))return void o.appendChild(e);const i=e.closest("tr"),r=Array.from(i.querySelectorAll("th, td")).indexOf(t);let a;const s=i.closest("table").querySelector("tr").querySelectorAll("th, td");for(let e=0,t=0;t-1<r;e++)a=s[e],t+=a.colSpan;if(!a.hasAttribute("data-skip-labels-move")){for(const e of i.closest("table").querySelectorAll("tr"))if(e.querySelectorAll("th, td")[r].getAttribute("data-value-count")>1)return void a.setAttribute("data-skip-labels-move","");for(const e of i.closest("table").querySelectorAll("tr:not(thead.screen-reader-only tr")){let t=r;for(const o of e.querySelectorAll("th, td"))if(t-=o.colSpan,t<0){e.insertBefore((0,n.A)(o.tagName,{className:"LinkTable-label"},"TH"===o.tagName&&e.closest("table").classList.contains("searchResultTable")?window.BRIGHTSPOT.ui?.searchContentStatus:""),o);break}}i.querySelectorAll("th, td")[r].appendChild(e)}});const s=new ResizeObserver(e=>{for(const t of e)t.target.classList.toggle("is-compact",(t.borderBoxSize?.inlineSize||t.contentRect.width)<500)});(0,a.A)(".LinkTable",e=>{e.classList.contains("is-compact")||s.observe(e);const t=e.classList.contains("is-static");for(const o of(0,r.A)(e,":scope > tbody > tr")){const e=(0,r.A)(o,":scope > td");if(!t)for(const t of e)if((0,i.A)(t,":scope > a")){t.classList.add("LinkTable-main");break}const n=e[0].classList;n.contains("LinkTable-main")?e.length>1&&e[1].classList.add("LinkTable-first"):n.add("LinkTable-first")}})},50326(e,t,o){"use strict";var n=o(10013);(0,n.A)(".locationMap",async e=>{const{default:t}=await Promise.all([o.e(8897),o.e(5598),o.e(1888)]).then(o.bind(o,83814));new t(e)}),(0,n.A)(".regionMap",async e=>{const{default:t}=await Promise.all([o.e(8897),o.e(5598),o.e(6086),o.e(6379)]).then(o.bind(o,35657));new t(e)})},80082(e,t,o){"use strict";var n=o(32246),i=o(95628);(0,n.A)('.LookingGlass-actions[data-action="copy"]',e=>{e.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation();const o=document.createElement("textarea");o.value=(0,i.A)(e,"a").href,o.setAttribute("readonly",""),document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o),e.setAttribute("data-copied","true"),setTimeout(()=>{e.removeAttribute("data-copied")},2e3)})})},5894(e,t,o){"use strict";var n=o(5292);(0,o(32246).A)(".Message",e=>{const t=(0,n.A)("span",{className:"Message-icon","aria-hidden":"true"}),o=e.querySelector(".ContentEdit-revisionInfo");o?o.insertAdjacentElement("afterend",t):e.append(t)})},91533(e,t,o){"use strict";var n=o(40627),i=o(32246),r=o(26594);function a(e){const t=e.style;t.overflow="auto",t.transform="",t.width="100%";const o=e.getBoundingClientRect().width,n=e.scrollWidth;o<n&&(t.transform=`scale(${o/n})`,t.transformOrigin="left"),t.overflow="",t.width=""}(0,i.A)(".NB",a),window.addEventListener("resize",(0,r.A)(()=>{for(const e of(0,n.A)(document,".NB"))a(e)}))},95546(e,t,o){"use strict";o(67219),o(44764),o(84978),o(13722),o(91672);var n=o(5292),i=o(95628),r=o(40627),a=o(68243),s=o(32246),c=o(41044),p=o(36711),b=o(34980),M=o(15483),d=o(47397),l=o(82982),z=o(1439);const u=window.BRIGHTSPOT?.ui.tooltips;function O(e,t){t&&e.style.setProperty("--Page-headerBottom",`calc(var(--Page-headerHeight) + ${t.clientHeight}px)`)}function A(e,t=!1){const o=e?.querySelector(".Page-nav"),n=e.classList.contains("is-navigating")||!0===t;n?o?.setAttribute("inert",""):o?.removeAttribute("inert"),n||o.querySelector(":scope .selected li:first-of-type")?.querySelector("a")?.focus();const i=n?u.menu.open:u.menu.close;e.classList.toggle("is-navigating",!0!==t&&void 0);const r=e?.querySelector(".Page-navToggle");r&&(r.title=i,r.setAttribute("aria-label",i),r.setAttribute("aria-expanded",!n))}function f(e,t){const o=document.querySelector(".Page-nav");if(!e)return;let n,i,r=e.classList;if(r.remove("is-active"),r.contains("selected")&&r.contains("isNested")||r.contains("is-expanded")){const o=e.querySelector("ul").firstElementChild;null!=o&&f(o,t)}const a=e.closest("ul").closest("li"),s=e.closest(".isNested");if(1===t){i=e.nextSibling;const t=e.classList.contains("is-expanded");null!==i?t?n=e.querySelector("ul").firstElementChild:"LI"===i.tagName&&(n=i):t||(n=null!==s.nextSibling?a.nextSibling:o.firstElementChild.querySelector("ul").firstElementChild),n.querySelector("a").focus()}else if(i=e.previousSibling,null!==i)"LI"===i.tagName&&(n=i,n.querySelector("a").focus()),e.classList.contains("isNested")&&(n=i.querySelector("ul").lastElementChild,n.querySelector("a").focus());else{const e=s.previousSibling;if(a.classList.contains("isNested")?n=a:null!==e&&(n=e.classList.contains("selected")?e.querySelector("ul").lastElementChild:a),s.classList.contains("selected")){const e=o.lastElementChild;n=e.classList.contains("is-expanded")?e.querySelector("ul").lastElementChild:e}n.querySelector("a").focus()}}(0,s.A)(".Page .Container-broadcast",e=>{const t=e.closest(".Page");new ResizeObserver(o=>{O(t,e)}).observe(e),O(t,e)}),(0,s.A)(".Page-nav",e=>{e.setAttribute("inert",""),e.addEventListener("keydown",t=>{switch(t.key){case"Enter":document.activeElement.closest("li").setAttribute("aria-expanded",document.activeElement.closest("li").matches(".is-expanded"));break;case"ArrowUp":case"ArrowLeft":f(t.target.closest("li"),-1),t.preventDefault(),t.stopPropagation();break;case"ArrowRight":case"ArrowDown":f(t.target.closest("li"),1),t.preventDefault(),t.stopPropagation();break;case"Escape":if("false"===document.activeElement.closest("li").getAttribute("aria-expanded")||document.activeElement.parentElement.parentElement.parentElement.classList.contains("selected"))A(e.closest(".Page"),!0);else if(t.target.closest("li").classList.contains("is-expanded")||t.target.closest("li").closest("ul").classList.contains("is-expanded")){const e=t.target.closest(".isNested");e.classList.remove("is-expanded"),e.firstElementChild.focus()}else A(e.closest(".Page"),!0)}});const t=(0,a.A)((0,n.A)("button",{className:"Page-navToggle",title:u.menu.open,"aria-label":u.menu.open,"aria-haspopup":"true","aria-expanded":"false",onclick:t=>{A(e.closest(".Page"))},onkeydown:t=>{e.closest(".Page");const o=(0,i.A)(e,":scope > li");switch(t.key){case"ArrowUp":case"ArrowLeft":e.lastElementChild.querySelector("a").focus();break;case"ArrowDown":case"ArrowRight":o.classList.contains("isNested")&&o.classList.contains("selected")?o.querySelector("ul").firstElementChild.querySelector("a").focus():o.querySelector("a").focus()}}}),e);for(const t of(0,r.A)(e,".isNested")){const e=`BSP.Page.navItemExpanded.${t.textContent.trim()}`,o=(0,i.A)(t,":scope > a"),r=b.A.get(e),a=r?u.collapse:u.expand,s=(0,n.A)("div",{className:"Page-navItemToggle","aria-label":a});o.setAttribute("tabindex",0),t.setAttribute("aria-expanded",t.classList.toggle("is-expanded",r)),o.appendChild(s),o.title=a,o.addEventListener("click",n=>{n.preventDefault();const i=t.classList.toggle("is-expanded");o.title=i?u.collapse:u.expand,s.setAttribute("aria-label",o.title),b.A.toggle(e,i),t.setAttribute("aria-expanded",i),i&&setTimeout(()=>t.scrollIntoView({behavior:"smooth",block:"nearest"}),100)})}window.addEventListener("click",o=>{e.contains(o.target)||t.contains(o.target)||window.BRIGHTSPOT?.ui.cms.enableV5UI||A(e.closest(".Page"),!0)})}),(0,s.A)(".toolUserDisplay",e=>{const t=e.querySelector(".toolUserNotifications"),o=e.querySelector(".toolUserNotifications a");e.parentNode.insertBefore((0,n.A)("div",{className:"Page-notifications","data-new":o.dataset.new,"data-count":o.dataset.count,"data-count-label":o.dataset.countLabel},Array.from(t.children)),e.nextSibling),t.remove()}),(0,s.A)('.Popup[name="profilePanel"] .p-tud > h1',e=>{const t=(0,n.A)("div",{className:"Widget-controls"});for(let e of document.querySelectorAll(".toolUserControls a"))e=e.cloneNode(!0),e.getAttribute("target")?e.setAttribute("data-popup-mode","local"):e.setAttribute("target","_top"),t.appendChild(e);e.parentNode.insertBefore(t,e.nextSibling)}),(0,s.A)(".ProfileDropdown-items > li",e=>{e.addEventListener("click",e=>{e.target.dispatchEvent(new CustomEvent("close",{bubbles:!0}))})}),(0,c.A)(".Page-login",()=>{const e=document.querySelector(".Page-login"),t=e.querySelector("label")?.htmlFor;t&&document.getElementById(t)?.focus()});const h=[];let m;function q(){if(!document.querySelector(".Page").classList.contains("is-guideOpen"))return;const{href:e,name:t}=h[h.length-1];if(e&&e!==m){m=e;const o=document.querySelector(".Page-guide");if(!o.querySelector(`:scope > .frame[name="${t}"]`)){const n=document.createElement("div");n.classList.add("frame"),n.setAttribute("name",t),o.appendChild(n);const i=new URLSearchParams;i.append("subject",e);const r=document.createElement("a");r.href=`${document.querySelector(".Page-guideLink a").href}?${i}`,r.target=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}for(const e of o.querySelectorAll(":scope > .frame")){const t=e.getAttribute("name");h.some(({name:e})=>e===t)||o.removeChild(e)}}}function _(e){const t=e.dataset.href;return"true"===new URLSearchParams(t).get("isFieldGuide")}let W=0;function g(e,t,o,n=!1){if("Tab"!==e.key)return;const i=o!==document&&o?.matches(".is-fromTop"),r={header:(n?"header.Page-header":i&&".Page-search.toolSearch")||null,popupClose:"button.Popup-close.closeButton",searchInput:".SearchInput.SearchWidget-query",actionsToggle:".SearchWidget-actionsToggle",reset:".action.action-cancel",contentTypeForm:".searchFiltersType.SearchWidget-type",searchFiltersRest:".searchFiltersRest",searchHistory:".SearchWidget-history",create:".SearchWidget-create",results:".SearchWidget-result",pageGuide:n?".Page-guide":null,queryFieldDone:o!==document&&o?.matches('[name="queryField"]')?".QueryField-button":null},a=Object.values(r).filter(e=>e).map(e=>{const n=".searchFiltersRest"!==e||t?0:1,i=e.includes("Page-search.toolSearch")?document:o;return(0,d.l)(e,i,n)}).filter(e=>null!==e);(0,l.J)(e,a,!n)}function y(e,t){"Tab"===t.key&&(0,s.A)(e,e=>{const o=(0,M.Kr)(e,{includeContainer:!0});o&&o.length>0&&function(e,t){let o,n;if(t[t.length-1].classList.contains("ContentSelector-search")?(o=t.pop(),n=t.pop()):t[t.length-1].classList.contains("ComboInput")&&(o=t.pop()),o){const e=n?[n,o]:[o];e.length>0&&t.splice(1,0,...e)}let i=null;t[0].nextElementSibling instanceof HTMLElement&&(i=t[0].nextElementSibling);const r=i?(0,M.Kr)(i,{includeContainer:!0}):[],a=e.target instanceof HTMLElement||e.target instanceof SVGElement,s=e.target&&a?t.indexOf(document.activeElement):-1,c=e.shiftKey?"back":"forward";"forward"===c?s>=0&&s<t.length-1?(e.preventDefault(),t[s+1]?.focus()):s===t.length-1&&(e.preventDefault(),r[0]?.focus()):"back"===c&&(a&&e.target===r[0]?(e.preventDefault(),t[t.length-1]?.focus()):s>0&&(e.preventDefault(),t[s-1]?.focus()))}(t,o)})}(0,s.A)([".Page",".Popup"],e=>{if("DateStringCalendarFrame"===e.getAttribute("name"))return;const t=e.dataset.href;t&&(h.push({href:t,name:"guide-"+ ++W}),function(e){const t=new URLSearchParams(e);return null!=t.get("typeId")||null!=t.get("id")||e.includes("?typeId=")||e.includes("?id=")}(t)&&e.setAttribute("data-subject-type","true"),q(),(0,p.A)(e,()=>{h.splice(h.indexOf(t),1),q()}))}),(0,s.A)(".Page-guideLink a",e=>{const t=e.closest(".Page");t.classList.contains("is-guideOpen")&&e.setAttribute("aria-expanded","true"),e.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation();const n=t.querySelector("div.Popup[name='guideField']");n&&n.querySelector(".closeButton").click();const i=t.querySelector(".Page-navToggle");"true"===i?.getAttribute("aria-expanded")&&i.click(),t.classList.add("is-guideOpen"),e.setAttribute("aria-expanded","true");const r=".Page-guide a.Guide-close";(0,c.A)(r,()=>{document.querySelector(r).focus()}),q()},{capture:!0})}),(0,s.A)(".Guide-close",e=>{const t=e.closest(".Page");e.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),document.querySelector(".CIG-row.is-openPopup")?.classList.remove(".is-openPopup"),t.classList.remove("is-guideOpen");const n=t.querySelector(".Page-guideLink a");n.setAttribute("aria-expanded","false"),n.focus(),fetch(e.href)},{capture:!0})}),(0,s.A)('.Popup[name="edit-guide"] .ActionBar > button[name="action-save"]',e=>{e.addEventListener("click",()=>{let t=z(e).popup("source").frame("container")[0];t&&(t.classList.contains("Guide-embedded")&&(t=t.closest(".Guide")?.closest(".frame")),t&&t.parentNode?.removeChild(t))})}),(0,s.A)("a.CIG-guide",e=>{e.addEventListener("click",t=>{if(!document.querySelector(".Page").classList.contains("is-guideOpen"))return;t.preventDefault(),t.stopPropagation();const o=e.getAttribute("href"),n=o.substring(o.indexOf("?")+1),i=new URLSearchParams(n).get("fieldName"),r=document.querySelector('div.Guide-field[data-field="'+i+'"]');r&&r.scrollIntoView({behavior:"smooth"})})}),(0,s.A)('div.Popup[name="edit-guide"] button[name="action-save"]',e=>{e.addEventListener("click",t=>{const o=e.closest('div.Popup[name="edit-guide"]');if(!_(o))return;const n=o.parentElement.querySelector('div.Popup[name="guideField"]');n.parentElement.removeChild(n)})}),(0,s.A)('div.Popup[name="edit-guide"] button.closeButton',e=>{e.addEventListener("click",t=>{if(!_(e.closest('div.Popup[name="edit-guide"]')))return;const o=document.querySelectorAll("div.Page-guide>div.frame");if(!o.length)return;const i=document.querySelector(".Page");let r,a;if(o.length>1&&i.querySelector("div.Popup")?.dataset.href?(r=i.querySelector("div.Popup").dataset.href,a=o.item(o.length-1)):(r=document.querySelector(".Page").dataset.href,a=o.item(0)),!r)return;const s=new URLSearchParams;s.append("subject",r);const c=(0,n.A)("a");c.href=`${document.querySelector(".Page-guideLink a").href}?${s}`,c.target=a.getAttribute("name"),document.body.appendChild(c),c.click(),document.body.removeChild(c)})}),(0,s.A)(".aria--skiptoContent",e=>{e.addEventListener("click",e=>{const t=document.querySelector("body main");let o=t;const n=t.querySelector(".ContentEdit");n&&(o=n.querySelector(".ContentEdit-left")??n);const i=t.querySelector(".main");i&&(o=i);const r=t.querySelector(":scope .SearchWidget-result");r&&(o=r);const a=t.querySelector(":scope > .SearchWidget .SearchResult-view");a&&(o=a),o&&(o.setAttribute("tabindex","-1"),o.focus({focusVisible:!0}))})}),window.addEventListener("keydown",e=>{if("Tab"!==e.key)return;const t=document.querySelector(".Admin-main"),o=document.querySelector(".content-edit"),n=document.querySelector('.SearchWidget[name="searchAdvancedFull"]'),i=e.target.closest(".ProseMirror-fullscreen-container"),r=e.target.closest(".Popup.is-visible"),a=r?.dataset.popupSourceClass,s=r?.querySelector(".ContentEdit"),c=r?.matches('[name="miscSearch"]'),p=a?.includes("ContentSelector-search"),b=r?.matches('[name="queryField"]'),M=c||p||b,z=document.querySelector(".BulkWorkflow");if(!(M||n||i||o||t||r||z))return;const u=".searchFilter.searchFilter-record.SearchWidget-filter.is-record.is-multiple.searchFilter-multiple";if(z){const t=(0,d.q)(z);if(!t)return;(0,l.J)(e,[t])}else if(M){const t=r.querySelector(".SearchWidget-query"),o="none"===window.getComputedStyle(t).display;y(".Popup "+u,e),g(e,o,r)}else if(n&&!r)y(u,e),g(e,!1,document,!0);else if(i){const t=[(0,d.q)(i)].filter(e=>null!==e);(0,l.J)(e,t)}else if(s||!r&&o){const t=s?r:document,o=window.BRIGHTSPOT?.ui.cms.enableV5UI,n=[(0,d.l)(".Page-header",t),o?(0,d.l)("btu-nav-rail",t):null,o?(0,d.l)(".Page-guide",t):null,o?(0,d.l)(".Page-askAi",t):null,o?null:(0,d.l)(".popup-objectId-edit-heading.Link",t),o?null:(0,d.l)(".ContentEdit-title.breadcrumbs",t),o&&s?(0,d.l)(":scope > .Popup-content > .Popup-close",t):null,(0,d.l)(".ContentEdit-top",t),(0,d.l)(".ContentEdit-left",t),(0,d.l)(".ContentEditDrawer.is-open",t),(0,d.l)(".ContentEdit-preview:not([inert])",t),(0,d.l)(".ContentEdit-right.is-visible",t),(0,d.l)(".ContentEdit-toolbar",t),o?null:(0,d.l)(".Page-guide",t),o?null:(0,d.l)(".Page-askAi",t)].filter(e=>null!==e);(0,l.J)(e,n,!!s)}else if(t&&!r){const t=window.BRIGHTSPOT?.ui.cms.enableV5UI,o=[(0,d.l)(".Page-header",document),t?(0,d.l)("btu-nav-rail",document):null,t?(0,d.l)(".Page-guide",document):null,t?(0,d.l)(".Page-askAi",document):null,(0,d.l)('.frame.loaded[name$="Result"] > ul.pagination',document),(0,d.l)(".leftNav.Admin-nav .Widget-controls",document),(0,d.l)(".leftNav.Admin-nav .Widget-controls + ul.LinkTable",document),(0,d.l)('form[target$="Result"]',document),(0,d.l)('.leftNav.Admin-nav form[target="dashboardsResult"] + ul.LinkTable',document),(0,d.l)('.frame.loaded[name$="Result"] > ul.pagination + ul.LinkTable',document)].filter(e=>null!==e);(0,l.J)(e,o,!1)}else if(r){const t=[(0,d.q)(r)].filter(e=>null!==e);(0,l.J)(e,t)}})},35066(e,t,o){"use strict";o(44764),o(84978),o(25809);const n=function(){let e={},t=e.hasOwnProperty;return{subscribe:function(o,n){t.call(e,o)||(e[o]=[]);let i=e[o].push(n)-1;return{remove:function(){delete e[o][i]}}},publish:function(o,n){t.call(e,o)&&e[o].forEach(function(e){e(void 0!==n?n:{})})}}}();window.PubSub=n},66315(e,t,o){"use strict";o(84978),o(25809);var n=o(32246),i=o(30473);function r(e,t){if(e.querySelector(".Message.is-error"))return e.querySelector(".Message.is-error").textContent;const o=e.querySelector(".QueryField-keyword"),n=e.querySelector(".QueryField-queryString").textContent;let i,r,a="";o.textContent&&(a+='"'+o.textContent+'" '+QF_STRING+" ");const s=e.querySelector(".SearchWidget-type");s.querySelector(".ComboInput-selected")?r=s.querySelector(".ComboInput-selected"):s.querySelector("option[selected]")?r=s.querySelector("option[selected]"):s.querySelector("select > option")?r=s.querySelector("select > option"):e.querySelector("[data-selected-type-label]")?i=e.querySelector("[data-selected-type-label]").dataset.selectedTypeLabel:r=t.closest(".CIG-row").querySelector(".CIG-label label"),a+=i||r.textContent;const c=e.querySelector(".SearchWidget-filter.searchFilter-visibilities"),p=c.querySelectorAll(".ComboInput-selected"),b=c.querySelectorAll('option[selected="selected"]');if((p.length>0||b.length>0&&!c.querySelector(".ComboInput-label"))&&(a+=" "+QF_VISIBILITIES+" ",p.length>0?p.forEach(e=>{a+=e.textContent+", "}):b.length>0&&!c.querySelector(".ComboInput-label")&&b.forEach(e=>{a+=e.textContent+", "}),a=a.substring(0,a.length-2)),n.match(/cms.content.publishDate/)){a+=" "+QF_PUBLISH_DATE+" ";const e={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"},t=n.match(/cms.content.publishDate greaterthanorequals \d+/),o=n.match(/cms.content.publishDate lessthanorequals \d+/);if(t){const o=t[0].match(/\d+/)[0],n=new Date(parseInt(o));a+=QF_PUBLISH_START+" "+n.toLocaleString(void 0,e)}if(t&&o&&(a+=" "+QF_CONJUNCTION+" "),o){const t=o[0].match(/\d+/)[0],n=new Date(parseInt(t));a+=QF_PUBLISH_END+" "+n.toLocaleString(void 0,e)}}return a}(0,n.A)(".QueryField input",e=>{e.closest(".CIG.TC").classList.add("is-query")}),(0,n.A)(".QueryField input[data-initialized]",e=>{!function(e){const t=document.createElement("div");t.classList.add("QueryField-toggle"),t.frame=e.frame,e.frame.queryToggle=t;const o=document.createElement("span");o.classList.add("QueryField-icon");const n=document.createElement("span");n.classList.add("QueryField-label"),e.closest(".CIG-row").appendChild(t),t.appendChild(n),t.appendChild(o),t.label=n}(e.closest(".QueryField"))}),(0,n.A)(".QueryField-frame .SearchWidget-result.loaded",e=>{const t=e.closest(".QueryField-frame"),o=t.queryToggle;o&&(o.label.textContent=r(e.closest(".widget-queryField"),o),o.closest(".QueryField-toggle.is-open")&&e.closest(".Popup.is-fromRight.popup-show").classList.add("is-visible")),t.style["z-index"]=(0,i.default)()}),(0,n.A)(".QueryField-button",e=>{e.addEventListener("click",t=>{t.preventDefault();const o=e.closest(".QueryField-frame").queryToggle,n=e.closest(".widget-queryField");if(o){o.label.textContent=r(n,o),o.classList.remove("is-open");const e=o.closest(".CIG-row")?.querySelector(".ComboInput")||o.closest(".CIG-row")?.parentElement?.closest(".CIG-row")?.querySelector(".ComboInput");e?.focus()}e.closest(".Popup").classList.remove("is-visible"),document.querySelector(".QueryField-frame > .Popup").classList.remove("is-visible")})}),(0,n.A)(".QueryField-toggle",e=>{e.addEventListener("click",()=>{const t=e.frame;e.classList.add("is-open");const o=t.querySelector(".Popup.is-ready");o.classList.add("is-visible"),o.querySelector(".SearchWidget-query input")?.focus()})}),(0,n.A)(".widget-queryField > .SearchWidget-title",e=>{e.textContent="Edit Dynamic Query"})},19106(e,t,o){"use strict";o(84978),o(92280);var n=o(5292),i=o(95628),r=o(40627),a=o(45594),s=o(32246),c=o(10013);const p=window.BRIGHTSPOT?.ui.tooltips,b=p?.expandAll,M=p?.collapseAll;window.addEventListener("click",e=>{const t=e.target,o=t.closest(".RCIG-addSelect");if(o){const e=(0,i.A)(o,":scope > .ComboInput");e&&!e.contains(t)&&e.click()}}),(0,c.A)(".RCIG-list > .RCIG-item",e=>{(0,s.A)(e,":scope > .RCIG-title",t=>{t.role="button",t.ariaExpanded="false",t.ariaLabel=`${t.textContent}`,e.hasAttribute("data-empty")||(t.ariaExpanded="false",t.addEventListener("click",()=>{const o=!e.classList.contains("is-collapsed");t.ariaExpanded=o?"true":"false"}))})}),(0,c.A)(".RCIG",e=>{const t=e.querySelector(":scope > .RCIG-list");if(!t)return;let o=t.children.length;for(const e of t.children)(0,s.A)(e,":scope > .RCIG-title",t=>{t.role="button",t.ariaExpanded="false",t.ariaLabel=`${t.textContent}`,e.hasAttribute("data-empty")||(t.ariaExpanded="false",t.addEventListener("click",()=>{const o=!e.classList.contains("is-collapsed");t.ariaExpanded=o?"true":"false"}))});e.dataset.rcigSize=o;const i=e.previousElementSibling?.querySelector(".CIG-label label")?.textContent;let c=b,d=M;i&&(c+=` ${i}`,d+=` ${i}`),e.addEventListener("repeatable.add",()=>{e.dataset.rcigSize=++o,e.closest(".CIG-row")?.classList.add("is-expandable")}),e.addEventListener("repeatable.remove",()=>{e.dataset.rcigSize=--o,0===o&&e.closest(".CIG-row")?.classList.remove("is-expandable")});const l=e.querySelector(":scope > ol, :scope > ul");if(Array.from(l.children).some(e=>!e.hasAttribute("data-empty"))){e.addEventListener("repeatable.toggle",()=>{const e=t.querySelectorAll(":scope > li.is-collapsed").length;0===e?(i.classList.add("is-expanded"),i.title=d,i.setAttribute("aria-label",d)):e===o&&(i.classList.remove("is-expanded"),i.title=c,i.setAttribute("aria-label",c))});const i=(0,n.A)("button",{className:"RCIG-expandAll",type:"button",title:c,"aria-label":c,onclick:t=>{const o=i.classList.toggle("is-expanded");o?(i.title=d,i.setAttribute("aria-label",d),s.textContent=p?.expandedAll):(i.title=c,i.setAttribute("aria-label",c),s.textContent=p?.collapsedAll);for(const t of(0,r.A)(e,":scope > .RCIG-list > .RCIG-item > .RCIG-title")){const e=t.parentElement.classList.contains("is-collapsed");(o&&e||!o&&!e)&&t.click()}}}),s=(0,n.A)("div",{className:"screen-reader-only","aria-live":"polite"});0===o?i.classList.add("is-expanded"):e.closest(".CIG-row")?.classList.add("is-expandable"),(0,a.A)(s,e),(0,a.A)(i,e)}})},90819(e,t,o){"use strict";o(67219),o(44764),o(84978),o(13722),o(25809),o(91672);var n=o(32246),i=o(5292),r=o(10013),a=o(1439);(0,n.A)(".richtext",e=>{const t=e.closest("div");t.style.position="relative";const o=e.getBoundingClientRect().height,n=(0,i.A)("div",{className:"ProseMirror-loader"});n.style.minHeight=`${o}px`,t.appendChild(n)});const s=new Map;RICH_TEXT_ELEMENTS.forEach(e=>{let t=e.tag,o="";const n=/[\u0030-\u0039\u0061-\u007A\u0041-\u005A-]/g;[...t].forEach(e=>{let t=e;e.match(n)||(t=`--${e.charCodeAt(0)}--`),o+=t}),s.set(t,o)}),window.RICH_TEXT_ELEMENTS_PM=RICH_TEXT_ELEMENTS.map(e=>{if(e.tag=s.get(e.tag),e.context){const t=[];e.context.forEach(e=>{let o=e;o&&(o=s.get(e)),t.push(o)}),e.context=t}return e}),(0,r.A)(".richtext",async e=>{const{RTE:t}=await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(4582),o.e(2825),o.e(9360),o.e(4795),o.e(1386)]).then(o.bind(o,73061)),n=e.getAttribute("data-rte-toolbar");let i=RICH_TEXT_TOOLBARS[n];if(!window.BRIGHTSPOT?.ai?.AI_CHAT_ENABLED){const e=["rte2-toolbar-track-ai","rte2-toolbar-ai-inline"];i=i.filter(t=>!e.includes(t.className))}const r=e.getAttribute("data-rte-lines"),a="true"===e.getAttribute("data-inline"),c=e.getAttribute("data-user"),p=e.getAttribute("data-user-id");let b=e.getAttribute("data-rte-tags");if(b)try{b=JSON.parse(b).map(e=>s.get(e))}catch(e){console.log(e)}const M=e.getAttribute("name"),d="true"===e.getAttribute("data-collab"),l=new t(e,i,a,c,p,b,M,d,s,parseInt(r,10)||1,RICH_TEXT_ELEMENTS_PM);l.init(),e.rte=l,e.dispatchEvent(new CustomEvent("brightspot.rte.init",{bubbles:!0,detail:{rte:l}}))}),(0,n.A)(".RichTextEditor-uploadComplete",e=>{let t=e.dataset.html;if(!t)return;const o=a(e),n=o.popup("source");if(!n)return;const i=n.attr("data-event-id");t=t.replace(/<br>/g,"");const r=document.createElement("div");r.innerHTML=t;const s=r.children,c=[];[...s].forEach(e=>{const t=[...e.attributes].reduce((e,t)=>(e[t.name]=t.value,e),{});c.push({label:e.innerText,data:t,tag:e.tagName.toLowerCase()})}),PubSub.publish(i,c),o.popup("close")})},11532(e,t,o){"use strict";o(67219),o(84978),o(25809),o(91672);var n=o(32246);(0,n.A)(".SearchFields-input",e=>{const t=window.BRIGHTSPOT?.ui.tooltips;e.setAttribute("title",e.closest(".SearchFields-hide")?t.fieldSelect:t.fieldHide),e.addEventListener("keydown",i),e.addEventListener("click",r)}),(0,n.A)(".SearchFields-filter",e=>{e.addEventListener("keydown",i)});const i=e=>{"Enter"===e.key&&e.preventDefault()},r=e=>{e.preventDefault(),e.stopPropagation();const t=e.target.matches("input")?e.target:e.target.querySelector("input"),o=t.closest(".SearchFields"),n=t.closest("li"),i=n.closest("div");let s,c,p=n.nextSibling;if(o.querySelector(".SearchFields-tab-container")){const e=o.querySelector(".SearchFields-tab-container").querySelector("ul").querySelector(".is-selected").classList[0].toLowerCase();s=o.querySelector(`.SearchFields-container-${e} > .SearchFields-displayContainer > .SearchFields-displayTitle > ul`),c=o.querySelector(`.SearchFields-container-${e} > .SearchFields-hide`)}else s=o.querySelector(".SearchFields-displayTitle > ul"),c=o.querySelector(".SearchFields-hide > ul");if(i.classList.contains("SearchFields-hide")){const e=n.cloneNode(!0),t=e.querySelector(".SearchFields-input");t.addEventListener("click",r),t.setAttribute("title",window.BRIGHTSPOT?.ui.tooltips.fieldHide),s.appendChild(e);const o=s?.querySelector(":scope > li .SearchFields-input");if(p)if(p.classList.contains("is-disabled"))for(;p?.classList.contains("is-disabled");)p=p.nextSibling,p?p.classList.contains("is-disabled")||p.querySelector("input")?.focus():o?.focus();else p.querySelector("input")?.focus();else o?.focus()}else p?p.querySelector("input")?.focus():o?.querySelector(".actions > button")?.focus(),n.remove();a(t.value,c)},a=(e,t)=>{const o=t.querySelector(`input[value="${e}"]`),n=o?.closest("li");n?.classList.contains("is-disabled")&&o.addEventListener("click",r),n?.classList.toggle("is-disabled"),o?.toggleAttribute("disabled"),n?.querySelector(".SearchFields-drag")?.toggleAttribute("disabled")};(0,n.A)(".SearchFields .SearchFields-filter",e=>{e.addEventListener("input",t=>{const o=e.closest(".SearchFields-hide"),n=new RegExp(t.target.value.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");o.querySelectorAll("label").forEach(e=>{const t=e.parentElement;n.test(e.getAttribute("data-display-name"))?t.style.display="flex":t.style.display="none"}),o.querySelectorAll(".SearchFields-subheading").forEach(e=>{const t=e.nextSibling;t.querySelector('li[style*="display: flex"]')?(e.style.display="flex",t.style.display="block"):(e.style.display="none",t.style.display="none")})})}),(0,n.A)(".SearchFields .SearchFields-tab-container .SearchFields-tab-ul",e=>{const t=e.closest(".SearchFields");t.classList.add("has-tabs");const o=[...e.children].filter(e=>e.classList.contains("is-selected"))[0],n=[...e.children].filter(e=>!e.classList.contains("is-selected"))[0],i=t.querySelector(".SearchFields-container-"+o.classList[0].toLowerCase()),r=t.querySelector(".SearchFields-container-"+n.classList[0].toLowerCase());o.addEventListener("click",()=>{s(o,n,i,r)}),n.addEventListener("click",()=>{s(n,o,i,r)})}),(0,n.A)(".SearchFields-container",e=>{const t=e.querySelectorAll(".SearchFields-hide .SearchFields-input"),o=e.querySelectorAll(".SearchFields-displayContainer .SearchFields-input"),n=Array.from(o).map(e=>e.value);n&&t.forEach(e=>{if(n.includes(e.value)){const t=e.closest(".RCIG-item");t?.classList.add("is-disabled"),e.setAttribute("disabled",""),t?.querySelector(".SearchFields-drag")?.setAttribute("disabled","")}}),e.querySelector(".SearchFields-hide .SearchFields-subheading")&&e.classList.add("has-subheadings"),e.querySelectorAll(".SearchFields-hide ul, .SearchFields-displayContainer ul").forEach(e=>{e.closest(".SearchFields-hide")&&e.classList.add("is-clonable"),e.addEventListener("add",t=>{if(t.detail&&(t=t.detail),!t.item)return;const o=t.item.querySelector(".SearchFields-input"),n=o.value,i=t.from.classList.contains("is-clonable"),s=t.to.classList.contains("is-clonable"),c=e.closest(".SearchFields-hide");setTimeout(()=>{if(o.addEventListener("click",r),s&&i){t.item.remove();const e=c?.querySelector(`.SearchFields-input[value="${n}"]`).closest("li"),o=e.querySelector(".SearchFields-input");e.addEventListener("animationend",()=>{e.classList.remove("is-added")}),e.classList.add("is-added"),o.addEventListener("click",r),o.checked=!1}else i?(o.checked=!0,a(n,t.from)):c?.querySelectorAll(`.SearchFields-input[value="${n}"]`).forEach(e=>{const o=e.closest("li");o.classList.contains("is-disabled")&&(t.item.remove(),a(n,c),e.scrollIntoView({block:"center"}),e.checked=!1,o.addEventListener("animationend",()=>{o.classList.remove("is-added")}),o.classList.add("is-added"))})},0)})})});const s=(e,t,o,n)=>{e.classList.contains("is-selected")||(e.classList.toggle("is-selected"),t.classList.toggle("is-selected"),n.classList.toggle("is-hidden"),o.classList.toggle("is-hidden"))}},90880(e,t,o){"use strict";o(67219),o(84978),o(25809);var n=o(5292),i=o(40627),r=o(68243),a=o(32246),s=o(72402),c=o.n(s),p=o(34980),b=o(66556),M=o(30473);const d=window.BRIGHTSPOT?.ui.tooltips;function l(e,t){e.preventDefault(),e.stopPropagation();const o=e.target.closest(".SearchWidget-form"),n=o.querySelector(`.searchFiltersRest input[name="${t}"]`),i=o.querySelector('input[name="view"]'),r=o.querySelector(".SearchResult-views li.selected a").dataset.view;n.value=e.target.value,i.value=r,n.shadowField=t,n.dispatchEvent(new Event("change",{bubbles:!0}))}(0,a.A)(".searchResult-checkAll",e=>{const t=e.closest("table");if(t){const o=(0,i.A)(t,':scope > tbody input[type="checkbox"]'),n=()=>{const n=(0,i.A)(t,':scope > tbody input[type="checkbox"]:checked');e.checked=o.length>0&&n.length===o.length};for(const e of o)e.addEventListener("click",e=>{n()});e.addEventListener("click",t=>{const n=e.checked,i="data-frame-"+(n?"check":"uncheck");let r="";for(const t of o)t.checked=n,e.getAttribute(i).includes(t.value)||(r+=`&id=${encodeURIComponent(t.value)}`);e.setAttribute(i,e.getAttribute(i)+r)}),n()}}),(0,a.A)(".SearchResult-view > .SearchResult-actions.loaded",e=>{const t=e.closest(".SearchResult-view"),o=(0,n.A)("div",{className:"SearchResult-actions-wrapper"});e.querySelectorAll('[role="menuitem"]').forEach(e=>e.setAttribute("tabindex","-1"));const i=(0,n.A)("button",{className:"SearchResult-actions-toggle",id:"SearchResult-actions-toggle",title:d.actions?.actions,"aria-haspopup":"menu","aria-label":d.actions?.searchResult,"aria-expanded":"false",onclick:()=>{(0,b.H0)(e,i),(0,b.AM)(e,i)}});if(t.prepend(o),o.appendChild(i),o.appendChild(e),(0,b.D1)(e,i),t.closest('.SearchWidget[name="searchAdvancedFull"]'))return;const r=t.querySelector('.SearchResult-action-link[href*="/searchAdvancedFull"]'),a=(0,n.A)("button",{className:"SearchResult-fullscreen",title:d.fullScreenSearch,"aria-label":d.fullScreen,onclick:e=>{r.click()}});o.appendChild(a)}),(0,a.A)(".SearchResult-actions .SearchResult-selectionReset",e=>{e.addEventListener("click",()=>{const t=e.closest(".SearchResult-actions-wrapper");t?.querySelector(".SearchResult-actions-toggle")?.focus()})}),(0,a.A)(".SearchResult-views",e=>{const t=e.closest(".SearchWidget"),o=t?.querySelector(".searchFiltersRest");if(o){const t=o.querySelector('input[name="view"]');t&&e.querySelectorAll("[data-view]").forEach(e=>{e.addEventListener("click",()=>t.value=e.dataset.view)})}}),(0,a.A)(".SearchResult-images",e=>{const t=e.closest(".SearchWidget-form"),o=t?.querySelector('.searchFiltersRest input[name="iz"]'),i=e.closest(".SearchResult-list"),a=o?.value||p.A.get("BSP.SearchResult.imageHeight")||20;e.setAttribute("data-height",a),i&&(0,r.A)((0,n.A)("div",{className:"SearchResult-imageHeightInput"},(0,n.A)("input",{type:"range",title:d.imageHeight,min:1,max:100,step:1,value:a,"aria-label":d.imageHeight,"shadow-field":o?.name,oninput:({target:{value:t}})=>{e.setAttribute("data-height",t),p.A.set("BSP.SearchResult.imageHeight",t)},onmouseup:e=>{o&&a!==e.target.value&&l(e,o.name)}})),i)}),(0,a.A)(".SearchResult-board-field",e=>{e.addEventListener("change",t=>{l(t,e.name)})}),(0,a.A)(".SearchResult [data-highlight]",e=>{const t=e.dataset.highlight;if(t){const o=e.matches("table")&&e.querySelector("tbody")||e;new(c())(o).mark(t.trim().split(/\s+/),{className:"SearchResult-highlight"})}}),(0,a.A)('.Popup[name="bulkArchive"]',e=>{const t=e.parentNode.querySelector('.Popup[name="miscSearch"] .queryRestrictions'),o=e.querySelector(".closeButton");o&&o.addEventListener("click",function(){if(e.querySelector(".message.is-success")){let o=new CustomEvent("submit",{bubbles:!0});t.dispatchEvent(o),e.parentNode.removeChild(e)}})}),(0,a.A)('.Popup[name="miscSearch"] .SearchResult-list',e=>{e.addEventListener("click",function(e){const t=e.target.closest('a[href*="/edit.jsp"]');if(!t)return;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||0!==e.button)return;e.preventDefault();const o=(0,n.A)("div",{id:"searchResult-loader-overlay",className:"searchResult-loader-overlay"},(0,n.A)("span",{className:"searchResult-loader-spinner"}));o.style.zIndex=(0,M.default)(),document.body.appendChild(o),window.location=t.href})})},34216(e,t,o){"use strict";var n=o(32246),i=o(47626);(0,n.A)(".action-share",async e=>{const t=e.closest(".PreviewFrame");if(!t)return;const o=t.querySelector(".PreviewFrame-typeForm");let i=null;if(o){const e=o.querySelector('select[name="previewType"]');i=e.options[e.selectedIndex].value}e.addEventListener("click",t=>{let o=e.href;return!o||(i&&(o=o+"&defaultPreviewTypeId="+encodeURIComponent(i)),e.href=o,!0)}),(0,n.A)(".PreviewFrame-iFrameControlsForm",async t=>{t.addEventListener("submit",o=>{let n=e.getAttribute("data-original-href");if(n||(n=e.href,e.setAttribute("data-original-href",n)),!n)return!0;let i=new URLSearchParams(new FormData(t)).toString();return i&&(n=n+"&="+i),e.href=n,!0})})}),(0,n.A)(".SharePreview",async e=>{const t=e.querySelector(".PreviewFrame"),o=new i.A(t);o.isVisible=!0,o.updatePreview()})},83368(e,t,o){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function i(e,t,o){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r.apply(null,arguments)}function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach(function(t){i(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function p(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}o.d(t,{Ts:()=>kt}),o(67219),o(44764),o(84978),o(13722),o(39589),o(25809),o(92280);var b=p(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),M=p(/Edge/i),d=p(/firefox/i),l=p(/safari/i)&&!p(/chrome/i)&&!p(/android/i),z=p(/iP(ad|od|hone)/i),u=p(/chrome/i)&&p(/android/i),O={capture:!1,passive:!1};function A(e,t,o){e.addEventListener(t,o,!b&&O)}function f(e,t,o){e.removeEventListener(t,o,!b&&O)}function h(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function m(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function q(e,t,o,n){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&h(e,t):h(e,t))||n&&e===o)return e;if(e===o)break}while(e=m(e))}return null}var _,W=/\s+/g;function g(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(W," ").replace(" "+t+" "," ");e.className=(n+(o?" "+t:"")).replace(W," ")}}function y(e,t,o){var n=e&&e.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in n||-1!==t.indexOf("webkit")||(t="-webkit-"+t),n[t]=o+("string"==typeof o?"":"px")}}function v(e,t){var o="";if("string"==typeof e)o=e;else do{var n=y(e,"transform");n&&"none"!==n&&(o=n+" "+o)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(o)}function L(e,t,o){if(e){var n=e.getElementsByTagName(t),i=0,r=n.length;if(o)for(;i<r;i++)o(n[i],i);return n}return[]}function w(){return document.scrollingElement||document.documentElement}function R(e,t,o,n,i){if(e.getBoundingClientRect||e===window){var r,a,s,c,p,M,d;if(e!==window&&e.parentNode&&e!==w()?(a=(r=e.getBoundingClientRect()).top,s=r.left,c=r.bottom,p=r.right,M=r.height,d=r.width):(a=0,s=0,c=window.innerHeight,p=window.innerWidth,M=window.innerHeight,d=window.innerWidth),(t||o)&&e!==window&&(i=i||e.parentNode,!b))do{if(i&&i.getBoundingClientRect&&("none"!==y(i,"transform")||o&&"static"!==y(i,"position"))){var l=i.getBoundingClientRect();a-=l.top+parseInt(y(i,"border-top-width")),s-=l.left+parseInt(y(i,"border-left-width")),c=a+r.height,p=s+r.width;break}}while(i=i.parentNode);if(n&&e!==window){var z=v(i||e),u=z&&z.a,O=z&&z.d;z&&(c=(a/=O)+(M/=O),p=(s/=u)+(d/=u))}return{top:a,left:s,bottom:c,right:p,width:d,height:M}}}function k(e,t,o){for(var n=B(e,!0),i=R(e)[t];n;){var r=R(n)[o];if(!("top"===o||"left"===o?i>=r:i<=r))return n;if(n===w())break;n=B(n,!1)}return!1}function T(e,t,o,n){for(var i=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Pe.ghost&&(n||a[r]!==Pe.dragged)&&q(a[r],o.draggable,e,!1)){if(i===t)return a[r];i++}r++}return null}function S(e,t){for(var o=e.lastElementChild;o&&(o===Pe.ghost||"none"===y(o,"display")||t&&!h(o,t));)o=o.previousElementSibling;return o||null}function E(e,t){var o=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Pe.clone||t&&!h(e,t)||o++;return o}function N(e){var t=0,o=0,n=w();if(e)do{var i=v(e),r=i.a,a=i.d;t+=e.scrollLeft*r,o+=e.scrollTop*a}while(e!==n&&(e=e.parentNode));return[t,o]}function B(e,t){if(!e||!e.getBoundingClientRect)return w();var o=e,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var i=y(o);if(o.clientWidth<o.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!o.getBoundingClientRect||o===document.body)return w();if(n||t)return o;n=!0}}}while(o=o.parentNode);return w()}function C(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function D(e,t){return function(){if(!_){var o=arguments;1===o.length?e.call(this,o[0]):e.apply(this,o),_=setTimeout(function(){_=void 0},t)}}}function x(e,t,o){e.scrollLeft+=t,e.scrollTop+=o}function X(e){var t=window.Polymer,o=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):o?o(e).clone(!0)[0]:e.cloneNode(!0)}function Y(e,t){y(e,"position","absolute"),y(e,"top",t.top),y(e,"left",t.left),y(e,"width",t.width),y(e,"height",t.height)}function P(e){y(e,"position",""),y(e,"top",""),y(e,"left",""),y(e,"width",""),y(e,"height","")}function I(e,t,o){var n={};return Array.from(e.children).forEach(function(i){var r,a,s,c;if(q(i,t.draggable,e,!1)&&!i.animated&&i!==o){var p=R(i);n.left=Math.min(null!==(r=n.left)&&void 0!==r?r:1/0,p.left),n.top=Math.min(null!==(a=n.top)&&void 0!==a?a:1/0,p.top),n.right=Math.max(null!==(s=n.right)&&void 0!==s?s:-1/0,p.right),n.bottom=Math.max(null!==(c=n.bottom)&&void 0!==c?c:-1/0,p.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var H="Sortable"+(new Date).getTime();var j=[],F={initializeByDefault:!0},G={mount:function(e){for(var t in F)F.hasOwnProperty(t)&&!(t in e)&&(e[t]=F[t]);j.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),j.push(e)},pluginEvent:function(e,t,o){var n=this;this.eventCanceled=!1,o.cancel=function(){n.eventCanceled=!0};var i=e+"Global";j.forEach(function(n){t[n.pluginName]&&(t[n.pluginName][i]&&t[n.pluginName][i](s({sortable:t},o)),t.options[n.pluginName]&&t[n.pluginName][e]&&t[n.pluginName][e](s({sortable:t},o)))})},initializePlugins:function(e,t,o,n){for(var i in j.forEach(function(n){var i=n.pluginName;if(e.options[i]||n.initializeByDefault){var a=new n(e,t,e.options);a.sortable=e,a.options=e.options,e[i]=a,r(o,a.defaults)}}),e.options)if(e.options.hasOwnProperty(i)){var a=this.modifyOption(e,i,e.options[i]);void 0!==a&&(e.options[i]=a)}},getEventProperties:function(e,t){var o={};return j.forEach(function(n){"function"==typeof n.eventProperties&&r(o,n.eventProperties.call(t[n.pluginName],e))}),o},modifyOption:function(e,t,o){var n;return j.forEach(function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[t]&&(n=i.optionListeners[t].call(e[i.pluginName],o))}),n}};function $(e){var t=e.sortable,o=e.rootEl,n=e.name,i=e.targetEl,r=e.cloneEl,a=e.toEl,c=e.fromEl,p=e.oldIndex,d=e.newIndex,l=e.oldDraggableIndex,z=e.newDraggableIndex,u=e.originalEvent,O=e.putSortable,A=e.extraEventProperties;if(t=t||o&&o[H]){var f,h=t.options,m="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||b||M?(f=document.createEvent("Event")).initEvent(n,!0,!0):f=new CustomEvent(n,{bubbles:!0,cancelable:!0}),f.to=a||o,f.from=c||o,f.item=i||o,f.clone=r,f.oldIndex=p,f.newIndex=d,f.oldDraggableIndex=l,f.newDraggableIndex=z,f.originalEvent=u,f.pullMode=O?O.lastPutMode:void 0;var q=s(s({},A),G.getEventProperties(n,t));for(var _ in q)f[_]=q[_];o&&o.dispatchEvent(f),h[m]&&h[m].call(t,f)}}var U=["evt"],V=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=o.evt,i=function(e,t){if(null==e)return{};var o,n,i=function(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)o=r[n],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}(o,U);G.pluginEvent.bind(Pe)(e,t,s({dragEl:K,parentEl:Q,ghostEl:Z,rootEl:ee,nextEl:te,lastDownEl:oe,cloneEl:ne,cloneHidden:ie,dragStarted:Ae,putSortable:be,activeSortable:Pe.active,originalEvent:n,oldIndex:re,oldDraggableIndex:se,newIndex:ae,newDraggableIndex:ce,hideGhostForTarget:De,unhideGhostForTarget:xe,cloneNowHidden:function(){ie=!0},cloneNowShown:function(){ie=!1},dispatchSortableEvent:function(e){J({sortable:t,name:e,originalEvent:n})}},i))};function J(e){$(s({putSortable:be,cloneEl:ne,targetEl:K,rootEl:ee,oldIndex:re,oldDraggableIndex:se,newIndex:ae,newDraggableIndex:ce},e))}var K,Q,Z,ee,te,oe,ne,ie,re,ae,se,ce,pe,be,Me,de,le,ze,ue,Oe,Ae,fe,he,me,qe,_e=!1,We=!1,ge=[],ye=!1,ve=!1,Le=[],we=!1,Re=[],ke="undefined"!=typeof document,Te=z,Se=M||b?"cssFloat":"float",Ee=ke&&!u&&!z&&"draggable"in document.createElement("div"),Ne=function(){if(ke){if(b)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Be=function(e,t){var o=y(e),n=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),i=T(e,0,t),r=T(e,1,t),a=i&&y(i),s=r&&y(r),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+R(i).width,p=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+R(r).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var b="left"===a.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==b?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=n&&"none"===o[Se]||r&&"none"===o[Se]&&c+p>n)?"vertical":"horizontal"},Ce=function(e){function t(e,o){return function(n,i,r,a){var s=n.options.group.name&&i.options.group.name&&n.options.group.name===i.options.group.name;if(null==e&&(o||s))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(n,i,r,a),o)(n,i,r,a);var c=(o?n:i).options.group.name;return!0===e||"string"==typeof e&&e===c||e.join&&e.indexOf(c)>-1}}var o={},n=e.group;n&&"object"==c(n)||(n={name:n}),o.name=n.name,o.checkPull=t(n.pull,!0),o.checkPut=t(n.put),o.revertClone=n.revertClone,e.group=o},De=function(){!Ne&&Z&&y(Z,"display","none")},xe=function(){!Ne&&Z&&y(Z,"display","")};ke&&!u&&document.addEventListener("click",function(e){if(We)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),We=!1,!1},!0);var Xe=function(e){if(K){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,r=e.clientY,ge.some(function(e){var t=e[H].options.emptyInsertThreshold;if(t&&!S(e)){var o=R(e),n=i>=o.left-t&&i<=o.right+t,s=r>=o.top-t&&r<=o.bottom+t;return n&&s?a=e:void 0}}),a);if(t){var o={};for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[H]._onDragOver(o)}}var i,r,a},Ye=function(e){K&&K.parentNode[H]._isOutsideThisEl(e.target)};function Pe(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=r({},t),e[H]=this;var o,n,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Be(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Pe.supportPointer&&"PointerEvent"in window&&(!l||z),emptyInsertThreshold:5};for(var a in G.initializePlugins(this,e,i),i)!(a in t)&&(t[a]=i[a]);for(var c in Ce(t),this)"_"===c.charAt(0)&&"function"==typeof this[c]&&(this[c]=this[c].bind(this));this.nativeDraggable=!t.forceFallback&&Ee,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?A(e,"pointerdown",this._onTapStart):(A(e,"mousedown",this._onTapStart),A(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(A(e,"dragover",this),A(e,"dragenter",this)),ge.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),r(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(e){if("none"!==y(e,"display")&&e!==Pe.ghost){n.push({target:e,rect:R(e)});var t=s({},n[n.length-1].rect);if(e.thisAnimationDuration){var o=v(e,!0);o&&(t.top-=o.f,t.left-=o.e)}e.fromRect=t}})},addAnimationState:function(e){n.push(e)},removeAnimationState:function(e){n.splice(function(e,t){for(var o in e)if(e.hasOwnProperty(o))for(var n in t)if(t.hasOwnProperty(n)&&t[n]===e[o][n])return Number(o);return-1}(n,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(o),void("function"==typeof e&&e());var i=!1,r=0;n.forEach(function(e){var o=0,n=e.target,a=n.fromRect,s=R(n),c=n.prevFromRect,p=n.prevToRect,b=e.rect,M=v(n,!0);M&&(s.top-=M.f,s.left-=M.e),n.toRect=s,n.thisAnimationDuration&&C(c,s)&&!C(a,s)&&(b.top-s.top)/(b.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(o=function(e,t,o,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))*n.animation}(b,c,p,t.options)),C(s,a)||(n.prevFromRect=a,n.prevToRect=s,o||(o=t.options.animation),t.animate(n,b,s,o)),o&&(i=!0,r=Math.max(r,o),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},o),n.thisAnimationDuration=o)}),clearTimeout(o),i?o=setTimeout(function(){"function"==typeof e&&e()},r):"function"==typeof e&&e(),n=[]},animate:function(e,t,o,n){if(n){y(e,"transition",""),y(e,"transform","");var i=v(this.el),r=i&&i.a,a=i&&i.d,s=(t.left-o.left)/(r||1),c=(t.top-o.top)/(a||1);e.animatingX=!!s,e.animatingY=!!c,y(e,"transform","translate3d("+s+"px,"+c+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),y(e,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),y(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){y(e,"transition",""),y(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},n)}}}))}function Ie(e,t,o,n,i,r,a,s){var c,p,d=e[H],l=d.options.onMove;return!window.CustomEvent||b||M?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=t,c.from=e,c.dragged=o,c.draggedRect=n,c.related=i||t,c.relatedRect=r||R(t),c.willInsertAfter=s,c.originalEvent=a,e.dispatchEvent(c),l&&(p=l.call(d,c,a)),p}function He(e){e.draggable=!1}function je(){we=!1}function Fe(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,n=0;o--;)n+=t.charCodeAt(o);return n.toString(36)}function Ge(e){return setTimeout(e,0)}function $e(e){return clearTimeout(e)}Pe.prototype={constructor:Pe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(fe=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,K):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,n=this.options,i=n.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,p=n.filter;if(function(e){Re.length=0;for(var t=e.getElementsByTagName("input"),o=t.length;o--;){var n=t[o];n.checked&&Re.push(n)}}(o),!K&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||n.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!l||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=q(s,n.draggable,o,!1))&&s.animated||oe===s)){if(re=E(s),se=E(s,n.draggable),"function"==typeof p){if(p.call(this,e,s,this))return J({sortable:t,rootEl:c,name:"filter",targetEl:s,toEl:o,fromEl:o}),V("filter",t,{evt:e}),void(i&&e.preventDefault())}else if(p&&(p=p.split(",").some(function(n){if(n=q(c,n.trim(),o,!1))return J({sortable:t,rootEl:n,name:"filter",targetEl:s,fromEl:o,toEl:o}),V("filter",t,{evt:e}),!0})))return void(i&&e.preventDefault());n.handle&&!q(c,n.handle,o,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,o){var n,i=this,r=i.el,a=i.options,s=r.ownerDocument;if(o&&!K&&o.parentNode===r){var c=R(o);if(ee=r,Q=(K=o).parentNode,te=K.nextSibling,oe=o,pe=a.group,Pe.dragged=K,Me={target:K,clientX:(t||e).clientX,clientY:(t||e).clientY},ue=Me.clientX-c.left,Oe=Me.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,K.style["will-change"]="all",n=function(){V("delayEnded",i,{evt:e}),Pe.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!d&&i.nativeDraggable&&(K.draggable=!0),i._triggerDragStart(e,t),J({sortable:i,name:"choose",originalEvent:e}),g(K,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){L(K,e.trim(),He)}),A(s,"dragover",Xe),A(s,"mousemove",Xe),A(s,"touchmove",Xe),a.supportPointer?(A(s,"pointerup",i._onDrop),!this.nativeDraggable&&A(s,"pointercancel",i._onDrop)):(A(s,"mouseup",i._onDrop),A(s,"touchend",i._onDrop),A(s,"touchcancel",i._onDrop)),d&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),V("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(M||b))n();else{if(Pe.eventCanceled)return void this._onDrop();a.supportPointer?(A(s,"pointerup",i._disableDelayedDrag),A(s,"pointercancel",i._disableDelayedDrag)):(A(s,"mouseup",i._disableDelayedDrag),A(s,"touchend",i._disableDelayedDrag),A(s,"touchcancel",i._disableDelayedDrag)),A(s,"mousemove",i._delayedDragTouchMoveHandler),A(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&A(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(n,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&He(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;f(e,"mouseup",this._disableDelayedDrag),f(e,"touchend",this._disableDelayedDrag),f(e,"touchcancel",this._disableDelayedDrag),f(e,"pointerup",this._disableDelayedDrag),f(e,"pointercancel",this._disableDelayedDrag),f(e,"mousemove",this._delayedDragTouchMoveHandler),f(e,"touchmove",this._delayedDragTouchMoveHandler),f(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?A(document,"pointermove",this._onTouchMove):A(document,t?"touchmove":"mousemove",this._onTouchMove):(A(K,"dragend",this),A(ee,"dragstart",this._onDragStart));try{document.selection?Ge(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(_e=!1,ee&&K){V("dragStarted",this,{evt:t}),this.nativeDraggable&&A(document,"dragover",Ye);var o=this.options;!e&&g(K,o.dragClass,!1),g(K,o.ghostClass,!0),Pe.active=this,e&&this._appendGhost(),J({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(de){this._lastX=de.clientX,this._lastY=de.clientY,De();for(var e=document.elementFromPoint(de.clientX,de.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(de.clientX,de.clientY))!==t;)t=e;if(K.parentNode[H]._isOutsideThisEl(e),t)do{if(t[H]&&t[H]._onDragOver({clientX:de.clientX,clientY:de.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=m(t));xe()}},_onTouchMove:function(e){if(Me){var t=this.options,o=t.fallbackTolerance,n=t.fallbackOffset,i=e.touches?e.touches[0]:e,r=Z&&v(Z,!0),a=Z&&r&&r.a,s=Z&&r&&r.d,c=Te&&qe&&N(qe),p=(i.clientX-Me.clientX+n.x)/(a||1)+(c?c[0]-Le[0]:0)/(a||1),b=(i.clientY-Me.clientY+n.y)/(s||1)+(c?c[1]-Le[1]:0)/(s||1);if(!Pe.active&&!_e){if(o&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(Z){r?(r.e+=p-(le||0),r.f+=b-(ze||0)):r={a:1,b:0,c:0,d:1,e:p,f:b};var M="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");y(Z,"webkitTransform",M),y(Z,"mozTransform",M),y(Z,"msTransform",M),y(Z,"transform",M),le=p,ze=b,de=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Z){var e=this.options.fallbackOnBody?document.body:ee,t=R(K,!0,Te,!0,e),o=this.options;if(Te){for(qe=e;"static"===y(qe,"position")&&"none"===y(qe,"transform")&&qe!==document;)qe=qe.parentNode;qe!==document.body&&qe!==document.documentElement?(qe===document&&(qe=w()),t.top+=qe.scrollTop,t.left+=qe.scrollLeft):qe=w(),Le=N(qe)}g(Z=K.cloneNode(!0),o.ghostClass,!1),g(Z,o.fallbackClass,!0),g(Z,o.dragClass,!0),y(Z,"transition",""),y(Z,"transform",""),y(Z,"box-sizing","border-box"),y(Z,"margin",0),y(Z,"top",t.top),y(Z,"left",t.left),y(Z,"width",t.width),y(Z,"height",t.height),y(Z,"opacity","0.8"),y(Z,"position",Te?"absolute":"fixed"),y(Z,"zIndex","100000"),y(Z,"pointerEvents","none"),Pe.ghost=Z,e.appendChild(Z),y(Z,"transform-origin",ue/parseInt(Z.style.width)*100+"% "+Oe/parseInt(Z.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,n=e.dataTransfer,i=o.options;V("dragStart",this,{evt:e}),Pe.eventCanceled?this._onDrop():(V("setupClone",this),Pe.eventCanceled||((ne=X(K)).removeAttribute("id"),ne.draggable=!1,ne.style["will-change"]="",this._hideClone(),g(ne,this.options.chosenClass,!1),Pe.clone=ne),o.cloneId=Ge(function(){V("clone",o),Pe.eventCanceled||(o.options.removeCloneOnHide||ee.insertBefore(ne,K),o._hideClone(),J({sortable:o,name:"clone"}))}),!t&&g(K,i.dragClass,!0),t?(We=!0,o._loopId=setInterval(o._emulateDragOver,50)):(f(document,"mouseup",o._onDrop),f(document,"touchend",o._onDrop),f(document,"touchcancel",o._onDrop),n&&(n.effectAllowed="move",i.setData&&i.setData.call(o,n,K)),A(document,"drop",o),y(K,"transform","translateZ(0)")),_e=!0,o._dragStartId=Ge(o._dragStarted.bind(o,t,e)),A(document,"selectstart",o),Ae=!0,window.getSelection().removeAllRanges(),l&&y(document.body,"user-select","none"))},_onDragOver:function(e){var t,o,n,i,r=this.el,a=e.target,c=this.options,p=c.group,b=Pe.active,M=pe===p,d=c.sort,l=be||b,z=this,u=!1;if(!we){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=q(a,c.draggable,r,!0),X("dragOver"),Pe.eventCanceled)return u;if(K.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||z._ignoreWhileAnimating===a)return P(!1);if(We=!1,b&&!c.disabled&&(M?d||(n=Q!==ee):be===this||(this.lastPutMode=pe.checkPull(this,b,K,e))&&p.checkPut(this,b,K,e))){if(i="vertical"===this._getDirection(e,a),t=R(K),X("dragOverValid"),Pe.eventCanceled)return u;if(n)return Q=ee,Y(),this._hideClone(),X("revert"),Pe.eventCanceled||(te?ee.insertBefore(K,te):ee.appendChild(K)),P(!0);var O=S(r,c.draggable);if(!O||function(e,t,o){var n=R(S(o.el,o.options.draggable)),i=I(o.el,o.options,Z);return t?e.clientX>i.right+10||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>i.bottom+10||e.clientX>n.right&&e.clientY>n.top}(e,i,this)&&!O.animated){if(O===K)return P(!1);if(O&&r===e.target&&(a=O),a&&(o=R(a)),!1!==Ie(ee,r,K,t,a,o,e,!!a))return Y(),O&&O.nextSibling?r.insertBefore(K,O.nextSibling):r.appendChild(K),Q=r,j(),P(!0)}else if(O&&function(e,t,o){var n=R(T(o.el,0,o.options,!0)),i=I(o.el,o.options,Z);return t?e.clientX<i.left-10||e.clientY<n.top&&e.clientX<n.right:e.clientY<i.top-10||e.clientY<n.bottom&&e.clientX<n.left}(e,i,this)){var A=T(r,0,c,!0);if(A===K)return P(!1);if(o=R(a=A),!1!==Ie(ee,r,K,t,a,o,e,!1))return Y(),r.insertBefore(K,A),Q=r,j(),P(!0)}else if(a.parentNode===r){o=R(a);var f,h,m,_=K.parentNode!==r,W=!function(e,t,o){var n=o?e.left:e.top,i=o?e.right:e.bottom,r=o?e.width:e.height,a=o?t.left:t.top,s=o?t.right:t.bottom,c=o?t.width:t.height;return n===a||i===s||n+r/2===a+c/2}(K.animated&&K.toRect||t,a.animated&&a.toRect||o,i),v=i?"top":"left",L=k(a,"top","top")||k(K,"top","top"),w=L?L.scrollTop:void 0;if(fe!==a&&(h=o[v],ye=!1,ve=!W&&c.invertSwap||_),f=function(e,t,o,n,i,r,a,s){var c=n?e.clientY:e.clientX,p=n?o.height:o.width,b=n?o.top:o.left,M=n?o.bottom:o.right,d=!1;if(!a)if(s&&me<p*i){if(!ye&&(1===he?c>b+p*r/2:c<M-p*r/2)&&(ye=!0),ye)d=!0;else if(1===he?c<b+me:c>M-me)return-he}else if(c>b+p*(1-i)/2&&c<M-p*(1-i)/2)return function(e){return E(K)<E(e)?1:-1}(t);return(d=d||a)&&(c<b+p*r/2||c>M-p*r/2)?c>b+p/2?1:-1:0}(e,a,o,i,W?1:c.swapThreshold,null==c.invertedSwapThreshold?c.swapThreshold:c.invertedSwapThreshold,ve,fe===a),0!==f){var N=E(K);do{N-=f,m=Q.children[N]}while(m&&("none"===y(m,"display")||m===Z))}if(0===f||m===a)return P(!1);fe=a,he=f;var B=a.nextElementSibling,C=!1,D=Ie(ee,r,K,t,a,o,e,C=1===f);if(!1!==D)return 1!==D&&-1!==D||(C=1===D),we=!0,setTimeout(je,30),Y(),C&&!B?r.appendChild(K):a.parentNode.insertBefore(K,C?B:a),L&&x(L,0,w-L.scrollTop),Q=K.parentNode,void 0===h||ve||(me=Math.abs(h-R(a)[v])),j(),P(!0)}if(r.contains(K))return P(!1)}return!1}function X(c,p){V(c,z,s({evt:e,isOwner:M,axis:i?"vertical":"horizontal",revert:n,dragRect:t,targetRect:o,canSort:d,fromSortable:l,target:a,completed:P,onMove:function(o,n){return Ie(ee,r,K,t,o,R(o),e,n)},changed:j},p))}function Y(){X("dragOverAnimationCapture"),z.captureAnimationState(),z!==l&&l.captureAnimationState()}function P(t){return X("dragOverCompleted",{insertion:t}),t&&(M?b._hideClone():b._showClone(z),z!==l&&(g(K,be?be.options.ghostClass:b.options.ghostClass,!1),g(K,c.ghostClass,!0)),be!==z&&z!==Pe.active?be=z:z===Pe.active&&be&&(be=null),l===z&&(z._ignoreWhileAnimating=a),z.animateAll(function(){X("dragOverAnimationComplete"),z._ignoreWhileAnimating=null}),z!==l&&(l.animateAll(),l._ignoreWhileAnimating=null)),(a===K&&!K.animated||a===r&&!a.animated)&&(fe=null),c.dragoverBubble||e.rootEl||a===document||(K.parentNode[H]._isOutsideThisEl(e.target),!t&&Xe(e)),!c.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),u=!0}function j(){ae=E(K),ce=E(K,c.draggable),J({sortable:z,name:"change",toEl:r,newIndex:ae,newDraggableIndex:ce,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){f(document,"mousemove",this._onTouchMove),f(document,"touchmove",this._onTouchMove),f(document,"pointermove",this._onTouchMove),f(document,"dragover",Xe),f(document,"mousemove",Xe),f(document,"touchmove",Xe)},_offUpEvents:function(){var e=this.el.ownerDocument;f(e,"mouseup",this._onDrop),f(e,"touchend",this._onDrop),f(e,"pointerup",this._onDrop),f(e,"pointercancel",this._onDrop),f(e,"touchcancel",this._onDrop),f(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;ae=E(K),ce=E(K,o.draggable),V("drop",this,{evt:e}),Q=K&&K.parentNode,ae=E(K),ce=E(K,o.draggable),Pe.eventCanceled||(_e=!1,ve=!1,ye=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),$e(this.cloneId),$e(this._dragStartId),this.nativeDraggable&&(f(document,"drop",this),f(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),l&&y(document.body,"user-select",""),y(K,"transform",""),e&&(Ae&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),Z&&Z.parentNode&&Z.parentNode.removeChild(Z),(ee===Q||be&&"clone"!==be.lastPutMode)&&ne&&ne.parentNode&&ne.parentNode.removeChild(ne),K&&(this.nativeDraggable&&f(K,"dragend",this),He(K),K.style["will-change"]="",Ae&&!_e&&g(K,be?be.options.ghostClass:this.options.ghostClass,!1),g(K,this.options.chosenClass,!1),J({sortable:this,name:"unchoose",toEl:Q,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==Q?(ae>=0&&(J({rootEl:Q,name:"add",toEl:Q,fromEl:ee,originalEvent:e}),J({sortable:this,name:"remove",toEl:Q,originalEvent:e}),J({rootEl:Q,name:"sort",toEl:Q,fromEl:ee,originalEvent:e}),J({sortable:this,name:"sort",toEl:Q,originalEvent:e})),be&&be.save()):ae!==re&&ae>=0&&(J({sortable:this,name:"update",toEl:Q,originalEvent:e}),J({sortable:this,name:"sort",toEl:Q,originalEvent:e})),Pe.active&&(null!=ae&&-1!==ae||(ae=re,ce=se),J({sortable:this,name:"end",toEl:Q,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){V("nulling",this),ee=K=Q=Z=te=ne=oe=ie=Me=de=Ae=ae=ce=re=se=fe=he=be=pe=Pe.dragged=Pe.ghost=Pe.clone=Pe.active=null;var e=this.el;Re.forEach(function(t){e.contains(t)&&(t.checked=!0)}),Re.length=le=ze=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":K&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,n=0,i=o.length,r=this.options;n<i;n++)q(e=o[n],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||Fe(e));return t},sort:function(e,t){var o={},n=this.el;this.toArray().forEach(function(e,t){var i=n.children[t];q(i,this.options.draggable,n,!1)&&(o[e]=i)},this),t&&this.captureAnimationState(),e.forEach(function(e){o[e]&&(n.removeChild(o[e]),n.appendChild(o[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return q(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(void 0===t)return o[e];var n=G.modifyOption(this,e,t);o[e]=void 0!==n?n:t,"group"===e&&Ce(o)},destroy:function(){V("destroy",this);var e=this.el;e[H]=null,f(e,"mousedown",this._onTapStart),f(e,"touchstart",this._onTapStart),f(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(f(e,"dragover",this),f(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ge.splice(ge.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ie){if(V("hideClone",this),Pe.eventCanceled)return;y(ne,"display","none"),this.options.removeCloneOnHide&&ne.parentNode&&ne.parentNode.removeChild(ne),ie=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ie){if(V("showClone",this),Pe.eventCanceled)return;K.parentNode!=ee||this.options.group.revertClone?te?ee.insertBefore(ne,te):ee.appendChild(ne):ee.insertBefore(ne,K),this.options.group.revertClone&&this.animate(K,ne),y(ne,"display",""),ie=!1}}else this._hideClone()}},ke&&A(document,"touchmove",function(e){(Pe.active||_e)&&e.cancelable&&e.preventDefault()}),Pe.utils={on:A,off:f,css:y,find:L,is:function(e,t){return!!q(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},throttle:D,closest:q,toggleClass:g,clone:X,index:E,nextTick:Ge,cancelNextTick:$e,detectDirection:Be,getChild:T,expando:H},Pe.get=function(e){return e[H]},Pe.mount=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Pe.utils=s(s({},Pe.utils),e.utils)),G.mount(e)})},Pe.create=function(e,t){return new Pe(e,t)},Pe.version="1.15.7";var Ue,Ve,Je,Ke,Qe,Ze,et=[],tt=!1;function ot(){et.forEach(function(e){clearInterval(e.pid)}),et=[]}function nt(){clearInterval(Ze)}var it=D(function(e,t,o,n){if(t.scroll){var i,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,c=t.scrollSpeed,p=w(),b=!1;Ve!==o&&(Ve=o,ot(),Ue=t.scroll,i=t.scrollFn,!0===Ue&&(Ue=B(o,!0)));var M=0,d=Ue;do{var l=d,z=R(l),u=z.top,O=z.bottom,A=z.left,f=z.right,h=z.width,m=z.height,q=void 0,_=void 0,W=l.scrollWidth,g=l.scrollHeight,v=y(l),L=l.scrollLeft,k=l.scrollTop;l===p?(q=h<W&&("auto"===v.overflowX||"scroll"===v.overflowX||"visible"===v.overflowX),_=m<g&&("auto"===v.overflowY||"scroll"===v.overflowY||"visible"===v.overflowY)):(q=h<W&&("auto"===v.overflowX||"scroll"===v.overflowX),_=m<g&&("auto"===v.overflowY||"scroll"===v.overflowY));var T=q&&(Math.abs(f-r)<=s&&L+h<W)-(Math.abs(A-r)<=s&&!!L),S=_&&(Math.abs(O-a)<=s&&k+m<g)-(Math.abs(u-a)<=s&&!!k);if(!et[M])for(var E=0;E<=M;E++)et[E]||(et[E]={});et[M].vx==T&&et[M].vy==S&&et[M].el===l||(et[M].el=l,et[M].vx=T,et[M].vy=S,clearInterval(et[M].pid),0==T&&0==S||(b=!0,et[M].pid=setInterval(function(){n&&0===this.layer&&Pe.active._onTouchMove(Qe);var t=et[this.layer].vy?et[this.layer].vy*c:0,o=et[this.layer].vx?et[this.layer].vx*c:0;"function"==typeof i&&"continue"!==i.call(Pe.dragged.parentNode[H],o,t,e,Qe,et[this.layer].el)||x(et[this.layer].el,o,t)}.bind({layer:M}),24))),M++}while(t.bubbleScroll&&d!==p&&(d=B(d,!1)));tt=b}},30),rt=function(e){var t=e.originalEvent,o=e.putSortable,n=e.dragEl,i=e.activeSortable,r=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var c=o||i;a();var p=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,b=document.elementFromPoint(p.clientX,p.clientY);s(),c&&!c.el.contains(b)&&(r("spill"),this.onSpill({dragEl:n,putSortable:o}))}};function at(){}function st(){}at.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var n=T(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(t,n):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:rt},r(at,{pluginName:"revertOnSpill"}),st.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:rt},r(st,{pluginName:"removeOnSpill"});var ct,pt,bt,Mt,dt,lt=[],zt=[],ut=!1,Ot=!1,At=!1;function ft(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?A(document,"pointerup",this._deselectMultiDrag):(A(document,"mouseup",this._deselectMultiDrag),A(document,"touchend",this._deselectMultiDrag))),A(document,"keydown",this._checkKeyDown),A(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,o){var n="";lt.length&&pt===e?lt.forEach(function(e,t){n+=(t?", ":"")+e.textContent}):n=o.textContent,t.setData("Text",n)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;bt=t},delayEnded:function(){this.isMultiDrag=~lt.indexOf(bt)},setupClone:function(e){var t=e.sortable,o=e.cancel;if(this.isMultiDrag){for(var n=0;n<lt.length;n++)zt.push(X(lt[n])),zt[n].sortableIndex=lt[n].sortableIndex,zt[n].draggable=!1,zt[n].style["will-change"]="",g(zt[n],this.options.selectedClass,!1),lt[n]===bt&&g(zt[n],this.options.chosenClass,!1);t._hideClone(),o()}},clone:function(e){var t=e.sortable,o=e.rootEl,n=e.dispatchSortableEvent,i=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||lt.length&&pt===t&&(ht(!0,o),n("clone"),i()))},showClone:function(e){var t=e.cloneNowShown,o=e.rootEl,n=e.cancel;this.isMultiDrag&&(ht(!1,o),zt.forEach(function(e){y(e,"display","")}),t(),dt=!1,n())},hideClone:function(e){var t=this,o=(e.sortable,e.cloneNowHidden),n=e.cancel;this.isMultiDrag&&(zt.forEach(function(e){y(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)}),o(),dt=!0,n())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&pt&&pt.multiDrag._deselectMultiDrag(),lt.forEach(function(e){e.sortableIndex=E(e)}),lt=lt.sort(function(e,t){return e.sortableIndex-t.sortableIndex}),At=!0},dragStarted:function(e){var t=this,o=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(o.captureAnimationState(),this.options.animation)){lt.forEach(function(e){e!==bt&&y(e,"position","absolute")});var n=R(bt,!1,!0,!0);lt.forEach(function(e){e!==bt&&Y(e,n)}),Ot=!0,ut=!0}o.animateAll(function(){Ot=!1,ut=!1,t.options.animation&&lt.forEach(function(e){P(e)}),t.options.sort&&mt()})}},dragOver:function(e){var t=e.target,o=e.completed,n=e.cancel;Ot&&~lt.indexOf(t)&&(o(!1),n())},revert:function(e){var t=e.fromSortable,o=e.rootEl,n=e.sortable,i=e.dragRect;lt.length>1&&(lt.forEach(function(e){n.addAnimationState({target:e,rect:Ot?R(e):i}),P(e),e.fromRect=i,t.removeAnimationState(e)}),Ot=!1,function(e,t){lt.forEach(function(o,n){var i=t.children[o.sortableIndex+(e?Number(n):0)];i?t.insertBefore(o,i):t.appendChild(o)})}(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(e){var t=e.sortable,o=e.isOwner,n=e.insertion,i=e.activeSortable,r=e.parentEl,a=e.putSortable,s=this.options;if(n){if(o&&i._hideClone(),ut=!1,s.animation&&lt.length>1&&(Ot||!o&&!i.options.sort&&!a)){var c=R(bt,!1,!0,!0);lt.forEach(function(e){e!==bt&&(Y(e,c),r.appendChild(e))}),Ot=!0}if(!o)if(Ot||mt(),lt.length>1){var p=dt;i._showClone(t),i.options.animation&&!dt&&p&&zt.forEach(function(e){i.addAnimationState({target:e,rect:Mt}),e.fromRect=Mt,e.thisAnimationDuration=null})}else i._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,o=e.isOwner,n=e.activeSortable;if(lt.forEach(function(e){e.thisAnimationDuration=null}),n.options.animation&&!o&&n.multiDrag.isMultiDrag){Mt=r({},t);var i=v(bt,!0);Mt.top-=i.f,Mt.left-=i.e}},dragOverAnimationComplete:function(){Ot&&(Ot=!1,mt())},drop:function(e){var t=e.originalEvent,o=e.rootEl,n=e.parentEl,i=e.sortable,r=e.dispatchSortableEvent,a=e.oldIndex,s=e.putSortable,c=s||this.sortable;if(t){var p=this.options,b=n.children;if(!At)if(p.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),g(bt,p.selectedClass,!~lt.indexOf(bt)),~lt.indexOf(bt))lt.splice(lt.indexOf(bt),1),ct=null,$({sortable:i,rootEl:o,name:"deselect",targetEl:bt,originalEvent:t});else{if(lt.push(bt),$({sortable:i,rootEl:o,name:"select",targetEl:bt,originalEvent:t}),t.shiftKey&&ct&&i.el.contains(ct)){var M=E(ct),d=E(bt);~M&&~d&&M!==d&&function(){var e,r;d>M?(r=M,e=d):(r=d,e=M+1);for(var a=p.filter;r<e;r++)~lt.indexOf(b[r])||q(b[r],p.draggable,n,!1)&&(a&&("function"==typeof a?a.call(i,t,b[r],i):a.split(",").some(function(e){return q(b[r],e.trim(),n,!1)}))||(g(b[r],p.selectedClass,!0),lt.push(b[r]),$({sortable:i,rootEl:o,name:"select",targetEl:b[r],originalEvent:t})))}()}else ct=bt;pt=c}if(At&&this.isMultiDrag){if(Ot=!1,(n[H].options.sort||n!==o)&&lt.length>1){var l=R(bt),z=E(bt,":not(."+this.options.selectedClass+")");if(!ut&&p.animation&&(bt.thisAnimationDuration=null),c.captureAnimationState(),!ut&&(p.animation&&(bt.fromRect=l,lt.forEach(function(e){if(e.thisAnimationDuration=null,e!==bt){var t=Ot?R(e):l;e.fromRect=t,c.addAnimationState({target:e,rect:t})}})),mt(),lt.forEach(function(e){b[z]?n.insertBefore(e,b[z]):n.appendChild(e),z++}),a===E(bt))){var u=!1;lt.forEach(function(e){e.sortableIndex===E(e)||(u=!0)}),u&&(r("update"),r("sort"))}lt.forEach(function(e){P(e)}),c.animateAll()}pt=c}(o===n||s&&"clone"!==s.lastPutMode)&&zt.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})}},nullingGlobal:function(){this.isMultiDrag=At=!1,zt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),f(document,"pointerup",this._deselectMultiDrag),f(document,"mouseup",this._deselectMultiDrag),f(document,"touchend",this._deselectMultiDrag),f(document,"keydown",this._checkKeyDown),f(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==At&&At||pt!==this.sortable||e&&q(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;lt.length;){var t=lt[0];g(t,this.options.selectedClass,!1),lt.shift(),$({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},r(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[H];t&&t.options.multiDrag&&!~lt.indexOf(e)&&(pt&&pt!==t&&(pt.multiDrag._deselectMultiDrag(),pt=t),g(e,t.options.selectedClass,!0),lt.push(e))},deselect:function(e){var t=e.parentNode[H],o=lt.indexOf(e);t&&t.options.multiDrag&&~o&&(g(e,t.options.selectedClass,!1),lt.splice(o,1))}},eventProperties:function(){var e,t=this,o=[],i=[];return lt.forEach(function(e){var n;o.push({multiDragElement:e,index:e.sortableIndex}),n=Ot&&e!==bt?-1:Ot?E(e,":not(."+t.options.selectedClass+")"):E(e),i.push({multiDragElement:e,index:n})}),{items:(e=lt,function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(zt),oldIndicies:o,newIndicies:i}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function ht(e,t){zt.forEach(function(o,n){var i=t.children[o.sortableIndex+(e?Number(n):0)];i?t.insertBefore(o,i):t.appendChild(o)})}function mt(){lt.forEach(function(e){e!==bt&&e.parentNode&&e.parentNode.removeChild(e)})}Pe.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?A(document,"dragover",this._handleAutoScroll):this.options.supportPointer?A(document,"pointermove",this._handleFallbackAutoScroll):t.touches?A(document,"touchmove",this._handleFallbackAutoScroll):A(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?f(document,"dragover",this._handleAutoScroll):(f(document,"pointermove",this._handleFallbackAutoScroll),f(document,"touchmove",this._handleFallbackAutoScroll),f(document,"mousemove",this._handleFallbackAutoScroll)),nt(),ot(),clearTimeout(_),_=void 0},nulling:function(){Qe=Ve=Ue=tt=Ze=Je=Ke=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var o=this,n=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(n,i);if(Qe=e,t||this.options.forceAutoScrollFallback||M||b||l){it(e,this.options,r,t);var a=B(r,!0);!tt||Ze&&n===Je&&i===Ke||(Ze&&nt(),Ze=setInterval(function(){var r=B(document.elementFromPoint(n,i),!0);r!==a&&(a=r,ot()),it(e,o.options,r,t)},10),Je=n,Ke=i)}else{if(!this.options.bubbleScroll||B(r,!0)===w())return void ot();it(e,this.options,B(r,!1),!1)}}},r(e,{pluginName:"scroll",initializeByDefault:!0})}),Pe.mount(st,at);const qt=Pe;var _t=o(5292),Wt=o(32246),gt=o(88903),yt=o(36711),vt=o(30473),Lt=o(25734),wt=o(38156),Rt=o(1439);const kt=()=>qt.mount(new ft),Tt=e=>{if(!e)return[];if(e.closest(".SearchFields-container"))return[e.closest(".SearchFields-container")?.querySelector(".SearchFields-hide > ul"),e.closest(".SearchFields-container")?.querySelector(".SearchFields-displayTitle > ul")];const t=e.getAttribute("data-sortable-item-type");return t?[...document.querySelectorAll(`[data-sortable-valid-item-types~="${t}"][data-read-only="false"]`)]:[...document.querySelectorAll(".Sortable:not([data-sortable-valid-item-types])")]},St=(e,t,o)=>{const n=e.dataset.sortableInputName,i=t.closest(".Sortable").dataset.sortableInputName;n!==i&&o.forEach(e=>{e.querySelectorAll(`[name^="${n}"]`).forEach(e=>{e.setAttribute("name",e.getAttribute("name").replace(n,i))})})},Et=e=>{const t=e.closest(".inputContainer");t&&(t.dataset.interacted="true"),e.closest("form")?.dispatchEvent(new Event("change",{bubbles:!0}))},Nt=[];let Bt=!1,Ct=null,Dt=null;function xt(e,t,o){const n=o.children[e],i=o.children[t];e>t?o.insertBefore(n,i):o.insertBefore(n,i.nextElementSibling),(0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[e+1,t+1])}(0,Wt.A)(["ol[data-sortable-input-name]",".plugin-repeatable > ol",".widget-urls",'[data-rte-container="true"]','.CIG-row[data-type="record"][data-sortable-valid-item-types]',"ul[data-sortable-input-name]"],e=>{const t=e.closest(".is-readOnly");if("true"===e.dataset.readOnly||t)return;const o="record"===e.dataset.type;if("true"===e.dataset.rteContainer||o){const t=e.querySelector(":scope .drawerDropOverlay");Nt.push(t)}const n=e.classList.contains("RCIG-list");let i=!1;e.parentElement&&(i=e.parentElement.classList.contains("is-previewable"));const r=e.closest("dialog"),a=new qt(e,{animation:o?null:160,handle:n&&!i?".RCIG-title, .MultiSortable-buttonToggle, .ContentEditDrawer-widget-carousel-list > li, .SearchFields-drag":null,sort:!0,delay:300,delayOnTouchOnly:!0,touchStartThreshold:4,dragClass:"Sortable-drag",selectedClass:"Sortable-selected",chosenClass:"Sortable-chosen",ghostClass:"Sortable-ghost",forceFallback:!0,fallbackTolerance:3,fallbackOnBody:!r,swapThreshold:.65,filter:"input:not(.ContentEditDrawer-widget-carousel-list-item-selectButton), textarea, .ProseMirrorContainer, .CIG-row, .EIG",preventOnFilter:!1,scroll:!0,scrollSpeed:20,dropBubble:!1,multiDrag:!0,group:{put:function(e,t,o){if(Nt.length>0)for(const e in Nt){const t=Nt[e];if(t){const e=t.dataset?.sortableValidItemTypes?.split(" "),n=o.dataset?.sortableLoadTypes?.split(" "),i=n?.find(t=>e.includes(t));i&&(t.style.display="inline")}}let n=!1;if(e.el.dataset.sortableValidItemTypes){if(n=e.el.dataset.sortableValidItemTypes.includes(o.dataset.sortableItemType),!n&&o.dataset.sortableLoadTypes){const t=e.el.dataset.sortableValidItemTypes.split(" ");n=o.dataset.sortableLoadTypes.split(" ").some(e=>t.includes(e))}return n}return n},pull:function(e,t,o){let n=!1;const i=t.el.classList.contains("is-clonable");if(e.el.dataset.sortableValidItemTypes){if(n=e.el.dataset.sortableValidItemTypes.includes(o.dataset.sortableItemType),!n&&o.dataset.sortableLoadTypes){const t=e.el.dataset.sortableValidItemTypes.split(" ");n=o.dataset.sortableLoadTypes.split(" ").some(e=>t.includes(e))}return n&&i?"clone":n}return n}},onSelect:e=>{const t=e.item,o=e.items;if(t.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list"))for(const e in o){const t=o[e];t.parentElement&&!t.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list")&&qt.utils.deselect(t)}else for(const e in o){const t=o[e];t.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list")&&((0,wt.k)(t),qt.utils.deselect(t))}t.classList.contains("is-moving")||qt.utils.deselect(t)},onDeselect:e=>{const t=e.item,o=t.querySelector(".ContentEditDrawer-widget-carousel-list-item-selectButton");t.classList.contains("is-moving")&&(o&&(o.checked=!1),t.classList.remove("is-moving"))},onStart:e=>{const t=e.item,o=+(e.items.length>0?e.items:[e.item]).length,n=Tt(t),i=document.querySelector(".ContentEdit-previewDisplay");if(document.body.style.userSelect="none",i&&(i.style.pointerEvents="none"),o&&(qt.ghost.style.setProperty("--drag-count",o),qt.ghost.style.zIndex=(0,vt.default)()+1,qt.ghost.setAttribute("item-suffix",""),o>1&&qt.ghost.setAttribute("item-suffix","s")),1===n.length){var r=n[0];t.closest(`.${r.className}`)||r.classList.add("Sortable-allowedContainer")}if(n.length>1&&n.forEach(e=>e.classList.add("Sortable-allowedContainer")),window.BRIGHTSPOT?.ui.cms.enableV5UI){const e=parseInt(qt.ghost.style.left);qt.ghost.style.left=.95*e+"px"}yt.A.pause(),Wt.A.pause()},onSort:e=>{const t=e.from,o=e.to,n=e.items.length>0?e.items:[e.item];if(!Bt){if("record"===o.dataset.type){const e=Rt(o).find(":input.objectId").first(),t=Rt(n);return e.attr("data-label",t.data("label-html")),e.attr("data-label-html",t.data("label-html")),e.attr("data-preview",t.find("img").attr("src")||t.find(".ItemPreview-url").attr("data-src")||""),e.attr("data-visibility",t.find("span.Label").text()),e.attr("data-read-only",!!t.attr("data-read-only")&&t.attr("data-read-only")),e.val(t.data("id")),void e.change()}n.sort(function(e,t){return e.dataset.index-t.dataset.index});for(const i in n){const r=n[i];if("true"===o?.dataset?.rteContainer)return;if(o.dataset.sortableValidItemTypes&&t.dataset.sortableEndpoint&&!r.classList.contains("is-pending")){const e=o.dataset.sortableValidItemTypes.split(" "),n=r.dataset.sortableLoadTypes?.split(" "),i=r.dataset?.id,a=n?.find(t=>e.includes(t)),s=o.parentElement.classList.contains("is-previewable"),c=o.dataset.previewable,p=o.dataset.sortableValidItemTypes;if(!a){r.remove();continue}Bt=!0,qt.utils.deselect(r),Xt(t.dataset.sortableEndpoint,i,a,o.dataset.sortableInputName,s,c,p).then(e=>{r.innerHTML=e;const t=o.closest(".plugin-repeatable");r.classList.remove("Sortable-selected"),r.classList.remove("is-moving"),Bt=!1,o.classList.contains("RCIG-list")?(r.classList.remove("RCS-item"),Rt(t).data("repeatable").itemLoad(r).then(()=>{Rt(t).data("repeatable").initItem(r),s&&!o.parentElement.classList.contains("is-gridView")&&(r.classList.remove("is-gridItem"),r.classList.add("is-listItem")),Et(o)})):(r.classList.remove("RCIG-item"),Rt(r).trigger("create"),Rt(t).data("repeatable").initItemRemove(r),Et(o))})}else{let n=e.items.length?e.items:[r];n.forEach(e=>{e.addEventListener("animationend",()=>{e.classList.remove("is-added")}),e.classList.add("is-added")}),St(t,o,n),t.querySelectorAll("input, select, textarea").forEach(e=>{e.dispatchEvent(new Event("change"))}),Et(o)}}}},onEnd:e=>{const t=e.item,o=e.items.length>0?e.items:[t],n=document.querySelector(".ContentEdit-previewDisplay");if(document.body.style.userSelect="unset",n&&(n.style.pointerEvents="initial"),Tt(t).forEach(e=>e.classList.remove("Sortable-allowedContainer")),Nt.length>0)for(const e in Nt){const t=Nt[e];t&&(t.style.display="none")}if("true"===e.to?.dataset?.rteContainer){for(const e in o)qt.utils.deselect(o[e]);const n=new CustomEvent("interchange",{detail:e});e.to.querySelector(".richtext").rte.view.dispatchEvent(n),t.remove()}if("record"===e.to?.dataset?.type)for(const e in o)qt.utils.deselect(o[e]),o[e].remove();yt.A.resume(),Wt.A.resume()},onUpdate:e=>{const t=e.item;t.addEventListener("animationend",()=>{t.classList.remove("is-added")}),t.classList.add("is-added")}});if(a.multiDrag)for(const e of["pointerup","mouseup","touchend"])document.removeEventListener(e,a.multiDrag._deselectMultiDrag,{capture:!1,passive:!1});if(e.classList.add("Sortable"),"OL"===e.tagName||"UL"===e.tagName){const t=e.closest(".CIG-row")?.querySelector("label")?.textContent;e.querySelectorAll(":scope > li > input[type=text]").forEach(e=>{if(e.dataset?.label){const t=e.closest("li");t?.setAttribute("aria-label",e.dataset?.label)}}),(0,Wt.A)(e,":scope > li",e=>{e.addEventListener("focus",e=>{if(!e.relatedTarget)return;const o=t?(0,Lt.wC)(window.BRIGHTSPOT.ui.sortable.namedList,[t]):window.BRIGHTSPOT.ui.sortable.genericList;(0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.listGainedFocus,[o])}),e.addEventListener("blur",e=>{e.relatedTarget&&(Ct&&(yt.A.resume(),Wt.A.resume()),Ct=null)}),e.dataset?.label&&!e.hasAttribute("aria-label")&&e.setAttribute("aria-label",e.dataset?.label)}),e.hasAttribute("aria-label")||e.setAttribute("aria-label",t||"")}const s=e.classList.contains("RTI-list");(0,Wt.A)(e,":scope > *:not(script)",e=>{e.classList.add("Sortable-item"),(e.matches(".RCS-item:not(.is-disabled), .RCIG-item:not(.is-disabled), .widget-urlsItem")||s)&&e.setAttribute("tabindex",0),s&&e.insertAdjacentElement("afterbegin",(0,_t.A)("div",{class:"RTI-handle"}))})});const Xt=async(e,t,o,n,i,r,a)=>{const s=new URLSearchParams;s.set("id",t),s.set("targetTypeId",o),s.set("inputName",n),s.set("isPreviewableContainer",i),s.set("previewable",r),s.set("validTypes",a);const c=await fetch(`${CONTEXT_PATH}${e}`,{method:"POST",credentials:"include",body:s,headers:{"Brightspot-CSRF":gt.A.get("bsp.csrf")}});return await c.text()};(0,Wt.A)([".Sortable-item.RCIG-item .RCIG-remove",".Sortable-item.RCS-item .RCS-remove"],e=>{if(e.closest('.CIG-row[data-type="set/record"]'))return;const t=e.closest("[data-sortable-item-type], .Sortable-item");t.classList.add("MultiSortable"),t.addEventListener("mouseup",e=>{e.target!==i||t.classList.contains("is-moving")?t.classList.remove("is-moving"):(t.classList.add("is-moving"),t.classList.contains("is-collapsed")||!t.classList.contains("RCIG-item")||t.classList.contains("is-gridItem")||t.classList.add("collapsed","is-collapsed"))});let o="";const n=e.closest(".CIG-row");n&&(o=n.querySelector(".CIG-label label").textContent);const i=(0,_t.A)("button",{type:"button",class:"MultiSortable-buttonToggle",title:`${window.BRIGHTSPOT?.ui.tooltips.multiSort} ${o}`,"aria-label":`${window.BRIGHTSPOT?.ui.tooltips.multiSort} ${o}`});e.classList.contains("EIG-remove")||e.insertAdjacentElement("beforeBegin",i)}),window.addEventListener("keydown",e=>{if("Escape"===e.code&&document.querySelectorAll(".Sortable-selected").forEach(e=>{qt.utils.deselect(e),(0,wt.k)(e),e.classList.remove("is-moving")}),!e.target.classList.contains("Sortable-item")&&!e.target.classList.contains("MultiSortable-buttonToggle"))return;const t=e.target.classList.contains("MultiSortable-buttonToggle")?e.target.closest(".Sortable-item"):e.target;if("Tab"===e.code&&Ct){const o=function(e){const t=e.dataset.sortableItemType;return Array.from(document.querySelectorAll(`ol.Sortable[data-sortable-valid-item-types*="${t}"],\n ul.Sortable[data-sortable-valid-item-types*="${t}"]`)).filter(e=>null!==e.offsetParent)}(t);if(o.length){const n=t.closest("ul.Sortable, ol.Sortable");let i=null,r=null;o.forEach((e,t)=>{n.isEqualNode(e)&&(r=t)}),r+1>o.length-1?i=0:r+1<=o.length-1&&(i=r+1);const a=o[i],s=a.children[0];a.isEqualNode(n)&&1===o.length||(s?((0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[r,i]),a.insertBefore(t,s)):((0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[r,1]),a.appendChild(t))),t.focus(),e.preventDefault()}else yt.A.resume(),Wt.A.resume(),Ct=null}if("Escape"===e.code){if(Ct){const e=Ct.prevDropZone.children;e.length&&Ct.prevIdx<e.length-1?Ct.prevDropZone.insertBefore(t,e[Ct.prevIdx]):Ct.prevDropZone.appendChild(t),yt.A.resume(),Wt.A.resume(),(0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemDragCancelled),t.focus()}Ct=null}if("Space"===e.code||"Enter"===e.code){if(Ct){const e=t.closest("ul.Sortable, ol.Sortable");e.querySelectorAll("input, select, textarea").forEach(e=>{e.dispatchEvent(new Event("change"))}),Et(e),0===Ct.prevDropZone?.childElementCount&&Ct.prevDropZone?.removeAttribute("tabindex"),e.dispatchEvent(new CustomEvent("add",{detail:{item:t,from:Ct.prevDropZone,to:e}})),yt.A.resume(),Wt.A.resume(),Ct=null,(0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemDropped)}else Ct={prevIdx:Array.prototype.indexOf.call(t.parentNode.children,t),prevDropZone:t.closest("ul.Sortable, ol.Sortable")},yt.A.pause(),Wt.A.pause(),(0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemDragStarted);if(e.preventDefault(),!Ct)return}"ArrowUp"!==e.code&&"ArrowLeft"!==e.code||(Dt=Array.prototype.indexOf.call(t.parentNode.children,t),Ct&&Dt>0&&(xt(Dt,Dt-1,t.closest("ul.Sortable, ol.Sortable")),t.focus())),"ArrowDown"!==e.code&&"ArrowRight"!==e.code||(Dt=Array.prototype.indexOf.call(t.parentNode.children,t),Ct&&Dt<t.parentNode.children.length-1&&(xt(Dt,Dt+1,t.closest("ul.Sortable, ol.Sortable")),t.focus()))}),window.addEventListener("click",()=>{Ct&&(yt.A.resume(),Wt.A.resume()),Ct=null})},93563(e,t,o){"use strict";o(84978),o(25809);var n=o(32246),i=o(88903);(0,n.A)(".StyleEmbeddedContent-items > li",e=>{e.addEventListener("click",async e=>{let t=e.target;const o=t.parentElement.classList.contains("Card");if("LI"===t.parentElement.nodeName||o){o&&(t=t.parentElement);const e=t.dataset.addEmbeddedContentData;if(!e)return;const n=JSON.parse(e),r=n.typeId;if(!r)return;const a=t.closest(".Popup").querySelector(".AddEmbeddedContent-params");if(!a)return;const s=a.dataset.fieldName;if(!s)return;let c="/cms/update-recently-used?fieldName="+s+"&templateTypeId="+r;const p=n.value;p&&(c+="&templateStyle="+p);const b=new Headers;b.append("Brightspot-CSRF",i.A.get("bsp.csrf"));try{await fetch(c,{method:"POST",headers:b})}catch(e){console.error(e)}}})}),(0,n.A)(".StyleEmbeddedContent-search input",e=>{e.addEventListener("input",t=>{const o=e.closest(".StyleEmbeddedContent-nav"),n=o?.nextSibling,i=new RegExp(t.target.value.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");n?.querySelectorAll("a").forEach(e=>{const t=e.parentElement,o=t?.parentElement,n=o?.previousSibling;i.test(e.innerText)?(t.style.display="",o.style.display=o.classList.contains("LinkTable")?"block":"flex",n.style.display="block"):(t.style.display="none",o.querySelector('li:not([style*="display: none"])')||(o.style.display="none",n.style.display="none"))}),o?.querySelectorAll("li").forEach(e=>{e.style.display=e.classList.contains("is-selected")||""===t.target.value?"list-item":"none",e.style.borderColor="var(--color-gray3)"});const r=o?.querySelector('li:not([style*="display: none"])');r.style.borderColor="transparent";const a=n?.querySelector(".StyleEmbeddedContent-warning");a.style.display=n?.querySelector('li:not([style*="display: none"])')?"none":"flex"})})},45080(e,t,o){"use strict";o(50144),o(84978),o(25809);var n=o(32246),i=o(88903),r=o(36500),a=o(1439);const s="> .CIG-large > .CIG > .CIG-row, > .CIG-large > .CIG > .TemplateField",c="> .CIG-large > .CIG > btu-cig-cluster > .TemplateField";(0,n.A)(".CIG-row.StyleguidePreset-row",e=>{let t,o,n,i,r;const a=e.closest(".CIG-row.StyleguideTemplate-row"),b=e.getAttribute("data-original-template"),d=t=>Array.from(e.querySelectorAll(`.TC > .TemplateField[data-template='${t}'] > .CIG-row, .TC > btu-cig-cluster > .TemplateField[data-template='${t}'] > .CIG-row`));if(a){o=a.querySelector(".CIG-small > select");let e=o.value;o.addEventListener("change",()=>{e!==o.value&&(e=o.value,n=e||b,i=d(n),r=l.concat(i),z&&(z.querySelector("option[data-show]").setAttribute("data-show",`${s}[data-template="${n}"], ${c}[data-template="${n}"]`),z.querySelectorAll("option[data-preset]").forEach(e=>e.remove()),(async()=>{const e=await fetch(CONTEXT_PATH+"styleguide/preset?themeId=currentTheme&templateId="+n,{method:"GET",headers:new Headers});try{const t=await e.json(),o=t.success&&t.data;o?.forEach(e=>{const t=document.createElement("option");t.setAttribute("data-hide",`${s}, ${c}`),t.setAttribute("data-preset",e.presetId),t.setAttribute("value",e.presetId),t.textContent=e.label,z.appendChild(t)})}catch(e){console.log(e)}})()),t?p(z,"none"):z.dispatchEvent(new Event("change",{bubbles:!0})))})}n=o?.value||b;const l=Array.from(e.querySelectorAll(".TC > .CIG-row"));i=d(n),r=l.concat(i);const z=e.querySelector(".CIG-small > select");t=z.value,z.setAttribute("data-previous-value",t);const u=e.querySelector(".CIG-large");z.addEventListener("change",e=>{t=z.value;const o=z.getAttribute("data-previous-value");t!==o&&(z.setAttribute("data-previous-value",t),t?u.style.display="none":(u.style.display="",M(n,o,r)))})});const p=(e,t)=>{if(e.nextElementSibling?.matches(".ComboInput")){const o=e.nextElementSibling.getAttribute("aria-owns"),n=document.querySelector(`#${o}`).querySelector(`.ComboInput-option[data-value="${t}"]`);n&&n.click()}else e.value=t},b=(e,t)=>{const o=e.querySelector("textarea"),n=e.querySelector('input[type="checkbox"]'),i=e.querySelector("input.color"),r=e.querySelector("select");if(o)o.value=t||"";else if(n)n.checked=t||!1;else if(i){a(i).spectrum("set",t||"");const e=i.parentElement.querySelector(".sp-preview");e&&t?e.setAttribute("data-color",t):e?e.removeAttribute("data-color"):i.value=t||""}else r&&p(r,t||"")},M=async(e,t,o)=>{const n=e=>{o?.forEach(t=>{const o=t.getAttribute("data-field-name"),n=o?.slice(o.lastIndexOf(".")+1),i=e&&n&&e[n];b(t,i)})};if(t&&"none"!==t){const o=CONTEXT_PATH+"styleguide/preset?themeId=currentTheme&templateId="+e+"&presetId="+t,i=new Headers,r=await fetch(o,{method:"GET",headers:i});try{const e=await r.json(),t=e.success&&e.data[0].values;t&&n(t)}catch(e){console.log(e)}}else n()},d=async(e,t,o)=>{let n,i;if(!o){const e=document.querySelector(".ThemeBundleEditor-top"),t=e?.closest(".ThemeBundle.TC"),o=t?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"] select[name$="_preset"]');i=o?.querySelector(`option[value="${o.value}"]`)?.textContent,n=(e=>{const t=e?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"]'),o=t?.querySelectorAll(":scope > .CIG-large > .CIG .CIG-row"),n=[],i=[];return o.forEach(e=>{const t=e.getAttribute("data-field-name"),o=t.substring(t.lastIndexOf(".")+1),r=e.querySelector("textarea, input.color"),a=e.querySelector('input[type="checkbox"]'),s=e.querySelector('[data-type="text"] select');r?(n[o]=r.value||"",i[o]=r.placeholder||""):a?n[o]=a.checked:s&&(n[o]=s.value||"",i[o]=s.getAttribute("data-placeholder")||"")}),{overrideValues:n,themePlaceholders:i}})(t)}const r=CONTEXT_PATH+"styleguide/preset?themeId="+e+"&templateId="+(o||"themeFields"),a=new Headers,s=await fetch(r,{method:"GET",headers:a});try{const e=await s.json(),o=e.success&&JSON.stringify(e.data);document.querySelector("iframe.StyleguideFrame").contentWindow.postMessage({type:"BSP.Styleguide.ReturnThemePresets",presets:o,selectedPreset:t,themeOverrides:n?.overrideValues,themePlaceholders:n?.themePlaceholders,themePreset:i},"*")}catch(e){console.log(e)}};window.addEventListener("message",async({data:e})=>{if("object"!=typeof e||!e.type?.startsWith("BSP.Styleguide."))return;const t=document.querySelector(".ThemeBundle")?.getAttribute("data-id"),o=e.preset?.key?.startsWith("brightspot-styleguide-template-values-")&&e.preset.key.replace("brightspot-styleguide-template-values-",""),n=document.querySelector(".ThemeBundleEditor-top"),a=n?.closest(".ThemeBundle.TC"),M=a?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"]');if("BSP.Styleguide.RequestPresets"===e.type)d(t,e.label,e.templateName);else if("BSP.Styleguide.SetOverrides"===e.type||"BSP.Styleguide.RemovePreset"===e.type)(async(e,t,o,n)=>{const a=CONTEXT_PATH+"styleguide/preset?themeId="+e,p=new Headers;p.append("Brightspot-CSRF",i.A.get("bsp.csrf"));const b={};b.type=t.type,b.key=t.preset.key,b.values=t.preset.values,b.label=t.preset.label,b.presetId=t.preset.presetId||(0,r.A)();const M=await fetch(a,{method:"POST",headers:p,body:JSON.stringify(b)});try{(await M.json()).success&&d(e,t.preset.label,o)}catch(e){console.log(e)}if("brightspot-styleguide-theme-values"===t.preset.key){const e=n?.querySelector(":scope > .CIG-small select");if("BSP.Styleguide.RemovePreset"===t.type){const o=e?.querySelector(`option[value="${t.preset.presetId}"]`);o?.remove()}else if("BSP.Styleguide.SetOverrides"===t.type)if(t.preset.presetId){const o=e?.querySelector(`option[value="${t.preset.presetId}"]`);o.textContent=t.preset.label}else{const o=document.createElement("option");o.setAttribute("data-hide",`${s}, ${c}`),o.setAttribute("value",b.presetId),o.textContent=t.preset.label,e.appendChild(o)}}})(t,e,o,M);else if("BSP.Styleguide.SyncOverrideField"===e.type){const t=M?.querySelector(`:scope > .CIG-large > .CIG .CIG-row[data-field-name$=".${e.field}"]`);b(t,e.value),M.setAttribute("data-received-update","")}else if("BSP.Styleguide.SyncThemePresetField"===e.type){const t=M?.querySelector(":scope > .CIG-small select"),o="Custom"===e.preset?"":e.preset;t&&p(t,o)}})},73609(e,t,o){"use strict";o.d(t,{A:()=>b}),o(67219),o(44764),o(84978),o(13722),o(39589),o(25809);var n=o(1439),i=o.n(n),r=o(5292),a=o(26594),s=o(40627),c=o(95628),p=o(66556);class b{constructor(e){this._container=e,this._update=(0,a.A)(this._update.bind(this)),this._update(),window.addEventListener("brightspot-content-state-change",()=>{this._toggle()})}_forEachChild(e){for(const t of this._container.children){const o=t.dataset.tab;void 0!==o&&e(o,t)}}_toArray(e){if(e)try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{}return[]}_update(){this._observer&&(this._observer.disconnect(),this._observer=null);const e=(0,r.A)("div",{className:"TabBar",role:"tablist"}),t=(0,r.A)("button",{className:"TabBar-menuToggle",title:window.BRIGHTSPOT?.ui.tooltips.tabs,type:"button","aria-haspopup":"menu","aria-expanded":"false","aria-label":window.BRIGHTSPOT?.ui.tooltips.tabs}),o=(0,r.A)("div",{className:"TabBar-menuList",role:"menu","aria-label":window.BRIGHTSPOT?.ui.tooltips.tabs}),n=(0,r.A)("div",{className:"TabBar-menu"},t,o);t.onclick=()=>{(0,p.AM)(o,t,e)};const i="MENU"===this._container.dataset.tcMode,a=this._container.dataset.tcMain,b=this._toArray(this._container.dataset.tcExceptions),M=new Set;this._defaultTab=null;for(const e of this._container.children){const t=e.dataset.tab;void 0!==t&&(M.has(t)||(this._defaultTab||(this._defaultTab=t),M.add(t)))}const d=this._toArray(this._container.dataset.tcStart),l=this._toArray(this._container.dataset.tcEnd),z=[];for(const e of d)M.has(e)&&z.push(e);for(const e of M)d.includes(e)||l.includes(e)||z.push(e);for(const e of l)M.has(e)&&z.push(e);for(const t of z){const n=b.indexOf(t)>-1?i?e:o:i?o:e;n.insertBefore((0,r.A)("button",{className:"TabBar-item",dataset:{tab:t},role:"tab",onclick:e=>{e.preventDefault(),this.select(t,e)},onkeydown:e=>{var t=e.currentTarget,o=t.closest(".TabBar");switch(e.key){case"ArrowRight":return void(t.nextSibling?t.nextSibling.focus():o.firstChild.focus());case"ArrowLeft":return void(t.previousSibling?t.previousSibling.focus():o.lastChild.focus())}}},t),t===a?n.firstChild:null)}z.includes(a)&&(this._defaultTab=a),1===e.children.length&&o.insertBefore(e.children[0],o.firstChild);for(const e of o.children)e.className="TabBar-menuItem",e.setAttribute("role","menuitem");if((0,p.D1)(o,t),this._bar&&(this._bar.remove(),this._bar=null,this._menu=null,this._menuToggle=null,this._menuList=null),0===z.length||z.length<2&&!this._container.getAttribute("data-show-tabs")){this._container.dataset.tabless="true";const e=this._container.querySelectorAll(":scope > .TC-unselected");return void Array.from(e).forEach(e=>{e.classList.remove("TC-unselected")})}this._bar=e,this._container.insertBefore(e,this._container.firstChild),o.children.length>0&&(0===e.children.length&&(e.classList.add("is-menuOnly"),e.removeAttribute("role")),this._menu=n,this._menuToggle=t,this._menuList=o,this._bar.appendChild(n));const u=this._toggle();u.includes(this._defaultTab)||(this._defaultTab=u[0]),e.hidden=1===Array.from(o.children).filter(e=>!e.hidden).length;let O=!1;for(const e of(0,s.A)(this._container,".CIG-row > .Message.is-error")){let t,o=e;do{t=o,o=t.parentNode}while(o!==this._container);const n=(0,c.A)(this._bar,`[data-tab="${t.dataset.tab}"]`);n&&!n.classList.contains("is-error")&&(n.classList.add("is-error"),n.classList.contains("TabBar-menuItem")&&(O=!0))}O&&e.classList.add("is-menuError"),this.select()}_toggle(){const e=[];this._forEachChild((t,o)=>{o.hidden||o instanceof HTMLHeadingElement||e.push(t)});for(const t of[this._bar,this._menuList])if(t)for(const o of t.children)o!==this._menu&&(o.hidden=!e.includes(o.dataset.tab));return e}select(e,t){const o=e&&this._container.closest(".ContentEdit.is-new, .StandardForm.is-new");if(e||(e=this._defaultTab),this._bar&&!this._bar.classList.contains("is-menuOnly"))for(const t of this._bar.children){const o=t.dataset.tab===e;t.classList.toggle("is-selected",o),t.setAttribute("aria-selected",o),o?t.removeAttribute("tabindex"):t.setAttribute("tabindex","-1")}if(this._menuList){let t=!1;for(const o of this._menuList.children)o.classList.toggle("is-selected",o.dataset.tab===e)&&(t=e!==this._defaultTab);this._bar.classList.toggle("is-menuSelected",t),this._menuToggle.innerText=t?e:""}if(this._forEachChild((t,o)=>{o.classList.toggle("TC-unselected",t!==e)}),window.dispatchEvent(new Event("resize")),i()(this._container).find("> [data-tab]").trigger("tabbedShow"),i()(this._bar).trigger("tabbed-select"),o){const t=this._container.querySelector(`:scope > .CIG-row:not(.inputContainer-readOnly)[data-tab="${e}"] > .CIG-label > label`)?.htmlFor;t&&document.getElementById(t)?.focus()}else t&&t.target.scrollIntoView({block:"nearest"})}}},96538(){window.addEventListener("click",e=>{const t=e.target;if(t.classList.contains("Taxonomy-expand")){for(const e of t.closest("ul").querySelectorAll(".is-selected"))e.classList.remove("is-selected");t.closest("li").classList.add("is-selected")}},{capture:!0}),window.addEventListener("brightspot-frame-load",e=>{const t=e.target;t.classList.contains("Taxonomy-children")&&window.requestAnimationFrame(()=>{t.closest(".Taxonomy").scrollTo({left:3e4})})})},95835(e,t,o){"use strict";o(84978),o(25809);var n=o(5292),i=o(32246);const r="is-open";new class{constructor(){this._editorStage=null,this._editorToggle=null,this._themeBundle=null,this._presetSelect=null,this._selectedPreset=null,this._sg=null,this._zIndex=110,(0,i.A)(document,".ThemeBundle",e=>{this._themeBundle=e,this._initLabels(),this._createUI(this._themeBundle)}),(0,i.A)(document,'.Tab[data-tab="Styleguide"]',e=>{document.body.classList.add("has-theme-styleguide")}),window.addEventListener("message",async({data:e})=>{if("object"==typeof e)if("BSP.Styleguide.CloseStyleguideReady"===e.type){this._editorToggle.setAttribute("aria-expanded","false"),this._editorStage.classList.remove(r);const e=document.querySelector('.CIG-row[data-tab="Overrides"][data-field-name$="._preset"]'),t=e.querySelector(".CIG-large");if(this._selectedPreset!==this._presetSelect.value||e.hasAttribute("data-received-update")){const o=this._presetSelect.closest(".CIG").querySelector(":scope > .TabBar .ThemeBundle-tabOverrides");o&&o.click(),t.style=this._presetSelect.value?"display: none;":"",e.classList.add("state-changed"),e.removeAttribute("data-received-update"),this._presetSelect.value||t.querySelectorAll('input.color, input[type="checkbox"], textarea').forEach(e=>e.removeAttribute("disabled"))}}else"BSP.Styleguide.LoadingV2"===e.type&&this._sg.classList.add("is-v2")})}_initLabels(){this._labels={tab:window.THEME_BUNDLE_EDITOR_LABELS?window.THEME_BUNDLE_EDITOR_LABELS.tabName:"Main",open:window.THEME_BUNDLE_EDITOR_LABELS?window.THEME_BUNDLE_EDITOR_LABELS.openAction:"Open Styleguide",openNewTab:window.THEME_BUNDLE_EDITOR_LABELS?window.THEME_BUNDLE_EDITOR_LABELS.openNewTabAction:"Open in New Window/Tab",close:window.THEME_BUNDLE_EDITOR_LABELS?window.THEME_BUNDLE_EDITOR_LABELS.closeAction:"Back"}}_createUI(e){this._editorStage=(0,n.A)("DIV",{class:"ThemeBundleEditor-stage"}),this._editorStage.addEventListener("transitionend",e=>{e.target===this._editorStage&&(e.stopPropagation(),this._editorStage.classList.contains(r)?this._showStyleguide():this._hideStyleguide())}),this._editorToggle=(0,n.A)("BUTTON",{className:"ThemeBundleEditor-toggle",name:"action-edit",value:this._labels.open,"aria-expanded":"false",onclick:e=>{e.preventDefault(),this._openEditor()}},this._labels.open);const t=(0,n.A)("DIV",{className:"ThemeBundleEditor-stage-main"}),o=(0,n.A)("DIV",{className:"ThemeBundleEditor-stage-top"},(0,n.A)("a",{className:"Popup-heading ThemeBundleEditor-close",onclick:e=>{this._closeEditor()}},this._labels.close));if(this._editorStage.appendChild(o),this._editorStage.appendChild(t),e.appendChild(this._editorStage),e.querySelector('.CIG-row[data-field-name$="._preset"]')){const t=e.querySelector(".CIG-row");t&&e.insertBefore((0,n.A)("DIV",{className:"ThemeBundleEditor-top","data-tab":this._labels.tab},this._editorToggle),t)}}_closeEditor(){this._sg.matches(".is-v2")?this._sg?.contentWindow.postMessage({type:"BSP.Styleguide.CloseStyleguide"},"*"):(this._editorToggle.setAttribute("aria-expanded","false"),this._editorStage.classList.remove(r))}_openEditor(){this._editorStage.style.zIndex=this._zIndex,this._editorToggle.setAttribute("aria-expanded","true"),this._editorStage.classList.add(r)}_showStyleguide(){this._sg?(this._sg.style.visibility="visible",this._sg?.contentWindow.postMessage({type:"BSP.Styleguide.ReopenStyleguide"},"*")):((0,i.A)(".ThemeBundle-edit",async e=>{const t=await fetch(e.href),o=await t.text(),i=document.createElement("template");i.innerHTML=o,this._sg=i.content.querySelector('.Tab[data-tab="Styleguide"] iframe'),this._editorStage.querySelector(".ThemeBundleEditor-stage-main").appendChild(this._sg);const r=(0,n.A)("a",{className:"Popup-heading ThemeBundleEditor-openNewTab",target:"_blank",href:this._sg.getAttribute("src")},this._labels.openNewTab);document.querySelector(".ThemeBundleEditor-stage-top").appendChild(r)}),this._presetSelect=document.querySelector('.CIG-row[data-tab="Overrides"][data-field-name$="._preset"] select[name$="._preset"]'),this._selectedPreset=this._presetSelect.value)}_hideStyleguide(){this._sg&&(this._sg.style.visibility="hidden")}}},13411(e,t,o){"use strict";(0,o(41044).A)(".TimedContentPlayerNote",async()=>{window.BRIGHTSPOT?.ui.cms.enableV5UI||await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(2415)]).then(o.bind(o,43516)),await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(2415)]).then(o.bind(o,55603))})},3341(e,t,o){"use strict";(0,o(41044).A)(".VideoEditor",async()=>{window.BRIGHTSPOT?.ui.cms.enableV5UI||await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(4582),o.e(3543),o.e(4795),o.e(8863)]).then(o.bind(o,86456)),await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(4582),o.e(3543),o.e(4795),o.e(8863)]).then(o.bind(o,36245))})},48557(e,t,o){"use strict";var n=o(32246),i=o(47626);(0,n.A)(".ViewMirror",async e=>{const t=e.dataset.contentUrl;if(!t)return;const o=e.dataset.refreshUrl;if(!o)return;const n=e.querySelector(".ViewMirror-content");if(!n)return;let r;const a=async()=>{n.innerHTML=await(await fetch(t,{cache:"no-cache"})).text();const e=n.querySelector(".PreviewFrame");e&&(r=new i.A(e),r.isVisible=!0,r.updatePreview())};let s;await a(),setInterval(()=>{s&&s.readyState!==EventSource.CLOSED||(s=new EventSource(o),s.onmessage=e=>{switch(JSON.parse(e.data).action){case"update-content":a();break;case"update-preview":r&&r.updatePreview()}})},1e3)})},47626(e,t,o){"use strict";o.d(t,{A:()=>s}),o(44764);var n=o(32246),i=o(36711);const r=window.BRIGHTSPOT?.ui.tooltips;let a=0;class s{get isVisible(){return this.__isVisible}set isVisible(e){this.__isVisible=e}constructor(e,t){this.__isVisible=!1,this.__preview=e,this.__onPreviewUpdate=t,this.__typeFrame=e.querySelector(".PreviewFrame-typeFrame"),this.__reloadButton=e.querySelector(".PreviewFrame-reload");const o=e.closest(".Page-content, .Popup");if(o){const e=o.querySelector(".ContentEdit");e&&(this.containerId=e.getAttribute("data-object-id"))}this.__typeFrame.onload=()=>{this.__firstRefresh=!0,this.__previewControls=this.__typeFrame.querySelector(".PreviewFrame-typeControlsContainer"),this.__previewDisplay=this.__typeFrame.querySelector(".PreviewFrame-typeDisplay"),this.__previewControls&&(this.__shouldRefresh="true"===this.__previewControls.getAttribute("data-refresh-on-change")),this.__isVisible&&this.updatePreview()}}updatePreview(){this.__preview.dispatchEvent(new CustomEvent("brightspot-preview-update",{bubbles:!0})),this.refreshIFrames()}refreshIFrames(){if(this.__previewControls&&this.__previewDisplay&&(this.__firstRefresh||this.__shouldRefresh&&this.__isVisible)){this.__firstRefresh=!1;const e=this.__previewControls.querySelector("form");if(!e)return;const t=document.createElement("IFRAME");t.name="PreviewFrame-preview"+a++,t.setAttribute("title",r.preview.iframeTitle);const o=this.__previewDisplay.querySelector("iframe[name^='PreviewFrame-preview']:not(.Preview-overlayFrame)"),n=this.__previewControls.querySelector(".deviceWidthSelect");let s=o?.style.width;if(!s){const e=n?.options[n?.selectedIndex],t=parseInt(e?.getAttribute("data-device-width")||"0",10);t&&(s=`${t}px`)}s&&(t.style.width=s),o?.style.transform&&(t.style.transform=o.style.transform);const c=o?.style.getPropertyValue("--PreviewFrame-scale");c&&t.style.setProperty("--PreviewFrame-scale",c),this.__previewDisplay.insertBefore(t,this.__previewDisplay.firstChild),t.setAttribute("data-container-id",this.containerId);const p=t.closest(".Popup"),b=(e=null)=>{const t=p??document;t.querySelector(".ContentEdit-previewButtonWrapper")?.classList.toggle("is-animating",e)};b(!0),t.onload=()=>{const e=[];this.__onPreviewUpdate&&this.__onPreviewUpdate(),b(!1);for(let o=t;o=o.nextElementSibling;)"IFRAME"!==o.tagName||o.classList.contains("Preview-overlayFrame")||e.push(o);const o=t.parentNode;e.forEach(e=>o.removeChild(e))},(0,i.A)(t,()=>b(!1)),e.target=t.name,e.submit()}}reloadPreview(){this.__reloadButton.click()}deletePreview(){this.__typeFrame.innerHTML=""}}(0,n.A)(".deviceWidthSelect",async e=>{let t=e.closest(".PreviewFrame-typeControlsContainer");if(!t)return;let o=t.querySelector("form");o&&e.addEventListener("change",e=>{document.querySelector("iframe[name='"+o.target+"']")&&(window.dispatchEvent(new Event("resize")),window.dispatchEvent(new Event("viewport-device-changed")))})}),(0,n.A)('select[name="_mainObjectId"]',e=>{const t=e.closest(".Page-content, .Popup");t&&e.addEventListener("change",()=>{t.classList.toggle("is-previewToEditDisabled",e.value)})})},77663(e,t,o){"use strict";o(84978),o(25809);var n=o(5292),i=o(95628),r=o(40627),a=o(32246),s=o(66556);const c=window.BRIGHTSPOT?.ui.tooltips;(0,a.A)('.Widget a[target="toolUserTfa"]',e=>{const t=e.closest(".Widget").querySelector(".Widget-controls");t&&(e.setAttribute("data-popup-mode","local"),t.insertBefore(e,t.firstChild))}),(0,a.A)(".Widget-controls",e=>{const t=e.closest(".Widget"),o=(0,r.A)(t,":scope > .widget-contentCreate li");if((0,i.A)(e,":scope > button:not(.FormFilter-icon)")&&e.closest(".Widget").querySelector("form").prepend(e),o.length<1)return;const a=(0,n.A)("ul",{className:"Widget-actionsList",role:"menu","aria-label":c.actions?.widget}),p=(0,n.A)("div",{className:"Widget-actions"}),b=(0,n.A)("button",{"aria-expanded":"false","aria-label":c.actions?.widget,"aria-haspopup":"menu",className:"Widget-actionsToggle",type:"button",title:c.actions?.actions,onclick:()=>{(0,s.AM)(a,b,p)}});for(const e of o)a.appendChild(e);const M=(0,i.A)(e,':scope > button[name="action-delete"]');M&&a.appendChild((0,n.A)("li",M)),p.appendChild(b),p.appendChild(a),p.setAttribute("data-tether-anchor",""),e.appendChild(p),(0,s.D1)(a,b)}),(0,a.A)("[data-widget-id]:not(.Guide-tabCluster)",e=>{e.addEventListener("focusin",()=>{if(document.body.classList.contains("is-guideOpen")){const t=[...document.querySelectorAll(".Guide")].pop().querySelector(`.Guide-tabCluster[data-widget-id="${e.dataset.widgetId}"]`);if(t){const e=t.closest(".Guide-content");e.querySelectorAll(".is-focus").forEach(e=>e.classList.remove("is-focus")),e.scrollTo({top:0}),t.scrollIntoView(!0),t.nextElementSibling.classList.add("is-focus")}}})})},89756(e,t,o){"use strict";(0,o(41044).A)(".AppetizeioPreviewPage",async()=>{await Promise.all([o.e(8897),o.e(4114),o.e(2963)]).then(o.bind(o,48874))})},47172(){const e=window.fetch;window.fetch=function(){const t=[...arguments],o=t.length>1?t[1]:{};return"object"!=typeof o||o.credentials||(o.credentials="same-origin"),t[1]=o,e.apply(this,t)}},62824(e,t,o){"use strict";var n=o(1439),i=o.n(n);window.$=i(),window.jQuery=i();const r=i().fn.load;i().fn.load=function(e){return"function"==typeof e?this.on("load",e):r.apply(this,arguments)};const a=i().parseJSON;i().parseJSON=function(e){return e?a.apply(this,arguments):e},i().fn.size=function(){return this.length}},41956(e,t,o){"use strict";var n=o(21194),i=o(1439);window.define=n.E8,window.require=n.Yp,window.requirejs=n.nw,(0,n.E8)("bsp-utils",[],()=>o(75288)),(0,n.E8)("iframeResizer",[],()=>o(98579)),(0,n.E8)("ColorRotator",[],()=>o(76342)),(0,n.E8)("jquery",[],()=>i),(0,n.E8)("v3/rtc",[],()=>o(52215).default)},9968(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(99022)},5292(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(38745)},89561(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(83394)},32246(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(56155)},36711(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(22274)},10013(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(33582)},52215(e,t,o){"use strict";o.r(t),o.d(t,{default:()=>n.A});var n=o(26791)},76342(e,t,o){"use strict";o.r(t),o.d(t,{default:()=>s});var n=o(49259),i=o.n(n);const r=(0,o(31605).A)(),a=[{v4:"red",v5:"darkorchid"},{v4:"orange",v5:"green"},{v4:"yellow",v5:"firebrick"},{v4:"green",v5:"blue"},{v4:"blue",v5:"purple"},{v4:"purple",v5:"brown"}];class s{constructor(){this._index=0}getNext(){const e=a[this._index%a.length],t=window.BRIGHTSPOT?.ui.cms.enableV5UI?i().keyword.hex(e.v5):r.getColor(e.v4,5),[o,n,s]=i().hex.hsl(t);return`#${i().hsl.hex([o+20*Math.floor(this._index++/a.length),n,s])}`}}},34980(e,t,o){"use strict";o.d(t,{A:()=>i});const n=window.localStorage,i={get:e=>n.getItem(e),set:(e,t)=>n.setItem(e,t),toggle:(e,t)=>(void 0===t&&(t=!n.getItem(e)),t?n.setItem(e,"1"):n.removeItem(e),t)}},7724(e,t,o){"use strict";var n=o(32246),i=o(52215);(0,n.A)('.Widget[data-internal-name="com.psddev.assign.widget.AssignmentContentWidget"]',e=>{const t=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",o=>{const n=(o.mainObjectValues||o.values)["assign.assignments"];if(n)for(var i of n)if(i._ref===t){let t=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(t)&&t.click();break}})})},33482(e,t,o){"use strict";o(67219),o(84978),o(25809);var n=o(32246),i=o(9968),r=o(52215),a=o(5292),s=o(66556);(0,n.A)(".AssignmentDeskDashboard-actionsToggle",e=>{const t=e.closest(".AssignmentDeskDashboard-actionsWrapper").querySelector(".AssignmentDeskDashboard-actions");(0,s.D1)(t,e),e.addEventListener("click",o=>{(0,s.AM)(t,e)})}),(0,n.A)('.AssignmentDeskDashboard .SearchWidget-type .ComboInput-option:not([data-value*="-"])',e=>{e.remove()}),(0,n.A)(".AssignmentDeskDashboard .toolbar .AssignmentDeskDashboard-title",e=>{const t=e.closest(".SearchWidget");t.querySelector(":scope > .AssignmentDeskDashboard-title")?e.remove():t.appendChild(e)}),(0,n.A)(".AssignmentDeskDashboard.SearchWidget",e=>{const t=Array.from(document.querySelectorAll('select[name="st"] option'),e=>{if(e.value)return e.value});new MutationObserver(t=>{e.classList.remove("has-refresh")}).observe(e.querySelector(".SearchWidget-result"),{attributes:!0,attributeFilter:["class"]}),r.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",o=>{let n,i,r;if(o.mainObjectId?(i=o.contentTypeId,r=o.contentId,n=o.values):(i=o.mainObjectIdTypeId,r=o.mainObjectId,n=o.mainObjectValues),t.includes(i)){const t=e.querySelectorAll(`.SearchWidget-result a[href$="${r}"]:not([data-rtc-updated]):not([target="SingleFieldUpdateTarget"])`);if(t.length>0){for(const e of t){const t=e.closest("tr");if(t&&t.classList.contains("has-updateAttempt"))return}e.classList.add("has-refresh"),t.forEach(e=>{e.setAttribute("data-rtc-updated",!0),e.parentElement.insertBefore((0,a.A)("span",{class:"Label is-updated",title:`${o.userName} - ${new Date(o.date).toLocaleString()}`},"Updated"),e)})}e.classList.contains("has-refresh")||n["cms.content.publishDate"]!==n["cms.content.updateDate"]||e.classList.add("has-refresh")}})});const c=function(e){e.addEventListener("click",t=>{if(e.classList.contains("is-open")){const e=document.getElementById("calendarPopup");e&&(t.preventDefault(),t.stopImmediatePropagation(),e.dispatchEvent(new CustomEvent("close",{bubbles:!0})))}else e.classList.toggle("is-open")})};(0,n.A)(".SingleFieldUpdate-date",e=>{c(e)}),(0,n.A)(".SingleFieldUpdate-content .DateTimeInput",e=>{const t=e.closest(".Popup");if(t&&"SingleFieldUpdateTarget"===t.getAttribute("name")){e.click();const o=document.getElementById("calendarPopup"),n=t.querySelector(".SingleFieldUpdate-form");if(!n)return;const r=n.dataset.objectid,a=document.querySelectorAll(".SingleFieldUpdate-date.is-open");let s=null;for(const e of a)e.href&&!e.href.includes(r)?e.classList.toggle("is-open"):s=e;const c=n.querySelector("button"),p=e.previousSibling;if(!(o&&s&&c&&p))return;o._tether=new i.A(s,o),o.onclose=()=>{s.classList.contains("is-open")&&s.classList.toggle("is-open"),t.classList.remove("is-visible","popup-show"),o.remove()},p.addEventListener("change",e=>{e.preventDefault();const t=s.closest("tr");t&&(t.classList.add("has-updateAttempt"),c.click(),o.dispatchEvent(new CustomEvent("close",{bubbles:!0})))})}}),(0,n.A)(".SingleFieldUpdate-success",e=>{e.parentNode.classList.remove("is-visible","popup-show");const t=document.querySelectorAll(`.SearchWidget-result a[href$="${e.dataset.objectid}"]:not([data-rtc-updated]):not([target="SingleFieldUpdateTarget"])`),o=e.content.firstElementChild;o&&(o.classList.add("is-updated"),t.length>0&&t.forEach(e=>{const t=e.closest("tr");if(t){const e=o.cloneNode(!0),n=e.querySelector(".SingleFieldUpdate-date");n&&c(n),t.replaceWith(e)}}),o.remove())}),(0,n.A)(".SingleFieldUpdate-error",e=>{window.alert(e.textContent),e.parentNode.classList.remove("is-visible","popup-show")})},57535(e,t,o){"use strict";(0,o(32246).A)(".AssociatedContent",e=>{const t=e.parentElement;t&&t.classList.add("is-associatedContentWidget")})},38387(e,t,o){"use strict";(0,o(32246).A)(".BulkUploadProcessor li[data-tab]",e=>{const t=e.getAttribute("data-tab"),o=e.closest(".objectInputs").querySelector('[data-tab="'+t+'"][data-upload-mime-type-count]');let n;if(o&&(n=o.getAttribute("data-upload-mime-type-count")),n){const t=document.createElement("SPAN");t.classList.add("MimeTypeCount"),t.innerText=n,e.append(t)}})},75850(e,t,o){"use strict";(0,o(32246).A)(document,".Calendar .calendarEvent",e=>{const t=e.dataset.color;t&&e.style.setProperty("--bg-color",t)})},70823(e,t,o){"use strict";(0,o(32246).A)(".ButtonForClosableWindow",e=>{e.addEventListener("click",t=>{const o=e.getAttribute("data-url");o&&(t.preventDefault(),window.open(o,"_blank"))})})},64660(e,t,o){"use strict";var n=o(32246),i=o(52215);(0,n.A)('.Widget[data-internal-name="com.psddev.assign.widget.PitchAssignmentsWidget"]',e=>{const t=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.assign.AssignmentRtcBroadcast",o=>{if(o.pitchId===t){let t=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(t)&&t.click()}})})},84977(e,t,o){"use strict";var n=o(32246),i=o(52215);(0,n.A)('.Widget[data-internal-name="com.psddev.assign.widget.PitchContentWidget"]',e=>{const t=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",o=>{const n=(o.mainObjectValues||o.values)["assign.pitches"];if(n)for(var i of n)if(i._ref===t){let t=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(t)&&t.click();break}})})},26912(e,t,o){"use strict";var n=o(32246),i=o(66556);(0,n.A)(".Revisions-more",e=>{const t=e.nextSibling;(0,i.D1)(t,e),e.addEventListener("click",()=>{(0,i.AM)(t,e)})}),(0,n.A)(".Revisions-listItem.is-parentRevision",e=>{const t=e.querySelector(".Revisions-listItem-collapseButton"),o=e.querySelector(".Revisions-listItem-children"),n=e.dataset.id;t.addEventListener("click",e=>{e.preventDefault(),e.stopImmediatePropagation(),t.classList.contains("is-active")?(localStorage.removeItem(`BSP.ContentEdit.suggestionCollapsible.${n}`),t.classList.remove("is-active"),o.style.display="none"):(localStorage.setItem(`BSP.ContentEdit.suggestionCollapsible.${n}`,1),t.classList.add("is-active"),o.style.display="block")}),localStorage.getItem(`BSP.ContentEdit.suggestionCollapsible.${n}`)&&(t.classList.add("is-active"),o.style.display="block")}),(0,n.A)(".Revisions-statusLabel",e=>{const t=e.dataset.statusColor,o=e.style;!t||e.closest(".Revisions-listItem-children")?o.setProperty("--workflow-color","var(--color-gray6)"):o.setProperty("--workflow-color",t)}),(0,n.A)(".message.is-revision",e=>{const t=e.querySelector(".Message-icon"),o=e.dataset.statusColor;if(!o)return;const n=t?.style;n.setProperty("--Revision-revisionColor",o)})},45891(e,t,o){"use strict";o.d(t,{WA:()=>r,cX:()=>n});const n=!("undefined"==typeof navigator)&&(/Mac/.test(navigator.platform)||/macOS/.test(navigator.userAgentData?.platform)),i=n?"Alt+Tab":"F6";function r(e){return e.replace(/Alt\+Tab/g,i)}},26791(e,t,o){"use strict";o.d(t,{A:()=>M}),o(67219),o(44764);var n=o(62165),i=o(8217),r=(o(50144),o(7095));class a{constructor(e){this._url=void 0,this._requests=void 0,this._sending=!1,this._sessionId=void 0,this._onConnect=()=>{},this._onReceive=()=>{},this._ensureConnectionInterval=void 0,this._receiver=void 0,this._lastMessageReceived=Date.now(),this._messageInterval=void 0,this._pingInterval=void 0,this._url=e,this._ensureConnection=(0,r.A)(5e3,this._ensureConnection.bind(this)),this._requests=[]}send(e,t,o){e&&(this._requests.push({message:e,callback:t,wait:o}),this._sending||(this._sending=!0,this._processRequests()))}async _processRequests(){if(!this._sessionId)return void setTimeout(()=>this._processRequests(),100);if(this._requests.length<=0)return void(this._sending=!1);const e=this._requests.shift();if(!e)return;const{message:t,callback:o,wait:n}=e,i=new URLSearchParams;i.append("sessionId",this._sessionId),i.append("message",JSON.stringify(t));const r=t.type;if(fetch(`${this._url}${r?`?${encodeURIComponent(r)}`:""}`,{method:"post",cache:"no-store",body:i,credentials:"include"}).then(e=>{if(!e.ok)throw"";return e.text()}).then(e=>{o&&o(e?JSON.parse(e):null)}).catch(()=>{this._requests.unshift(e),this.reconnect()}).finally(()=>{this._processRequests()}),n){const e=+Date.now();for(;Date.now()-e<500;);}}connect(e){this._onConnect=e.onConnect||(()=>{}),this._onReceive=e.onReceive||(()=>{}),this._ensureConnectionInterval||(this._ensureConnectionInterval=setInterval(this._ensureConnection,100),this._ensureConnection())}_ensureConnection(){if(this._receiver){const e=this._receiver.readyState;if(e===EventSource.CONNECTING)return;if(e===EventSource.OPEN&&this._sessionId)return}this._reset(),this._receiver=new EventSource(this._url),this._receiver.onmessage=e=>{this._lastMessageReceived=Date.now();const t=JSON.parse(e.data);t._first?("string"==typeof t.sessionId&&(this._sessionId=t.sessionId),this._receiver&&(this._receiver.onerror=()=>this.reconnect()),this._messageInterval=setInterval(()=>{Date.now()>this._lastMessageReceived+6e3&&this.reconnect()},1e3),this._pingInterval=setInterval(()=>this.send({type:"ping"}),55e3)):t._ping||this._onReceive(t)},this._onConnect()}disconnect(){this._ensureConnectionInterval&&(clearInterval(this._ensureConnectionInterval),this._ensureConnectionInterval=void 0),this._reset()}_reset(){this._sessionId=void 0,this._receiver&&(this._receiver.close(),this._receiver=void 0),this._messageInterval&&(clearInterval(this._messageInterval),this._messageInterval=void 0),this._pingInterval&&(clearInterval(this._pingInterval),this._pingInterval=void 0)}reconnect(){this._reset(),this._ensureConnection()}}const s=!0===window.BRIGHTSPOT?.ui?.cms?.enableV5UI,c=!0===window.BRIGHTSPOT?.ui?.cms?.enableAutomaticUpdates,p=["com.psddev.cms.tool.page.content.PublishBroadcast","com.psddev.assign.AssignmentRtcBroadcast","com.psddev.cms.conversation.PostBroadcast","brightspot.liveblog.LiveBlogPostRtcBroadcast"];let b;if(window.DISABLE_RTC||!document.documentElement.dataset.userId)b={initialize:function(){},restore:function(){},receive:function(){},receiveOnce:function(){},execute:function(){}};else{const e="broadcast",t="callback",o="connect",r="connect",M="execute",d="restore",l={},z=(e,t)=>{if(!s||c||!p.includes(e))for(const o of l[e]??[])o(t)},u=(e,t)=>{for(const{broadcast:e,data:o}of t??[])z(e,o);e&&e(t)},O=`${(0,i.A)()}-`;let A=0;const f=new n.X2("brightspot-rtc"),h=(e,o)=>{const n=O+ ++A,i=({type:e,callbackId:r,broadcasts:a})=>{e===t&&r===n&&(f.removeEventListener("message",i),u(o,a))};f.addEventListener("message",i),f.postMessage({type:d,message:e,callbackId:n})},m=[],q={};let _;f.addEventListener("message",({type:t,broadcast:n,data:i})=>{if(t===o)for(const{message:e,callback:t}of m)h(e,t);else t===e&&z(n,i)});const W=(e,t)=>{_.send(e,e=>{u(t,e)})};(0,n.XS)(f).awaitLeadership().then(()=>{_=new a(`${window.ROOT_PATH}/_rtc`),f.addEventListener("message",({type:e,message:o,callbackId:n})=>{e===r||e===M?_.send(o):e===d&&_.send(o,e=>{f.postMessage({type:t,callbackId:n,broadcasts:e})})}),_.connect({onConnect:()=>{f.postMessage({type:o});for(const{message:e,callback:t}of m)W(e,t)},onReceive:({broadcast:t,data:o})=>{if(t&&o&&(f.postMessage({type:e,broadcast:t,data:o}),z(t,o),!s||c||!p.includes(t)))for(const e of q[t]??[])e(o)}})}),b={initialize:function(e,t,o){b.restore(e,t,o),window.addEventListener("unload",()=>{const n={type:"disconnect",className:e,data:t};_?_.send(n,o,!0):f.postMessage({type:r,message:n})})},restore:function(e,t,o){const n={type:"restore",className:e,data:t};m.push({type:d,message:n,callback:o}),_?W(n,o):h(n,o)},receive:function(e,t){t&&(l[e]??=[]).push(t)},receiveOnce:function(e,t){t&&(q[e]??=[]).push(t)},execute:function(e,t){const o={type:"execute",className:e,data:t};_?_.send(o):f.postMessage({type:M,message:o})}}}const M=b},49989(e,t,o){"use strict";o.d(t,{A:()=>f}),o(44764),o(84978),o(25809),o(91672);var n=o(29171),i=o(17319),r=o(80133),a=o(79911);function s(){s=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!b(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?z(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=l(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:d(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=d(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function c(e){var t,o=l(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function p(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function b(e){return e.decorators&&e.decorators.length}function M(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function d(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function l(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function u(e,t,o,n){var i=O(A(1&n?e.prototype:e),t,o);return 2&n&&"function"==typeof i?function(e){return i.apply(o,e)}:i}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},O.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}let f=(h=[(0,i.EM)("btu-table")],m=(0,r.m)((0,a.s)(n.WF)),q=s(),_=function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,i.nJ)("table")],key:"_table",value:void 0},{kind:"method",key:"connectedCallback",value:function(){u(o,"connectedCallback",this,3)([]),this._table.then(e=>{const t=e.querySelector(':scope th > input[type="checkbox"]');t?.addEventListener("click",this._updateCheckAll),e.querySelectorAll(':scope > tbody input[type="checkbox"]').forEach(e=>{e.addEventListener("click",this._updateSelectAll)})})}},{kind:"method",key:"disconnectedCallback",value:function(){u(o,"disconnectedCallback",this,3)([]),this._table.then(e=>{const t=e.querySelector(':scope th > input[type="checkbox"]');t?.removeEventListener("click",this._updateCheckAll),e.querySelectorAll(':scope > tbody input[type="checkbox"]').forEach(e=>{e.removeEventListener("click",this._updateSelectAll)})})}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"field",key:"_updateSelectAll",value(){return e=>{this._table.then(e=>{const t=e.querySelector(':scope th > input[type="checkbox"]'),o=e.querySelectorAll(':scope > tbody input[type="checkbox"]'),n=e.querySelectorAll(':scope > tbody input[type="checkbox"]:checked');t&&(t.checked=o.length>0&&n.length===o.length,this.emit("btu-table-checked-all"))})}}},{kind:"field",key:"_updateCheckAll",value(){return e=>{this._table.then(t=>{const o=e.target;o instanceof HTMLInputElement&&(t.querySelectorAll(':scope > tbody input[type="checkbox"]').forEach(e=>{e.checked=o.checked}),this.emit("btu-table-checked-all"))})}}},{kind:"method",key:"render",value:function(){return n.s6}}]}}(function(e){q.initializeInstanceElements(e,W.elements)},m),W=q.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(M(r.descriptor)||M(i.descriptor)){if(b(r)||b(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(b(r)){if(b(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}p(r,i)}else t.push(r)}return t}(_.d.map(c)),h),q.initializeClassElements(_.F,W.elements),q.runClassFinishers(_.F,W.finishers));var h,m,q,_,W},31605(e,t,o){"use strict";o.d(t,{A:()=>d}),o(84978),o(25809),o(91672);var n=o(49259),i=o.n(n),r=o(38745),a=o(56155);const s=[90,81,72,38,14,8,4],c=[3,5,7,14,26,42,65],p={Bold:{luminances:s,darkLuminances:c,colors:{dominant:"#93a7c6",gray:"#7d7f88",red:"#ff1e3c",orange:"#f28d00",yellow:"#baa700",green:"#51bd00",blue:"#13315c",purple:"#af95ff"}},Calm:{luminances:s,darkLuminances:c,colors:{dominant:"#908f8b",gray:"#908f8b",red:"#c14234",orange:"#ff9505",yellow:"#e2c222",green:"#90b52d",blue:"#2aa3bf",purple:"#7700ff"}},Brightspot:{luminances:s,darkLuminances:c,colors:{dominant:"#4b4545",gray:"#958f8f",red:"#ee0120",orange:"#f98948",yellow:"#f9dc5c",green:"#15655b",blue:"#225b7d",purple:"#3a4697"}}};function b(e){const[t,o,n]=e.map(e=>e/255).map(e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return 100*(.2126*t+.7152*o+.0722*n)}const M=new class{constructor(e){this._element=void 0,this._dark=!1,this._theme=void 0,this.createTable=(e,t,o)=>{const n=(0,r.A)("table",{className:"Theme-colors"}),i=(0,r.A)("tr");n.appendChild(i),i.appendChild((0,r.A)("td",{colspan:2}));const a=this._dark?o:t,s=a?JSON.parse(a):this._theme[this._dark?"darkLuminances":"luminances"],c=e?JSON.parse(e):this._theme.colors;return s.forEach((e,t)=>{i.appendChild((0,r.A)("td",(0,r.A)("input",{type:"text",name:"luminance-"+t,value:e,oninput:e=>{e.target instanceof HTMLInputElement&&(s[t]=parseInt(e.target.value,10)),this._updateColorAccent(),this._updateUI()},onkeydown:e=>{if(!(e.target instanceof HTMLInputElement))return;let o=parseInt(e.target.value,10);switch(e.key){case"ArrowUp":o++,e.target.value=o.toString(),s[t]=o,this._updateColorAccent(),this._updateUI();break;case"ArrowDown":o--,e.target.value=o.toString(),s[t]=o,this._updateColorAccent(),this._updateUI()}}})))}),Object.keys(c).forEach(e=>{if("accent"===e)return;const t=(0,r.A)("tr",(0,r.A)("td",e.charAt(0).toUpperCase()+e.slice(1)));t.appendChild((0,r.A)("td",(0,r.A)("input",{className:"color",type:"text",name:"color-"+e,value:c[e],onchange:t=>{t.target instanceof HTMLInputElement&&(c[e]=t.target.value),this._updateColorAccent(),this._updateUI()}})));for(let o=0;o<s.length;o++)t.appendChild((0,r.A)("td",{style:`background:var(--color-${e}${o+1});`}));n.appendChild(t)}),n},this._element=e,(0,a.A)(this._element,".themeColorContainer",e=>{const t=e.dataset.colors,o=e.dataset.luminances,n=e.dataset.darkLuminances,i=e.querySelector("input.appearance");i&&(i.value=this._dark.toString());const r=this.createTable(t,o,n);e.appendChild(r)}),(0,a.A)(this._element,".headerBackgroundContainer .color",e=>{e.addEventListener("change",e=>{e.target instanceof HTMLInputElement&&(this._theme.headerBackground=e.target.value),this._updateColorAccent(),this._updateUI()})}),(0,a.A)(this._element,".CIG-row[data-field-name='cms.presetTheme'] .ComboInput-option[data-value='CUSTOM']",e=>{const t=e.closest(".CIG-row");if(!t)return;const o=t.nextElementSibling;o&&("true"==e.getAttribute("aria-selected")?o.classList.remove("is-hidden"):o.classList.add("is-hidden"),new MutationObserver(e=>{e.forEach(e=>{if("attributes"===e.type){const t=e.target;t instanceof Element&&"true"==t.getAttribute("aria-selected")?o.classList.remove("is-hidden"):o.classList.add("is-hidden")}})}).observe(e,{attributes:!0}))});const t=window.localStorage.getItem("BSP.Theme");let o=!1;const n=document.documentElement.dataset.theme??"";try{JSON.parse(n),o=!0}catch(e){o=!1}this._theme=o?JSON.parse(n):t?JSON.parse(t):function(){const e=p.Bold;return{...e,luminances:e.luminances,darkLuminances:e.darkLuminances,colors:{...e.colors}}}(),this._theme.luminances||(this._theme.luminances=s),this._theme.darkLuminances||(this._theme.darkLuminances=c),"loading"===document.readyState?window.addEventListener("DOMContentLoaded",()=>{this._updateUI()}):this._updateUI(),this._setAppearance(),window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{this._setAppearance(),this._updateUI()}),window.addEventListener("message",async({data:e})=>{"BSP.Theme.UpdateFrameUI"===e.type&&(this._dark=e.isDark,this._theme=e.theme,this._updateColorAccent(),this._updateUI())})}_setAppearance(){const e=this._theme.appearance;this._element.dataset.previewOverlay?(this._dark=!1,document.documentElement.style.colorScheme="light",this._updateUI()):(this._dark=e?"dark"===e:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,document.documentElement.style.colorScheme=this._dark?"dark":"light")}_updateUI(){const e=this._element===document.documentElement?[this._element,document.body]:[this._element];for(const t of e)t.classList.toggle("is-dark",this._dark),t.classList.toggle("is-boxedInput",!!this._theme.boxedInput),t.classList.toggle("is-compact",!!this._theme.compact),t.classList.toggle("is-compactRails",!!this._theme.compactRails),t.classList.toggle("is-highContrast",!!this._theme.highContrast),"more"===this._theme.contrastChoices?t.classList.add("is-moreContrast"):"normal"===this._theme.contrastChoices&&t.classList.add("is-normalContrast");const t=this._element.style,o=this._theme.headerBackground;if(o){t.setProperty("--Page-headerBackground",o);for(const t of e)t.classList.toggle("is-lightHeader",b(i().hex.rgb(o))>Math.sqrt(100)!=this._dark)}else if(this._dark){t.setProperty("--Page-headerBackground","var(--color-dominant1)");for(const t of e)t.classList.add("is-lightHeader")}else{t.setProperty("--Page-headerBackground","var(--color-dominant7)");for(const t of e)t.classList.remove("is-lightHeader")}const n=i().hex.hsl(this._theme.colors.gray),r=this._guessColor(n[0],n[1],1),a=this._guessColor(n[0],n[1],100);this._dark?(this._setColorProperty(t,"black",a),this._setColorProperty(t,"white",r),t.setProperty("--color-iconHoverBackground","rgba(255, 255, 255, 0.08)")):(this._setColorProperty(t,"black",r),this._setColorProperty(t,"white",a),t.setProperty("--color-iconHoverBackground","rgba(0, 0, 0, 0.08)"));const s=this._theme[this._dark?"darkLuminances":"luminances"];let c;for(c in this._theme.colors){if("accent"===c)continue;const[e,o]=i().hex.hsl(this._theme.colors[c]);s?.forEach((n,i)=>{this._setColorProperty(t,`${c}${i+1}`,this._guessColor(e,o,this._theme.highContrast&&3==i?this._dark?4.5*(n+5)-5:(n+5)/4.5-5:n))})}}_guessColor(e,t,o){let n=100,r=0;for(let a=0;a<=100;a+=.1){const s=Math.abs(o-b(i().hsl.rgb([e,t,a])));n>s&&(n=s,r=a)}return i().hsl.rgb([e,t,r])}_setColorProperty(e,t,o){e.setProperty(`--color-${t}`,"#"+i().rgb.hex(o)),e.setProperty(`--rgb-${t}`,o.join(" "))}_updateColorAccent(){this._theme.colors.accent=this._theme.colors.dominant}getColor(e,t){return this._element.style.getPropertyValue(`--color-${e}${t}`)}}(document.documentElement);function d(){return M}},27170(e,t,o){"use strict";function n(e,t){if(e<=0)return t;let o;return function(){clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,[...arguments])},e)}}o.d(t,{A:()=>n})},57317(e,t,o){"use strict";function n(e,t){const o=e.closest(".ContentEdit")||e.closest("btu-widget");if(!o)return null;let n,i;if(o.classList.contains("ContentEdit")){if(n=o.getAttribute("data-type-id"),i=e.getAttribute(t),!n||!i)return null}else if(o instanceof HTMLElement&&(n=o.getAttribute("widgetid"),i=o.getAttribute("internalname"),!n||!i))return null;return n&&i?`BSP.ContentEdit.widgetCollapsed.${n}.${i}`:null}o.d(t,{A:()=>n})},26594(e,t,o){"use strict";function n(e){let t;return function(){t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{t=void 0,e.apply(this,[...arguments])})}}o.d(t,{A:()=>n})},7095(e,t,o){"use strict";function n(e,t){if(e<=0)return t;let o,n=0;return function(){if(o)return;const i=Date.now(),r=e-i+n;r<=0?(n=i,t.apply(this,[...arguments])):o=setTimeout(()=>{n=i,o=void 0,t.apply(this,[...arguments])},r)}}o.d(t,{A:()=>n}),Object.defineProperty(n,"name",{value:"default",configurable:!0})},74051(e,t,o){"use strict";o.d(t,{A:()=>q}),o(44764),o(84978),o(25809),o(91672);var n=o(29171),i=o(17319),r=o(80133),a=o(57317),s=o(31400);function c(){c=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!M(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?u(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=z(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:l(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=l(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function p(e){var t,o=z(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function b(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function M(e){return e.decorators&&e.decorators.length}function d(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function l(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function z(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},O.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}const f=window.localStorage,h=window.BRIGHTSPOT?.ui.tooltips.collapse,m=window.BRIGHTSPOT?.ui.tooltips.expand;let q=(_=[(0,i.EM)("btu-widget")],W=(0,r.m)(n.WF),g=c(),y=function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",key:"_collapsed",value:()=>!1},{kind:"field",decorators:[(0,i.MZ)({type:Boolean})],key:"collapsible",value:()=>!1},{kind:"field",decorators:[(0,i.MZ)({type:String})],key:"heading",value:void 0},{kind:"field",decorators:[(0,i.MZ)({type:String})],key:"internalname",value:void 0},{kind:"field",decorators:[(0,i.wk)()],key:"invalid",value:()=>!1},{kind:"field",decorators:[(0,i.MZ)({type:String})],key:"widgetid",value:void 0},{kind:"field",decorators:[(0,i.MZ)({type:Boolean,attribute:"initial-closed"})],key:"initialClosed",value:()=>!1},{kind:"set",decorators:[(0,i.MZ)({type:Boolean})],key:"collapsed",value:function(e){this._collapsed=e;const t=(0,a.A)(this,"data-internal-name");t&&(e?f.setItem(t,"1"):f.removeItem(t)),this.requestUpdate(),this.emit("btu-widget-toggle")}},{kind:"get",key:"collapsed",value:function(){return this._collapsed}},{kind:"method",key:"connectedCallback",value:function(){var e,t,n,i,r;if((e=o,t="connectedCallback",n=this,r=O(A(1&(i=3)?e.prototype:e),t,n),2&i&&"function"==typeof r?function(e){return r.apply(n,e)}:r)([]),this.collapsible&&this.initialClosed)this._collapsed=!0;else if(this.collapsible){const e=(0,a.A)(this,"data-internal-name");this._collapsed=!(!e||!f.getItem(e))}}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"firstUpdated",value:function(){this.emit("btu-widget-ready"),this.invalid=null!=this.querySelector(".Message.is-error"),this.collapsible&&!this.invalid||(this.collapsed=!1);const e=this.querySelector(".Widget-title"),t=this.firstChild;t instanceof Element&&!t.classList.contains("Widget-title")&&e&&this.insertBefore(e,t),this.querySelectorAll(":scope > :not(.Widget-title, script, select)").forEach(e=>{e.toggleAttribute("hidden",this.collapsed&&!this.invalid)})}},{kind:"method",key:"render",value:function(){return this.classList.add("widget","Widget"),this.classList.toggle("is-collapsible",this.collapsible),this.classList.toggle("is-collapsed",this.collapsed),this.classList.toggle("is-error",this.invalid),this.querySelectorAll(":scope > :not(.Widget-title, script, select)").forEach(e=>{e.toggleAttribute("hidden",this.collapsed)}),this.collapsible?n.qy`<h2
72
+ </btu-input>`}}]},_=m.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(M(r.descriptor)||M(i.descriptor)){if(b(r)||b(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(b(r)){if(b(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}p(r,i)}else t.push(r)}return t}(q.d.map(c)),O),m.initializeClassElements(q.F,_.elements),m.runClassFinishers(q.F,_.finishers));var O,A,f,h,m,q,_},91334(e,t,o){"use strict";o.a(e,async(e,n)=>{try{o.d(t,{A:()=>w}),o(44764),o(84978),o(25809),o(91672);var i=o(29171),r=o(17319),a=o(79911),s=o(7176);function c(e,t,o,n){var i=p();if(n)for(var r=0;r<n.length;r++)i=n[r](i);var a=t(function(e){i.initializeInstanceElements(e,s.elements)},o),s=i.decorateClass(d(a.d.map(b)),e);return i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}function p(){p=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!l(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,m(t)||h(t)||A(t)||O()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=g(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:u(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=u(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function b(e){var t,o=g(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function M(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function d(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(z(r.descriptor)||z(i.descriptor)){if(l(r)||l(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(l(r)){if(l(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}M(r,i)}else t.push(r)}return t}function l(e){return e.decorators&&e.decorators.length}function z(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function u(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function O(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(e,t){if(e){if("string"==typeof e)return f(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(e){if(Array.isArray(e))return e}function q(e,t,o,n){return q="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(e,t,o,n){var i,r=v(e,t);if(r){if((i=Object.getOwnPropertyDescriptor(r,t)).set)return i.set.call(n,o),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(n,t)){if(!i.writable)return!1;i.value=o,Object.defineProperty(n,t,i)}else W(n,t,o);return!0},q(e,t,o,n)}function _(e,t,o,n,i){if(!q(e,t,o,n||e)&&i)throw new TypeError("failed to set property");return o}function W(e,t,o){return(t=g(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function g(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function v(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=L(e)););return e}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}window.BRIGHTSPOT?.ui.cms.enableV5UI||await o.e(5385).then(o.bind(o,85385));let w=c([(0,r.EM)("btu-textarea-input")],function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"method",key:"find",value:function(){return this.querySelector(":scope > textarea")}},{kind:"set",key:"child",value:function(e){var t;t=e,_(L(o.prototype),"_child",t,this,1),this.input=e}},{kind:"method",key:"createRenderRoot",value:function(){return this}}]}},(0,s.r)((0,a.s)(i.WF)));n()}catch(R){n(R)}},1)},32817(e,t,o){"use strict";var n=o(56155),i=o(99022);(0,n.A)(".GraphQL",e=>{e.addEventListener("onegraph-click",()=>{e.dispatchEvent(new Event("mousedown",{bubbles:!0})),e.dispatchEvent(new Event("click",{bubbles:!0}))})}),(0,n.A)(".GraphQL-controls-toggle",e=>{const t=e.closest(".GraphQL-controls-menu"),o=t?.querySelector(".GraphQL-controls-list");o&&t&&e.addEventListener("click",n=>{i.A.toggle(e,o,()=>t.classList.toggle("is-open"))})}),(0,n.A)(".GraphQL-copy",e=>{e.addEventListener("click",t=>{t.stopPropagation(),t.preventDefault();const o=e.getAttribute("data-code");o&&window.navigator.clipboard.writeText(o),e.setAttribute("data-copied","");const n=e.nextElementSibling;n&&(n.removeAttribute("hidden"),setTimeout(()=>{n.setAttribute("hidden",""),e.removeAttribute("data-copied")},1500))})})},9389(e,t,o){"use strict";(0,o(56155).A)("div.GraphQL-previewControls",e=>{const t=e.querySelector("form[id]");if(!t)return;const o=t.querySelector(".deviceWidthSelect");o&&o.addEventListener("change",e=>{const o=document.querySelector("iframe[name='"+t.target+"']");o&&e?.currentTarget instanceof HTMLSelectElement&&(o.style.width=e?.currentTarget?.selectedOptions[0].value+"px"),window.dispatchEvent(new Event("resize")),t.submit()})})},80990(e,t,o){"use strict";var n=o(95628);(0,o(32246).A)(".Admin-main.is-miller .Widget",e=>{setTimeout(()=>{e.scrollIntoView({block:"end"})},0);const t=(0,n.A)(e,".is-selected");t&&setTimeout(()=>{t.scrollIntoView({block:"center"})},0)})},78062(e,t,o){"use strict";var n=o(5292),i=o(68243),r=o(10013);const a=CSS.supports("field-sizing: content");(0,r.A)("textarea",e=>{const t=e.parentNode;if(a)return void(t.classList.contains("AutoExpand")&&t.classList.add("is-noShim"));const o=()=>`${e.value||e.placeholder} `;let r;if(t.classList.contains("AutoExpand"))r=()=>{t.dataset.value=o();const n=e.style.opacity;e.style.opacity=.99999999,e.style.opacity=n};else{e.rows=1;const t=(0,n.A)("div",{className:"AutoExpand"}),a=(0,n.A)("div",{className:"AutoExpand-shim"});r=()=>a.innerText=o();const s=window.getComputedStyle(e),c=a.style;for(const e of s)c.setProperty(e,s.getPropertyValue(e));c.gridArea="1 / 1 / 2 / 2",c.height="auto",c.visibility="hidden",c.width="auto",(0,i.A)(t,e),t.appendChild(a),t.appendChild(e)}const s=()=>e.parentNode.classList.toggle("is-noShim",0===e.getClientRects().length);r(),s(),new MutationObserver(e=>{for(const{attributeName:t}of e)"class"===t||"style"===t?s():r()}).observe(e,{attributes:!0,attributeFilter:["class","placeholder","style"]}),e.addEventListener("change",r),e.addEventListener("input",r)})},57366(e,t,o){"use strict";o.d(t,{A:()=>a}),o(50144),o(84978),o(39589);var n=o(1439),i=o.n(n),r=o(27170);class a{constructor(e){if(this._form=e.closest("form, .NestedForm"),!this._form)return;this.submit=this.submit.bind(this),e.addEventListener("change",this.submit),e.addEventListener("input",(0,r.A)(500,this.submit));for(const t of e===this._form?e.querySelectorAll("input, select, textarea"):[e])t.autocomplete="off";const t=this._form.target;t&&document.querySelector(`.frame[name="${t}"]:not(.loading):not(.loaded)`)&&this._form.requestSubmit()}submit({target:e}){const t=this._form;if(t&&e.name)if(t instanceof HTMLFormElement){const o=new FormData(t);this._lastData&&JSON.stringify([...this._lastData.entries()])===JSON.stringify([...o.entries()])||(window.BRIGHTSPOT.ajaxInitiator={action:t.action,id:e.name,nodeName:e.nodeName.toLowerCase(),shadowField:e.shadowField},t.requestSubmit()),this._lastData=o}else{const e=i()(t),o=e.find(":input").serialize();this._lastData!==o&&(this._lastData=o,e.trigger("submit"))}}}},73136(e,t,o){"use strict";o(84978),o(25809);var n=o(59314),i=o.n(n),r=o(32246),a=o(1439);const s=document.createElement("style");s.className="Bridge",document.head.appendChild(s);const c=s.sheet,p={};function b(e,t){"function"==typeof t||t.startsWith("RichTextEditor-")||(Array.isArray(e)?e:[e]).forEach(e=>{e.indexOf(",")<0&&c.insertRule(`${e}:not(.${t}) { display: none; }`)}),(0,r.A)(e,e=>{"function"==typeof t?t(e):e.classList.contains(t)||(p[t]||(p[t]=!0,i().debug(`Bridged to ${t}`,e)),e.classList.add(t))})}b([".actions",".buttons"],"ActionBar"),b(".withLeftNav","Admin"),b(".withLeftNav > .leftNav","Admin-nav"),b(".withLeftNav > .main","Admin-main"),b(".ToolUserAvatar","Avatar"),b(".MimeTypeCount","Badge"),b(".button","Button"),b(".contentForm","ContentEdit"),b(".ContentFormCreate","ContentForm-create"),b('.ContentEdit[data-content-locked-out="true"]',"is-locked"),b(".contentForm-aside > .widget-publishing","ContentEdit-bar"),b(".OverlayProviderSelect","ContentEdit-overlayList"),b(".widget-publishingWorkflow","ContentEdit-workflow"),b(".widget-publishingPublish","ContentEdit-publish"),b(".widget-publishingWorkflowLog","ContentEdit-workflowLog"),b('.widget-publishing > .widget-publishingPublish > button[name="action-publish"]',"ContentEdit-publishButton"),b(".contentForm-main","ContentEdit-left"),b(".contentForm-main > .widget-content","ContentEdit-main"),b(".contentForm-main > .widget-content > h1","ContentEdit-title"),b(".contentForm-aside > .contentWidgets","ContentEdit-right"),b(".contentForm-main > .contentWidgets","ContentEdit-bottom"),b(['.ContentEdit-bar > button[name="action-draft"]','.ContentEdit-bar > button[name="action-newDraft"]'],"ContentEdit-saveButton"),b(['.ContentEdit-controls button[name="action-restore"]','.ContentEdit-controls button[name="action-restore-draft"]'],"ContentEdit-restoreButton"),b([".objectInputs:not(.BulkUploadProcessor)",".SocialPublishContentEditWidget-inputs"],"CIG"),b("form > .inputContainer","CIG-row"),b("form > .inputContainer > .inputSmall","CIG-small"),b("form > .inputContainer > .inputLabel","CIG-label"),b(".cms-contentTools","ContentTools"),b(".CIG .inputContainer","CIG-row"),b([".objectInputs-readOnly",".CIG .inputContainer-readOnly"],"is-readOnly"),b(".CIG .inputContainer-unlabeled","is-unlabeled"),b(".CIG .inputLabel","CIG-label"),b(".CIG .inputLabel > .icon-object-guide","CIG-help"),b(".CIG .inputPending","CIG-pending"),b(".CIG .inputUpdated","CIG-updated"),b(".CIG .inputNote","CIG-note"),b(".CIG .inputSmall","CIG-small"),b(".CIG .inputLarge","CIG-large"),b(".objectId-select","ContentSelector-search"),b(".objectId-edit","ContentSelector-edit"),b(".objectId-clear","ContentSelector-clear"),b(".objectId-placeholder","ContentSelector-placeholder"),b(".dashboard-columns","DashboardRow"),b(".dashboard-column","DashboardRow-column"),b(".dashboard-widget","DashboardRow-cell"),b(".dashboard-widget > .widget","DashboardWidget"),b(".DashboardWidget > h1","DashboardWidget-title"),b([".DashboardWidget > .scheduledEvents-controls",".DashboardWidget > .widget-controls",".DashboardWidget > .widgetControls"],"DashboardWidget-controls"),b([".DashboardWidget > .pagination",".DashboardWidget .scheduledEvents-datePagination",".PR > .pagination"],"DashboardWidget-pagination"),b([".DashboardWidget > .widget-filters",".DashboardWidget > div > .widget-filters",".DashboardWidget .scheduledEvents-dateDisplay"],"DashboardWidget-filters"),b(".table-striped:not(.links)","DT"),b(".calendarButton","DateTimeInput"),b(".UploadChooser","FileInput"),b(".imageEditor","ImageEditor"),b(".imageEditor-image","ImageEditor-main"),b(".imageEditor-aside","ImageEditor-aside"),b(".imageEditor-focus","ImageEditor-focus"),b(".imageEditor-edit","ImageEditor-edit"),b(".imageEditor-adjustment","ImageEditor-adjustment"),b(".imageEditor-sizes","ImageEditor-sizes"),b(".imageEditor-sizeButton","ImageEditor-size"),b(".imageEditor-sizePreview","ImageEditor-sizePreview"),b(".imageEditor-sizeLabel","ImageEditor-sizeLabel"),b(".imageEditor-resetCrop","ImageEditor-sizeReset"),b('.objectInputs[data-type="com.psddev.theme.Theme"]',"ThemeBundle"),b('.objectInputs[data-type="com.psddev.theme.Theme"] .TabBar-item[data-tab="Overrides"]',"ThemeBundle-tabOverrides"),b('[data-field="bundle"] .objectId-edit',"ThemeBundle-edit"),b('.Tab[data-tab-class="com.psddev.theme.ThemeFieldsTab"]',"ThemeBundle-inputs"),b([".ContentEditSites-owner",".ContentEditSites-access",".widget-urlsItem"],"InputRow"),b(".visibilityLabel","Label"),b(".link","Link"),b([".link.icon-action-delete",".link.icon-action-trash",".link.icon-action-cancel"],"is-red"),b(".links:not(.LinkList)","LinkTable"),b([".message",".message-info",".embargo-warning"],"Message"),b([".message.error",".message-error",".embargo-warning"],"is-error"),b([".message.warning",".message-warning"],"is-warning"),b([".message.success",".message-success"],"is-success"),b(".uploadable .message","is-upload"),b(".embargo-emphasis","is-emphasis"),b("body","Page"),b(".hasToolBroadcast","is-broadcasting"),b(".noToolUser","is-unauthenticated"),b(".toolBroadcast","Page-broadcast"),b(".toolHeader","Page-header"),b(".toolHeader-hasEnvironment","is-env"),b(".toolNav","Page-nav"),b(".toolTitle","Page-title"),b(".toolSearch","Page-search"),b(".toolUserSiteDisplay","Page-site"),b(".toolUserAvatarProfile","Page-avatar"),b(".toolUserWelcome","Page-user"),b(".toolEnv","Page-env"),b(".toolContent","Page-content"),b(".toolBackground","Page-background"),b(".widget-logIn","Page-login"),b(['[target="miscSearch"]','[target="profilePanel"]'],e=>e.setAttribute("data-popup-mode","noGap fromTop")),b([".objectId-select","rte2-enhancement-toolbar-change"],e=>e.setAttribute("data-popup-mode","fromRight")),b([".ContentSelector-create",".ContentSelector-edit",".rte2-enhancement-toolbar-edit",'form[target^="objectId-create-"]'],e=>e.setAttribute("data-popup-mode","noGap fromBottom")),b(".popup-objectId-edit-heading","Popup-heading"),b(".repeatableInputs","Repeatable"),b(".Repeatable > ul > li","Repeatable-item"),b(".Repeatable-item > .repeatableLabel","Repeatable-title"),b(".Repeatable > .addButtonContainer","Repeatable-controls"),b(".Repeatable-controls > .addButton","Repeatable-add"),b(".repeatableForm","RCIG"),b(".repeatableForm.addToTop","is-addToTop"),b(".repeatableForm-previewable","is-previewable"),b([".repeatableForm > ol",".repeatableForm > ul"],"RCIG-list"),b(".RCIG-list > li","RCIG-item"),b(".RCIG-item > .repeatableLabel","RCIG-title"),b(".RCIG-item > .removeButton","RCIG-remove"),b(".RCIG > .addButtonContainer","RCIG-controls"),b(".RCIG-controls > .addButton","RCIG-add"),b(".RCIG-controls > .addButtonSelectContainer","RCIG-addSelect"),b(".repeatableForm-weighted","is-weighted"),b(".repeatableForm-weightResetButton","RCIG-resetWeights"),b(".repeatableForm-itemWeights","RCIG-weightBar"),b(".repeatableForm-itemWeight","RCIG-weightBarItem"),b(".repeatableForm-itemWeight-marker","RCIG-weightBarMarker"),b(".repeatableForm-itemWeightHandle","RCIG-weightBarHandle"),b(".repeatableLabel-weightLabel","RCIG-weightLabel"),b(".repeatableLabel-color","RCIG-weightColor"),b([".repeatableObjectId",".repeatableDropdown"],"RCS"),b(".repeatableObjectId.addToTop","is-addToTop"),b([".repeatableObjectId > ol",".repeatableObjectId > ul",".repeatableDropdown > ol",".repeatableDropdown > ul"],"RCS-list"),b(".RCS-list > li","RCS-item"),b(".RCS-item > .removeButton","RCS-remove"),b([".repeatableObjectId > .addButtonContainer",".repeatableDropdown > .addButtonContainer"],"RCS-controls"),b(".RCS-controls > .addButton","RCS-add"),b(".repeatableText","RTI"),b([".repeatableText > ol",".repeatableText > ul"],"RTI-list"),b(".RTI-list > li > .removeButton","RTI-remove"),b(".repeatableText > .addButtonContainer","RTI-add"),b(".searchInput","SearchInput"),b([".Admin-nav .SearchInput",'.Popup[name="siteSwitch"] .SearchInput'],"is-filter"),b(".searchResult-container","SearchResult"),b(".searchResult-view","SearchResult-view"),b(".searchResult-views","SearchResult-views"),b(".searchResult-items","SearchResult-items"),b(".searchResult-pagination","SearchResult-pagination"),b(".searchResult-fields","SearchResult-fields"),b(".searchResult-sorts","SearchResult-sorts"),b(".searchResult-list","SearchResult-list"),b(".searchResult-mixed","SearchResult-mixed"),b(".searchResult-images","SearchResult-images"),b(".searchResult-selectionReset","SearchResult-selectionReset"),b(".searchResult-actions","SearchResult-actions"),b(".searchResult-actions-body","SearchResult-actions-body"),b(".searchResult-action-simple","SearchResult-action"),b(".searchPagination","SearchResult-pagination"),b(".searchSorter","SearchResult-sorts"),b(".searchResultImages","SearchResult-images"),b(".searchResultList","SearchResult-items"),b(".queryRestrictions","SearchResult-query"),b('.Popup[name="siteSearchTermAnalyticsPage"]',"SiteSearchTermAnalytics"),b('.Popup[name="siteSearchTermAnalyticsPage"] .Widget-controls',"SiteSearchTermAnalytics-controls"),b('.Popup[name="siteSearchTermAnalyticsPage"] .pagination',"SiteSearchTermAnalytics-results"),b(".queryField","QueryField"),b(".queryField_frame","QueryField-frame"),b(".queryField_frame .searchControls","QueryField-searchControls"),b(".queryField_frame .searchForm","QueryField-searchForm"),b(['.widget[name="searchAdvancedFull"]','.Widget[name="searchAdvancedFull"]'],"SearchWidget"),b('.SearchWidget[name="miscSearch"]',"is-global"),b(".SearchWidget > h1","SearchWidget-title"),b(".widget-queryField > h1","SearchWidget-title"),b(".searchForm","SearchWidget-form"),b(".searchHistory","SearchWidget-history"),b(".searchRecent","SearchWidget-recent"),b(".searchSaved","SearchWidget-saved"),b(".searchFilters","SearchWidget-controls"),b(".searchFilters .searchInput","SearchWidget-query"),b(".searchFiltersType","SearchWidget-type"),b([".searchFilters > .search-reset",".searchFilters > .action-cancel"],"SearchWidget-reset"),b(".searchFilter","SearchWidget-filter"),b(".searchFilterItem","SearchWidget-filterItem"),b(".searchFilter-advancedQuery","is-advanced"),b(".searchFilter-date","is-date"),b(".searchFilter-record","is-record"),b(".searchCreate","SearchWidget-create"),b(".searchResult","SearchWidget-result"),b(".searchResultTable","SearchResult-table"),b(".WidgetSearchAdvancedQuery","SearchWidgetAdvanced"),b(".WidgetSearchAdvancedQuery .fixedScrollable","SearchWidgetAdvanced-scrollpane"),b(".standardForm","StandardForm"),b([".DashboardTabSelect > ul",".tabs"],"TabBar"),b(".TabBar > li:not(.TabBar-menu)","TabBar-item"),b([".objectInputs",".tabbed"],"TC"),b(".tabbed > [data-tab]","TC-panel"),b(".searchResultTaxonomy","Taxonomy"),b(".searchResultTaxonomyColumn","Taxonomy-column"),b(".searchResultTaxonomyChildren","Taxonomy-children"),b(".searchResultTaxonomyExpand","Taxonomy-expand"),b("input.secret","is-secret"),b(".widget-urlsRepeatable","UrlsWidget"),b(".widget-urlsItemLabel","UrlsWidget-itemLabel"),b(".EditFieldUpdateViewers","Viewers"),b(".EditFieldUpdateViewers-some","Viewers-some"),b(".EditFieldUpdateViewers-none","Viewers-none"),b(".EditFieldUpdateViewers-viewer","Viewers-viewer"),b(".calendar-week","Week"),b(".Week > .calendarRow","Week-row"),b(".Week-row > .calendarDay","Week-day"),b(".Week-day > .calendarDayOfWeek","Week-dow"),b(".Week-day > .calendarDayOfMonth","Week-dom"),b(".Week-row > .calendarCell","Week-content"),b(".calendar-month","Month"),b(".Month > .calendarRow","Month-row"),b(".Month-row > .calendarDay","Month-day"),b(".Month-day > .calendarDayOfWeek","Month-dow"),b(".Month-day > .calendarDayOfMonth","Month-dom"),b(".Popup-content > .frame.loaded",e=>{for(const t of e.children){if(t.classList.contains("Widget"))return;if(t.classList.contains("widget"))return void t.classList.add("Widget")}const t=e.getAttribute("name");e.classList.add("miscSearch"===t||t.startsWith("objectId-")&&t.endsWith("-select")?"SearchWidget":"Widget")}),window.DISABLE_VIDEO_EDITOR_UI||(b('[data-type="brightspot.elemental.AwsElementalVideoProvider"]',"VideoEditor"),b('[data-type="brightspot.elemental.AwsElementalVideoInputWrapper"]',"VideoEditor-fileContainer"),b('[data-type="brightspot.elemental.AwsElementalImageOverlayWrapper"]',"VideoEditor-InputOverlay"),b(".VideoEditor-fileContainer .filePreview > div:first-child","FilePreview-actions"),b('.CIG-row[data-field-name="colorCorrector"]',"VideoEditor-InputColors"),b('[data-type="brightspot.elemental.AwsElementalColorCorrector"]',"VideoEditor-InputColors-group")),b([".Admin .widget",".ContentEdit-bottom .widget",".ContentEdit-left .widget",".ContentEdit-right .widget:not(.widget-publishing)",'.Page-content > .widget:not([name="searchAdvancedFull"])',".Popup-content > .frame.loaded:not(.Widget):not(.SearchWidget) > .widget"],"Widget"),b([".Widget > h1:not(.ContentEdit-title)",".Admin-main > .Widget > h2",".Admin-nav > .Widget > h2",".Page-content > .Widget > h2:not(.BuildInformation-resources)",".Popup-content .Widget > h2"],"Widget-title"),b([".Widget > .widget-controls",".Widget > .widgetControls"],"Widget-controls"),b(".CommunityWidget .widget-filters","CommunityWidget-filters"),b(".PR > .widget-filters","PR-filters"),b(".PR > .pagination","PR-pagination"),b(".inputWordCount","CIG-wordCount"),a.plugin2("toggleable",{change:function(){return this.$caller[0].dispatchEvent(new Event("change")),this.$caller},toggle:function(){return this.$caller[0].dispatchEvent(new Event("change")),this.$caller}})},60958(e,t,o){"use strict";(0,o(32246).A)(['.ContentEdit-left input[type="checkbox"]','.SearchWidget-filter input[type="checkbox"]'],e=>{const t=()=>{e.setAttribute("title",e.checked?window.BRIGHTSPOT?.ui.tooltips.toggleOff:window.BRIGHTSPOT?.ui.tooltips.toggleOn)};t(),e.addEventListener("change",t)})},37592(e,t,o){"use strict";(0,o(41044).A)("input.color",async()=>{await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(1950),o.e(2882)]).then(o.bind(o,67177))})},95033(e,t,o){"use strict";o.d(t,{A:()=>d}),o(67219),o(44764),o(84978),o(13722),o(39589),o(25809),o(91672),o(92280);var n=o(5292),i=o(95628),r=o(40627),a=o(89561),s=o(9968),c=o(88903);let p,b=0;const M=window.BRIGHTSPOT?.ui?.tooltips;class d{constructor(e,t){this.handleIntersect=(e,t)=>{for(let t of e)!1===t.isIntersecting?this._list.style.display="none":this._list.style.display="block"},this._select=e,this._reorderSelectOptions(),this._getOptionsIndex=0,this._getOptionsUrl="function"==typeof t.getOptionsUrl&&t.getOptionsUrl,this._modifier=t.modifier,this._duplicates=new Map,this._createNewListItem=null,this._createNewList=null,this._fetchOnce=this._select.hasAttribute("data-fetch-once"),this._optionsLoaded=!1,this._list=(0,n.A)("ul",{id:"_cb"+b++,className:"ComboInput-list","aria-label":e.getAttribute("aria-label")||void 0,role:"listbox","aria-multiselectable":e.hasAttribute("multiple")||void 0,onclick:e=>{if(!e.target.getAttribute("data-create")){e.preventDefault(),e.stopPropagation();const t=e.target.classList.contains("ComboInput-check")?e.target.parentElement:e.target;t.classList.contains("ComboInput-option")&&this.updateValue(t.getAttribute("data-value"),t.getAttribute("data-missing-option"))}},onmouseover:e=>{const t=e.target.getAttribute("data-create")?e.target.closest(".ComboInput-option"):e.target;t.classList.contains("ComboInput-option")&&this._highlightOption(t,0)}}),this._label=(0,n.A)("div",{className:"ComboInput-label",dataset:{placeholder:e.getAttribute("data-placeholder")||e.getAttribute("placeholder")||""}});let o=e.closest(".SearchWidget-filter");if(o){let e=(0,i.A)(o,'input[type="checkbox"]');e&&e.closest(".SearchWidget-filter")===o&&(this._missing=e)}this.updateList();const a=(0,r.A)(this._list,".ComboInput-heading");for(let e=0;e<a.length;e++)a[e].getAttribute("data-value")&&this.updateSelection(a[e]);if(this.updateLabel(),this._filter=(0,n.A)("input",{type:"text",className:"ComboInput-filter","aria-autocomplete":"list","aria-controls":this._list.id,placeholder:window.CONTENT_SELECT_PLACEHOLDER?window.CONTENT_SELECT_PLACEHOLDER:"Search",oninput:this.filterList.bind(this)}),this._container=(0,n.A)("div",{id:e.id||void 0,className:"ComboInput",tabIndex:e.tabIndex||0,role:"combobox","aria-label":e.getAttribute("aria-label")||void 0,"aria-haspopup":"listbox","aria-owns":this._list.id,"aria-expanded":"false","aria-required":e.getAttribute("aria-required")||void 0,onclick:e=>{e.preventDefault(),this.toggleList()},onkeydown:e=>{if(e.ctrlKey||e.altKey||e.metaKey)return;const t=this._getActiveOption(),o="true"===this._container.getAttribute("aria-expanded");switch(e.key){case"Enter":if(this._select.classList.contains("is-readOnly"))return e.preventDefault(),void e.stopPropagation();if(!o)return this.showList(),void e.preventDefault();if(t){if(t.classList.contains("nested"))return e.preventDefault(),void this.toggleCreateNewList();if(t.dataset.sublist||t.dataset.create){const e=t.querySelector("a.objectId-create");e&&(e.click(),this.hideList())}else this.updateValue(t.getAttribute("data-value"),t.getAttribute("data-missing-option")),this.hideList();this._select.multiple||this._container.focus()}return e.preventDefault(),void e.stopPropagation();case"Escape":return void(this._container.matches('[aria-expanded="true"]')&&(this.hideList(),this._container.focus(),e.preventDefault(),e.stopPropagation()));case"ArrowUp":return this.showList(),this._highlightOption(t||this._list.firstChild,-1),this.scrollList(),e.preventDefault(),void e.stopPropagation();case"ArrowDown":return this.showList(),this._highlightOption(t||this._list.lastChild,1),this.scrollList(),e.preventDefault(),void e.stopPropagation();case"ArrowRight":return void this.focusFavorite();case"Tab":return void this.hideList()}this===p||e.shiftKey||this.showList()}},this._label,this._filter,this._list,(0,n.A)("span",{class:"ComboInput-icon","aria-hidden":!0})),!this._container.getAttribute("aria-label")||"type"===this._container.getAttribute("aria-label").toLowerCase()){const t=e.closest(".CIG-small")||e.closest(".CIG-large");if(t){let e=t.previousElementSibling;if(e&&!e.classList.contains("CIG-label")&&e.classList.contains("CIG-note")&&(e=e.previousElementSibling),e&&e.classList.contains("CIG-label")){const t=e.querySelector("label");if(t){const e=t.innerText;e&&this._container.setAttribute("aria-label",e)}}}}e.removeAttribute("id"),this._select.multiple?(this._container.classList.add("is-multiple"),this._container.setAttribute("aria-label",`${this._container.getAttribute("aria-label")}, ${window?.BRIGHTSPOT?.ui?.tooltips?.combo?.multi}`)):this._select.addEventListener("change",e=>{this.updateValue(e.target.value)});const s=new MutationObserver(t=>{let o;for(const n of t){for(const t of n.removedNodes)if(t===e)return void s.disconnect();"data-placeholder"!==n.attributeName&&"placeholder"!==n.attributeName||(o=!0)}o&&(this._label.dataset.placeholder=this._select.dataset.placeholder||this._select.getAttribute("placeholder")),this._select.value&&this._missing&&(this._missing.checked=!1,this._missing.dispatchEvent(new CustomEvent("change",{bubbles:!0}))),this.updateList(),this._setFocus(),this.updateLabel()}).observe(e,{childList:!0,subtree:!0,attributeFilter:["data-placeholder","placeholder"]});e.isConnected&&(e.hidden=!0,e.parentNode.insertBefore(this._container,e.nextSibling))}destroy(){this._container.remove(),this._list.remove(),this._select.hidden=!1;for(const e of[...this._select.classList])e.startsWith("_")&&this._select.classList.remove(e)}_reorderSelectOptions(){this._select.firstChild;for(const e of Array.from((0,r.A)(this._select,"option")).reverse())if(e.selected){const t=e.closest("optgroup")||this._select;t.insertBefore(e,t.firstChild)}}scrollList(){const e=this._getActiveOption();if(!e)return;const t=this._list.getBoundingClientRect(),o=e.getBoundingClientRect();o.bottom>t.bottom?e.scrollIntoView(!1):o.top<t.top&&e.scrollIntoView(!0)}toggleSelection(e,t){e.classList.toggle("is-checked");const o=t.getAttribute("data-value"),n=(0,r.A)(this._list,`.ComboInput-option[data-source="${CSS.escape(o)}"]`);for(let t=0;t<n.length;t++)n[t].setAttribute("aria-selected",e.classList.contains("is-checked"));this.updateLabel()}updateSelection(e){if(e){const t=e.getAttribute("data-value"),o=CSS.escape(t);let n=(0,r.A)(this._list,`.ComboInput-option[data-source="${o}"]:not([data-is-hidden])`);if(0===n.length)return void e.setAttribute("data-hidden",!0);const a=(0,r.A)(this._list,`.ComboInput-option[data-source="${o}"][aria-selected="true"]`);(0,i.A)(e,".ComboInput-selectOption").classList.toggle("is-checked",n.length>0&&n.length===a.length)}}updateList(){if(this._select.dataset.collapseDuplicateOptions)if(this._select.hasAttribute("multiple")){const e=Array.from(this._select.childNodes);for(const t of e){if(this._duplicates.has(t.value))continue;const o=e.filter(e=>e.textContent===t.textContent);o.length>1&&o.forEach((e,t)=>{0===t?this._duplicates.set(e.value,{display:!0,text:e.textContent}):this._duplicates.set(e.value,{display:!1,text:e.textContent})})}}else console.warn('Select element has "data-collapse-duplicate-options" without a "multiple" attribute.',this._select);this._list.innerHTML="",this._createOptions(this._select,0)}_createOptions(e,t,o,a){a||(a=0);for(const i of e.childNodes)switch(i.tagName){case"OPTGROUP":{const e=`${this._list.id}-g${a++}`,o=(0,n.A)("ul",{className:"ComboInput-optionGroup",role:"group","aria-labelledby":e}),r=(0,n.A)("div",{id:e,className:"ComboInput-heading"},i.label),s=(0,n.A)("li",r,o);i.getAttribute("data-select-option")&&(o.dataset.selectOption=i.dataset.selectOption,r.dataset.value=i.getAttribute("value"),r.appendChild((0,n.A)("span",{className:"ComboInput-selectOption",onclick:e=>{this.toggleSelection(e.target,r)}}))),this._list.appendChild(s),t=this._createOptions(i,t,o,a);break}case"OPTION":{let r=i.dataset.dropDownHtml||i.dataset.labelHtml;if(i.getAttribute("data-create"))if(i.getAttribute("data-create-types")&&!i.closest(".SearchWidget-filter")){const e=JSON.parse(i.dataset.createTypes);this._createNewList=(0,n.A)("ul",{role:"listbox",hidden:"true"},e.map(e=>(0,n.A)("li",{className:"ComboInput-option","data-sublist":!0,role:"none",id:`${this._list.id}-o${t++}`},(0,n.A)("a",{className:"objectId-create nested",tabIndex:"-1",href:e.href,target:`create-new-object-${this._list.id}`,"data-create":!0,"data-popup-mode":"noGap fromBottom",innerHTML:e.label||""})))),this._createNewListItem=(0,n.A)("li",{className:"ComboInput-option nested","data-create":!0,role:"button","aria-expanded":!1,"aria-label":i.label,id:`${this._list.id}-o${t++}`,onclick:e=>{"A"!==e.target.tagName&&(e.preventDefault(),e.stopPropagation(),this.toggleCreateNewList(),this._filter.focus())}},(0,n.A)("span",{innerHTML:i.label||"",className:"ComboInput-option-nestedLabel","data-create":!0},(0,n.A)("span",{className:"ComboInput-option-arrow"},(0,n.A)("span",{class:"ComboInput-option-arrow-icon","aria-hidden":!0}))),this._createNewList),this._list.insertBefore(this._createNewListItem,this._list.firstElementChild)}else i.getAttribute("data-create")&&!i.closest(".SearchWidget-filter")&&this._list.insertBefore((0,n.A)("li",{id:`${this._list.id}-o${t++}`,className:"ComboInput-option",role:"option","aria-selected":!1,"data-create":!0},(0,n.A)("span",{class:"ComboInput-check","aria-hidden":!0}),(0,n.A)("a",{className:"objectId-create",href:i.getAttribute("data-href"),target:`create-new-object-${this._list.id}`,"data-create":!0,"data-popup-mode":"noGap fromBottom",innerHTML:i.label||""})),this._list.firstElementChild);else{const a=(0,n.A)("li",{id:`${this._list.id}-o${t++}`,className:"ComboInput-option",role:"option","aria-selected":!(this._missing&&this._missing.checked)&&(i.selected||i.value===e.value),"data-value":i.value},(0,n.A)("span",{class:"ComboInput-check","aria-hidden":!0}),r?(0,n.A)("div",{className:"ComboInput-option-iframe",innerHTML:r}):i.label||"");if(a.textContent||!e.dataset.placeholder&&!e.getAttribute("placeholder")||a.appendChild((0,n.A)("div",{className:"ComboInput-option-iframe"},(0,n.A)("span",{className:"ContentSelector-placeholder"},e.dataset.placeholder||e.getAttribute("placeholder")))),this._duplicates.has(i.value)&&!this._duplicates.get(i.value).display&&a.classList.add("is-hidden"),!i.label&&a.children.length<=1&&(a.classList.add("is-empty"),a.setAttribute("aria-label",M?.combo?.empty)),"is-hidePlaceholder"===this._modifier){const e=""===i.value&&a.querySelector(".ContentSelector-placeholder");(a.classList.contains("is-empty")||e||"true"===i.dataset.allTypes)&&(a.role="presentation",a.setAttribute("aria-selected","false"),a.classList.add("ComboInput-placeholder-option"),a.classList.remove("ComboInput-option"))}if(this._duplicates.has(i.value)&&!this._duplicates.get(i.value).display&&a.classList.add("is-hidden"),i.getAttribute("data-can-favorite")){let e="ComboInput-option-favorite",t=M?.action?.unfavorite;if(!i.parentElement.getAttribute("data-favorites")){const o=this._select.querySelector("optgroup[data-favorites]");o&&o.querySelector(`option[value="${CSS.escape(i.value)}"]`)||(e+=" is-unstarred",t=M?.action?.favorite)}const o=(0,n.A)("button",{className:e,type:"button","data-id":i.value,title:t,"aria-label":t,onkeydown:async e=>{switch(e.code){case"ArrowLeft":return void this._filter.focus();case"ArrowUp":case"ArrowDown":return this._filter.focus(),this.showList(),this._highlightOption(this._getActiveOption(),"ArrowUp"===e.code?-1:1),void this.scrollList();case"Escape":return this.hideList(),this._container.focus(),void e.stopPropagation();case"Tab":return this._filter.focus(),void this.hideList()}},onclick:async e=>{let t;this._list.querySelectorAll(`\n .ComboInput-option-favorite[data-id="${CSS.escape(i.value)}"]`).forEach(e=>{const t=e.classList.contains("is-unstarred")?M?.action?.unfavorite:M?.action?.favorite;e.title=t,e.nextElementSibling.textContent=t,e.classList.toggle("is-unstarred"),e.setAttribute("aria-label",t)});let o=i.getAttribute("data-typeids");if(o){let e=o.split(",").join("&typeIds=");t=CONTEXT_PATH+"update-dropdown-favorites?action=update&typeIds="+e+"&id="+i.value}else t=CONTEXT_PATH+"update-dropdown-favorites?action=update&typeIds="+i.value;const n=new Headers;n.append("Brightspot-CSRF",c.A.get("bsp.csrf"));try{const e=await fetch(t,{method:"POST",headers:n});if(e.redirected&&e.url.includes(window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.auth.LogInPage"]))throw new Error("ComboInput: Redirected response received for click.")}catch(e){console.error(e)}}},(0,n.A)("span",{class:"ComboInput-option-favorite-icon","aria-hidden":!0}));a.appendChild(o),a.appendChild((0,n.A)("span",{"aria-live":"polite",class:"screen-reader-only"}))}i.getAttribute("data-source")&&a.setAttribute("data-source",i.getAttribute("data-source")),o?o.appendChild(a):this._list.appendChild(a)}break}}if(this._missing&&!(0,i.A)(this._list,"[data-missing-option=true]")){const e=(0,n.A)("li",{id:`${this._list.id}-o${t++}`,className:"ComboInput-option",role:"option","data-missing-option":!0,"aria-selected":this._missing.checked},(0,n.A)("span",{class:"ComboInput-check","aria-hidden":!0}),window.SEARCH_FILTER_IS_MISSING?window.SEARCH_FILTER_IS_MISSING:"Is Missing");this._list.firstElementChild.getAttribute("data-value")?this._list.insertBefore(e,this._list.firstElementChild):this._list.insertBefore(e,this._list.firstElementChild.nextElementSibling)}if(this._select.multiple&&this._select.getAttribute("data-allow-select-all")){const e=(0,n.A)("li",{id:`${this._list.id}-o${t++}`,className:"ComboInput-option",role:"option","data-select-all":!0,"aria-selected":(0,r.A)(this._list,"[aria-selected=true]").length===this._getOptions().length},(0,n.A)("span",{class:"ComboInput-check","aria-hidden":!0}),this._select.getAttribute("data-select-all-label"));this._list.insertBefore(e,this._list.firstElementChild)}return t}_getOptions(){return(0,r.A)(this._list,".ComboInput-option")}_highlightOption(e,t){if(!e)return;const o=[];for(const e of this._getOptions())e.classList.remove("is-active"),e.hidden||e.parentElement.hidden||o.push(e);const n=o.length;let i;for(let t=0;t<n;++t)if(e===o[t]){i=t;break}for(i=(i+t)%n;i<0;)i+=n;const r=o[i];r&&(this._filter.setAttribute("aria-activedescendant",r.id),r.classList.add("is-active"))}_getActiveOption(){return(0,i.A)(this._list,".ComboInput-option.is-active")}_setFocus(){let e=0;if(this._list.querySelector('li[aria-selected="true"]')){const t=this._getOptions();for(;e<t.length&&t[e].matches('[aria-selected="false"]');)e++}this._highlightOption((0,i.A)(this._list,".ComboInput-option"),e)}updateLabel(){this._label.innerHTML="",this._selectParent=this._select.parentElement,this._actionCreateEl=this._selectParent?this._selectParent.querySelector(".action.action-create"):null;const e=(0,i.A)(this._list,"[data-select-all=true][aria-selected=true]");if(e)this._label.appendChild((0,n.A)("div",{className:"ComboInput-selected"},e.textContent||""));else{const e=Array.prototype.filter.call(this._getOptions(),e=>"true"===e.getAttribute("aria-selected")&&!e.getAttribute("data-no-permission")),t=[];for(const o of e){const e=o.cloneNode(!0),n=this._select.closest(".SearchWidget-filterItem");let r;if(n&&this._select.classList.toggle("is-readOnly",n.parentNode.classList.contains("is-multiple")&&e.getAttribute("data-value")),e.querySelector("[data-id]")?.remove(),e.getAttribute("data-missing-option")){let t=(0,i.A)(this._list,'.ComboInput-option[data-value=""]');t||(t=(0,i.A)(this._list,".ComboInput-placeholder-option")),r=e.textContent+": "+t?.innerHTML}else r=e.innerHTML;r&&!t.some(e=>e===r)&&t.push(r)}let o;const r=t.length;r>0&&(this._select.closest(".CIG-row")?o=t.join(", "):(o=t[0],r>1&&(o+=" +"+(r-1)))),o&&(this._label.appendChild((0,n.A)("div",{className:"ComboInput-selected",innerHTML:o})),this._actionCreateEl&&this._actionCreateEl.setAttribute("aria-label",`${this._actionCreateEl.innerText.toLowerCase()} ${this._label.innerText}`))}}async populateFavorites(){if(this._select.querySelector("option[data-can-favorite]")){const t=this._select.parentNode.querySelector("input[data-typeids]"),o=this._select.getAttribute("data-typeIds");var e=this._select.options;const n=Array.from(e).map(e=>e.value),i=Array.from(e).some(e=>e.hasAttribute("data-typeids"));let r,a=new FormData;if(t&&i){const e=t.getAttribute("data-typeIds").split(",");r=CONTEXT_PATH+"update-dropdown-favorites?action=getExisting&isFavoritedType=false",e.forEach(e=>{a.append("validTypeIds",e)})}else o||n?(r=CONTEXT_PATH+"update-dropdown-favorites?action=getExisting&isFavoritedType=true",(o?o.split(","):n).forEach(e=>{a.append("validTypeIds",e)})):r=CONTEXT_PATH+"update-dropdown-favorites?action=getExisting&isFavoritedType=true";const s=new Headers;s.append("Brightspot-CSRF",c.A.get("bsp.csrf"));try{const e=await fetch(r,{method:"POST",headers:s,body:a});if(e.redirected&&e.url.includes(window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.auth.LogInPage"]))throw new Error("ComboInput: Redirected response received for favorites.");const t=await e.text(),o=(new DOMParser).parseFromString(t,"text/html").body.querySelector("optgroup"),n=this._select.querySelector("optgroup[data-favorites]");if(n){const e=Array.from(this._list.querySelectorAll('li[aria-selected="true"]')),t=new Set(e.map(e=>e.dataset.value));for(const e of this._select.querySelectorAll("option"))t.has(e.value)&&(e.selected=!0);n.remove()}if(o&&o.hasChildNodes()){const e=this._select.querySelector("option[data-all-types]"),t=this._select.querySelector("option[data-mirror]");e?e.after(o):t?t.after(o):this._select.prepend(o)}}catch(e){console.error(e)}}}focusFavorite(){const e=(this._getActiveOption()||this._list.lastChild).querySelector(".ComboInput-option-favorite");e&&e.focus()}showList(){if("true"===this._container.getAttribute("aria-expanded"))return!0;if(this._select.classList.contains("is-readOnly"))return;p&&p.hideList(),this._container.style.width=`${this._container.getBoundingClientRect().width}px`,this._container.setAttribute("aria-expanded","true"),this._filter.value="",this._filter.focus(),this.filterList(),this._setFocus();for(const e of(0,r.A)(this._list,".ComboInput-heading"))e.getAttribute("data-value")&&this.updateSelection(e);p=this,this._list.classList.add("is-expanded"),this._tether=new s.A(this._container,this._list);this._observer||(this._observer=new IntersectionObserver(this.handleIntersect,{root:null,rootMargin:"0px",threshold:0})),this._observer.observe(this._container)}hideList(){if("false"===this._container.getAttribute("aria-expanded"))return!0;if(this._observer&&this._observer.unobserve(this._container),this._tether&&this._tether.destroy(),this._filter.value="",this._filter.dispatchEvent(new Event("input",{bubbles:!0})),p=null,this._container.style.width="","true"===this._createNewListItem?.getAttribute("aria-expanded")&&this.toggleCreateNewList(),this._container.setAttribute("aria-expanded","false"),this._list.classList.remove("is-expanded"),this._select.multiple){const e=new Set;for(const t of this._getOptions())"true"!==t.getAttribute("aria-selected")||t.getAttribute("data-select-all")||e.add(t.getAttribute("data-value"));let t=!1;for(const o of(0,r.A)(this._select,"option")){const n=e.has(o.value);o.selected!==n&&(t=!0),o.selected=n}this._reorderSelectOptions(),t&&this._select.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}this._select.dispatchEvent(new CustomEvent("combo-input:hide",{bubbles:!0}))}toggleList(){"true"===this._container.getAttribute("aria-expanded")?this.hideList():this.showList()}toggleCreateNewList(){if("true"===this._container.getAttribute("aria-expanded")&&"true"===this._createNewListItem.getAttribute("aria-expanded")){this._createNewList.setAttribute("hidden",""),this._createNewListItem.setAttribute("aria-expanded","false");for(const e of this._createNewList.children)e?.setAttribute("role","none")}else if("false"===this._createNewListItem.getAttribute("aria-expanded")){this._createNewList.removeAttribute("hidden"),this._createNewListItem.setAttribute("aria-expanded","true");for(const e of this._createNewList.children)e?.setAttribute("role","option")}}async filterList(){const e=this._filter.value,t=this._getOptionsUrl?this._getOptionsUrl(this._filter.value):null;if(!t||this._fetchOnce&&this._optionsLoaded)if(e&&!this._select.getAttribute("data-dynamic-value-generator")){const t=new RegExp(e.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");let o;for(const e of this._getOptions())t.test(e.textContent)?(e.hidden=!1,o||(o=!0,this._highlightOption(e,0))):e.hidden=!0}else{for(const e of this._getOptions())e.hidden=!1;this.populateFavorites()}else{try{++this._getOptionsIndex;const e=this._getOptionsIndex,o=this._fetchOnce?this._getOptionsUrl(""):t,n=await fetch(o,{credentials:"include"});if(n.redirected&&n.url.includes(window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.auth.LogInPage"]))throw new Error("ComboInput: Redirected response received for options update.");const i=await n.text();if(this._getOptionsIndex===e){const e=[],t=new Set;!this._select.value&&this._select.firstChild&&(this._select.firstChild.selected=!0);for(const o of(0,r.A)(this._select,"option"))o.selected&&(e.push(o),t.add(o.value));this._select.innerHTML=i;for(const e of(0,r.A)(this._select,"option"))t.has(e.value)&&e.remove();const o=this._select.firstChild;for(const t of e)this._select.insertBefore(t,o);this._fetchOnce&&(this._optionsLoaded=!0)}}catch(e){console.error(e)}e&&0!==e.trim().length||this.populateFavorites()}}updateValue(e,t){const o=(0,i.A)(this._list,"[data-select-all=true]");if(this._select.multiple){if(o&&e===o.getAttribute("data-value"))o.setAttribute("aria-selected","true"!==o.getAttribute("aria-selected")),(0,r.A)(this._list,".ComboInput-option:not([data-select-all])").forEach(e=>{e.setAttribute("aria-selected",o.getAttribute("aria-selected"))});else{const t=CSS.escape(e),n=(0,i.A)(this._list,`.ComboInput-option[data-value="${t}"]`);if(!n)return;if(this._duplicates.has(e)){for(const e of this._duplicates.keys())if(this._duplicates.get(e).text===n.textContent){const t=(0,i.A)(this._list,`.ComboInput-option[data-value="${CSS.escape(e)}"]`);t.setAttribute("aria-selected","true"!==t.getAttribute("aria-selected"))}}else n.setAttribute("aria-selected","true"!==n.getAttribute("aria-selected"));o&&o.setAttribute("aria-selected",(0,r.A)(this._list,"[aria-selected=true]").length===this._getOptions().length);const a=n.getAttribute("data-source");null!=a&&this.updateSelection((0,i.A)(this._list,`.ComboInput-heading[data-value="${CSS.escape(a)}"]`))}this._filter.focus(),this._filter.select()}else{if(t){(0,i.A)(this._list,"[data-missing-option=true]").setAttribute("aria-selected",!this._missing.checked);const e=Array.from(this._getOptions()).find(e=>"option"===e.getAttribute("role")&&"true"===e.getAttribute("aria-selected")&&"true"!==e.getAttribute("data-missing-option"));e&&e.setAttribute("aria-selected","false")}else for(const t of this._getOptions())"option"===t.getAttribute("role")&&(e===t.getAttribute("data-value")?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"));this.hideList(),t?(this._missing.checked?this._missing.checked=!1:(this._missing.checked=!0,this._select.value=e),this._missing.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this._select.value!==e?(this._select.value=e,this._select.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._missing&&(this._missing.checked=!1,this._missing.dispatchEvent(new CustomEvent("change",{bubbles:!0})))):this._missing&&this._missing.checked&&(this._missing.checked=!1,this._missing.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}this.updateLabel()}}window.addEventListener("click",(0,a.A)(e=>{p&&!p._container.contains(e.target)&&p.hideList()}))},49080(e,t,o){"use strict";o(84978),o(25809);var n=o(32246),i=o(9968);(0,n.A)(".CommunityWidget",e=>{const t=e.querySelectorAll(".LinkTable td form");t.length&&t.forEach(e=>{const t=e.querySelector(".CommunityWidget-actionsToggle"),o=e.querySelector(".CommunityWidget-actionsList");t.addEventListener("click",n=>{i.A.toggle(t,o,()=>e.classList.toggle("is-actionsMenuOpen"))}),o.querySelectorAll("li button").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault();const o=e.closest("form");o.querySelector('input[name^="community.widget.workflow-transition"').value=e.getAttribute("value"),o.submit()})})})})},12857(e,t,o){"use strict";o(67219),o(44764),o(84978),o(39589),o(25809);var n=o(25734),i=o(79492),r=o.n(i),a=o(5292),s=o(95628),c=o(40627),p=o(68243),b=o(45594),M=o(47554),d=o(32246),l=o(36711),z=o(9968),u=o(27170),O=o(26594),A=o(47626),f=(o(13722),o(91672),o(7095));class h{static gcd(e,t){return t?h.gcd(t,e%t):e}static getObserver(){return this._observer??=new IntersectionObserver(e=>{for(const t of e){const e=t.target.querySelector(".Preview-overlayTooltip");if(t.isIntersecting)e?.setAttribute("position","top");else{if(null===t.rootBounds)return;const o=t.intersectionRect,n=t.boundingClientRect;n.bottom>o.bottom?e?.setAttribute("position","top"):n.top<o.top&&e?.setAttribute("position","bottom")}}},{threshold:1}),this._observer}constructor(){this.getPreviewFrame=e=>{let t;return e?t=document.querySelector(`iframe[data-container-id="${e}"]`):(t=document.querySelector(".ContentEdit-previewDisplay iframe:first-of-type"),t||(t=document.querySelector(".PreviewFrame-typeDisplay iframe:first-of-type"))),t},this.updateOverlays=(0,O.A)(()=>{const e=this.getPreviewFrame(this._previewContainerId);Object.assign(this._overlayFrame.style,{transform:e.style.transform,width:e.style.width}),this.Overlays?.forEach(e=>{this.setDimensions(e)})})}async initialize(e){this._previewContainerId=e.previewContainerId,this._allOverlays=e.overlays,this._pauseUpdate=!1;const t=document.createElement("iframe");t.src="about:blank",t.style="visibility:hidden;",t.setAttribute("onload","this.style.visibility='visible';"),t.scrolling="no",t.classList.add("Preview-overlayFrame"),t.setAttribute("role","none");const o=this.getPreviewFrame(this._previewContainerId);o.parentNode.insertBefore(t,o.nextSibling),t?.contentDocument?.body.classList.add("overlay-hidden"),this._overlayWindow=t.contentWindow,h._previewOverlays.set(this._previewContainerId,this._overlayWindow),this._overlayFrame=t,Object.assign(t.style,{background:"none",backgroundColor:"transparent",transform:o.style.transform,width:o.style.width}),this._viewport=parseInt(o.style.width,10),this._deferred=!1,this._overlayWindow.addEventListener("message",async({data:e})=>{if("object"!=typeof e)return;const t=e.type;if("BSP.ContentEdit.UpdateOverlayBehaviors"===t){const t=this.Overlays.get(e.key);this.update(t,t.element,{behaviors:e.behaviors})}else"BSP.Preview.UpdateOverlays"===t?e.overlays.forEach(e=>{const{id:t,name:o}=e;this.Overlays.get(`${t}/${o}`).hasFormField=!0}):"BSP.Preview.UpdateInitToggle"===t&&(this._deferred=e.deferPreviewInit)}),this._overlayWindow.addEventListener("click",e=>{if(e.target.closest(".Preview-overlay")){const t=e.target.closest(".Preview-overlay"),o=t.dataset.id+"/"+t.getAttribute("data-type"),i=this.Overlays.get(o);i&&(this.update(i,i.element,{isSelected:!0}),this.Overlays.forEach((e,t)=>{e.element&&t!==o&&this.update(e,e.element,{isSelected:!1,isHover:!1})}),n(i))}else this.Overlays?.forEach(e=>{this.update(e,e.element,{isSelected:!1})})});const n=e=>{let t=e.parentKey,o=e,n=[];const{left:i,right:r}=e.element.getBoundingClientRect(),a=this._overlayWindow.innerWidth,s=i-e.depth*h._gapSize>=0&&r+e.depth*h._gapSize<=a;for(;null!==t;){const e=this.Overlays.get(t),i=o.element?.getBoundingClientRect();n.push(e),e.element&&this.update(e,e.element,{isVisible:!0},{updateWidth:s,maxWidth:a,top:i.top,bottom:i.bottom,left:i.left,right:i.right}),t=e.parentKey,o=e}};let i,r,a,s=new Set;const c=(0,f.A)(100,e=>{if(void 0===this._deferred||!0===this._deferred)return;const t=this._overlayWindow.document;if(e.target.closest(".Preview-overlay")){const o=[...t.elementsFromPoint(e.clientX,e.clientY)].find(e=>e.classList.contains("Preview-imageOverlay"));(o&&!o.isSameNode(a)||!o&&a)&&t.querySelectorAll(".Preview-imageOverlay.is-visible").forEach(e=>e.classList.remove("is-visible")),o&&o.classList.add("is-visible"),a=o}else a&&t.querySelectorAll(".Preview-imageOverlay.is-visible").forEach(e=>e.classList.remove("is-visible"))});this._overlayWindow.addEventListener("mousemove",e=>{c(e)}),this._overlayWindow.addEventListener("mouseover",e=>{if(void 0===this._deferred||!0===this._deferred){const e=this.getPreviewFrame(this._previewContainerId);return this._deferred=!1,void e.contentWindow.postMessage({type:"BSP.Preview.Init"},"*")}const t=e.target,o=this._overlayWindow.document;this._pauseUpdate=!0;const a=o.querySelector(".Preview-overlay.is-selected");let c;if(a&&(c=a.dataset.id+"/"+a.getAttribute("data-type")),t.closest(".Preview-overlay")){const t=e.target.closest(".Preview-overlay"),o=t.dataset.id+"/"+t.getAttribute("data-type"),a=this.Overlays.get(o);if(a){this.update(a,a.element,{isHover:!0}),this.Overlays.forEach((e,t)=>{e.element&&t!==o&&this.update(e,e.element,{isHover:!1,isVisible:!1,isSelected:e.isSelected})});const e=i?.element.dataset.id+"/"+i?.element.getAttribute("data-type");i&&i.parentKey===o?(s.has(o)||s.add(o),n(r)):i&&e===a.parentKey&&s.has(o)?n(r):(n(a),r=a,s.clear(),s.add(o)),i=a}}else this.Overlays?.forEach((e,t)=>{e.element&&t!==c&&this.update(e,e.element,{isHover:!1,isVisible:!1,isSelected:e.isSelected})}),i=null,r=null,s.clear()}),t?.addEventListener("mouseleave",()=>{t?.contentDocument?.body.classList.remove("overlay-visible"),t?.contentDocument?.body.classList.add("overlay-hidden"),this._pauseUpdate=!1}),t?.addEventListener("mouseenter",()=>{t?.contentDocument?.body.classList.add("overlay-visible"),t?.contentDocument?.body.classList.remove("overlay-hidden"),this._pauseUpdate=!1}),this._updateInterval=setInterval(()=>{this._pauseUpdate||this.updateOverlays()},500),window.addEventListener("scroll",this.updateOverlays);const p=async()=>{const e=this._overlayWindow.document,t=e.documentElement,o=this.getPreviewFrame(this._previewContainerId),n=parseFloat(o.getAttribute("previewScale")),i=window.document.documentElement,r=i.getAttribute("dir")?i.getAttribute("dir"):"ltr",a=i.getAttribute("data-theme"),s=window.localStorage.getItem("BSP.Theme"),c=PREVIEW_EDIT_FIELD_PLACEHOLDER,p=e.body;t.setAttribute("dir","ltr"),t.setAttribute("data-preview-overlay",!0),p.style.background="none",p.style.backgroundColor="transparent",p.style.visibility="hidden";const b=e.createElement("link");e.head.appendChild(b),b.setAttribute("href","https://fonts.googleapis.com/css?family=Noto+Sans:400,700");const M=b.relList;M&&M.supports("preload")?(b.setAttribute("as","style"),b.setAttribute("rel","preload"),b.setAttribute("onload",'this.rel="stylesheet"'),b.setAttribute("crossOrigin","anonymous")):b.setAttribute("rel","stylesheet"),t.style.setProperty("--PreviewScale",`${n}`),n<.6&&t.classList.add("should-upscale"),t.setAttribute("dir",r),a&&t.setAttribute("data-theme",a),s&&this._overlayWindow.localStorage.setItem("BSP.Theme",s),t.setAttribute("data-preview-field-placeholder",c);const d=(()=>{const e=window.document.head;let t=[];const o=e.querySelector('link[id="dist-v4-css"]'),n=e.querySelector('link[id="dist-v5-css"]'),i=e.querySelector('script[id="dist-v4-js"]'),r=e.querySelector('script[id="dist-v5-js"]');let a=o||n||e.firstChild;const s=r?r.nextSibling:i.nextSibling;for(;a!==s;)"SCRIPT"!==a.tagName&&"LINK"!==a.tagName||t.push({tag:a.tagName,ref:a.getAttribute("href")||a.getAttribute("src"),id:a.dataset.id,text:a.textContent,isv4:a===i||a===o}),a=a.nextSibling;return t})();await(async()=>{await Promise.all(d.map(async t=>{await(async t=>new Promise(o=>{const n=t.tag,i=t.ref,r=t.id;let a=null;"LINK"===n?(a=e.createElement("link"),a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),a.setAttribute("href",i),t.isv4?a.onload=()=>{o()}:o()):"SCRIPT"===n&&(a=e.createElement("script"),a.setAttribute("type","text/javascript"),a.innerText=t.text,i&&a.setAttribute("src",i),t.isv4?a.onload=()=>{o()}:o()),r&&a.setAttribute("id",r),e.head.appendChild(a)}))(t)})),p.style.visibility="visible"})()};this._overlayFrame.contentDocument.getElementsByTagName("html")[0].style.setProperty("--PreviewScale",this._overlayFrame.getAttribute("previewScale")),"complete"===this._overlayWindow.document.readyState||"interactive"===this._overlayWindow.document.readyState?await p():await new Promise(e=>{this._overlayWindow.addEventListener("load",async()=>{await p(),e()})})}static async create(e){const t=new h;return await t.initialize(e),t}static getOverlayWindow(e){return h._previewOverlays.get(e)}reload(e,t,o){this._previewContainerId=t.previewContainerId,this._allOverlays=t.overlays,o&&o!==this._viewport&&(this._viewport=o,this.updateOverlays());const n=[...t.overlays.keys()];(e=new Map([...e.entries()].sort((e,t)=>e[1].parentKey===t[1].parentKey?n.indexOf(e[0])-n.indexOf(t[0]):e[0]===t[1].parentKey?-1:t[0]===e[1].parentKey?1:n.indexOf(e[1].parentRoot)-n.indexOf(t[1].parentRoot)))).forEach((e,t)=>{const o=this._allOverlays.get(t);if(o&&Object.assign(e,o),e.isShared||(e.linked=null),e.linked){const t=this._allOverlays.get(`${e.linked}`);t&&(e.dimensions=t.dimensions[`${e.linkedIdx}`]??e.dimensions)}}),this.Overlays?(e.forEach((e,t)=>{const o=this.Overlays.get(t);o?this.update(o,o.element,e):(this.Overlays.set(t,e),this.renderOverlay(e,t))}),this.Overlays.forEach((e,t)=>{const o=this._allOverlays.get(t);if(o){if(this.update(e,e.element,Object.assign({},o,{isRemoved:!1})),e.parentKey){const t=this.Overlays.get(e.parentKey);t&&this.update(t,t.element,{isRemoved:!1})}}else{if(e.parentKey&&this.Overlays.get(e.parentKey)){const t=this.Overlays.get(e.parentKey);let o=0;this.Overlays.forEach(t=>{t.parentKey&&t.parentKey===e.parentKey&&o++}),o<=1&&this.update(t,t.element,{isRemoved:!0})}this.update(e,e.element,{isRemoved:!0})}})):(this.Overlays=new Map(e),this.Overlays.forEach((e,t)=>{this.renderOverlay(e,t)})),this.ImageTooltips=new Map(t.imageData),this._overlayWindow.document.querySelectorAll(".Preview-imageOverlay").forEach(e=>{e.parentNode.removeChild(e)}),this.ImageTooltips.forEach((e,t)=>{this.renderImageTooltip(e)})}destroy(){clearInterval(this._updateInterval)}updateLabel(e,t){const o=e.querySelector(".Preview-overlayLabel");if(!o)return;o.textContent=t;const n=e.getBoundingClientRect().height,{height:i}=o.getBoundingClientRect();o.style.top=i>=n?`-${o.getBoundingClientRect().height}px`:"0px"}update(e,t,o,n){if(!t)return;let i=Object.assign(e,Object.fromEntries(Object.entries(o).filter(([e,t])=>null!=t)));if(i.isShared?(t.classList.add("is-shared"),t.dataset.editAction=i.isShared):(t.classList.remove("is-shared"),delete t.dataset.editAction),!0===i.isLocked?t.classList.add("is-locked"):!1===i.isLocked&&t.classList.remove("is-locked"),!0===i.isRoot)e.depth=1,t.classList.add("is-root");else if(!1===i.isRoot){const o=this.Overlays.get(e.parentKey);e.depth=o?.depth+1,e.parentRoot=o?.parentRoot,o?.isSelected&&(t.classList.add("is-visible"),e.isVisible=!0)}!0===i.isVisible?t.classList.add("is-visible"):!1===i.isVisible&&t.classList.remove("is-visible"),!0===i.isSelected?t.classList.add("is-selected"):!1===i.isSelected&&t.classList.remove("is-selected"),!0===i.isHover?t.classList.add("is-hover"):!1===i.isHover&&t.classList.remove("is-hover"),!0===i.isEmpty?t.classList.add("is-empty"):!1===i.isEmpty&&(this.updateLabel(t,e.label||e.name),t.classList.remove("is-empty")),!0===i.isRemoved?t.classList.add("is-removed"):t.classList.remove("is-removed"),this.setDimensions(e,n)}renderImageTooltip(e){const t=this._overlayWindow.document.body,o=document.createElement("div");o.classList.add("Preview-imageOverlay");const n=document.createElement("div");if(n.className="Preview-overlayTooltip",n.innerHTML="<b>Image</b>",e){const t=+e.width,o=+e.height;let i=null;if(n.classList.add("is-grid"),n.append((0,a.A)("span",(t>0?t:"auto")+" x "+(o>0?o:"auto"))),t>0&&o>0){const e=h.gcd(t,o);e>0&&(i=`${t/e}:${o/e}`)}n.append((0,a.A)("hr"),(0,a.A)("hr"),(0,a.A)("span",window.BRIGHTSPOT?.ui?.tooltips?.size),(0,a.A)("span",e.name),null!==i?(0,a.A)("span",window.BRIGHTSPOT?.ui?.tooltips?.aspectRatio):"",null!==i?(0,a.A)("span",i):"")}o.append(n),t.prepend(o),window.requestAnimationFrame(()=>{const{x:t,y:n,width:i,height:r}=e.rect,a=t+window.scrollX;Object.assign(o.style,{height:r,left:a,position:"absolute",top:n+window.scrollY,width:i})}),this.constructor.getObserver().observe(o)}renderOverlay(e){const t=this._overlayWindow.document,o=t.body,n=!!e.isEmpty,{id:i,name:r,type:s}=e;if(!i||!r)return;if("bspField"===s&&!e.dimensions&&!n)return;const c=t.createElement("div");c.classList.add("Preview-overlay"),c.dataset.id=i,c.dataset.type=r;const p=window.parent.parent;c.onclick=t=>{if(p){const t=c.dataset.type;let o=new Map;this.Overlays?.forEach((e,t)=>{if(e.isRoot){const e=this._allOverlays.get(t);e&&(e.isRoot=!0,o.set(t,e))}});let n=e.hasFormField,i=e.parentKey,r=[];for(;!n&&i;){const e=this.Overlays.get(i);r.push({id:e.id,name:e.name,type:e.type,isShared:e.isShared,parentKey:e.parentKey}),n=e.hasFormField,i=e.parentKey}p.postMessage({type:"BSP.Preview.OverlayClick",id:c.dataset.id,label:c.label,name:t.split("/")[0],behavior:c.dataset.editAction,overlayType:e.type,previewContainerId:this._previewContainerId,overlays:this._allOverlays,parentFields:r.reverse(),rootOverlays:o,isEnhancement:e.isEnhancement,hasFormField:e.hasFormField},"*")}},c.querySelector(".Preview-overlayLabel")?.remove();const b=(0,a.A)("div",{className:"Preview-overlayLabel"},e.label||e.name);c.appendChild(b);let M=null;"bspModule"!==e.type||e.isShared||(M=o.querySelector(`.Preview-overlay[data-id="${e.id}"]`)),M?o.insertBefore(c,M):(M=!e.isShared&&o.querySelector(".Preview-overlay.is-shared"),M?o.insertBefore(c,M):o.appendChild(c)),e.element=c,window.requestAnimationFrame(()=>{this.update(e,c,{id:i,name:r,behaviors:e.behaviors,isShared:e.isShared,isEmpty:void 0!==e.isEmpty&&e.isEmpty,isLocked:e.isLocked,isSelected:e.isSelected,isRoot:e.isRoot,isVisible:!1})})}setDimensions(e,t){const o=e.dimensions,n=e.element;if(!n)return;const i=t=>{const{x:o,y:i,width:r,height:a}=t,s=o+window.scrollX,c=s+r;Object.assign(n.style,{height:a,left:s-(0!==s&&"text"===e.internalType?10:0),position:"absolute",top:i+window.scrollY,width:r+(c!==this._overlayWindow.innerWidth&&"text"===e.internalType?20:0)})};if(o&&"bspField"===e.type&&(!e.children&&!e.fieldValue||e.isShared))i(o);else{const t=[...this.Overlays.values()].filter(t=>t.parentKey===e.id+"/"+e.name&&t.dimensions&&!Array.isArray(t.dimensions));if("bspModule"===e.type&&e.dimensions?.length)e.dimensions.forEach(e=>{i(e)});else if(t.length){let e=null,o=null,i=null,r=null;t.forEach(t=>{const n=t.dimensions;n&&(e=null!==e?Math.min(e,n.top):n.top,o=null!==o?Math.min(o,n.left):n.left,i=null!==i?Math.max(i,n.bottom):n.bottom,r=null!==r?Math.max(r,n.right):n.right)}),Object.assign(n.style,{width:r-o,left:o,position:"absolute",top:e,height:i-e})}else o&&i(o)}if(t){const{updateWidth:e,maxWidth:o}=t,{top:i,bottom:r,left:a,right:s}=n.getBoundingClientRect();let c=i,p=r,b=a,M=s;i>=t.top&&(c=t.top-h._gapSize),r<=t.bottom&&(p=t.bottom+h._gapSize),n.style.top=c,n.style.height=p-c,e&&(a>=t.left&&(b=t.left-h._gapSize),s<=t.right&&(M=t.right+h._gapSize),b>=0&&M<=o&&(n.style.left=b,n.style.width=M-b))}}}h._previewOverlays=new Map,h._gapSize=15;var m=o(66556);function q(e,t){if(!t.once||!t.hasExecuted)try{t.callback(e),t.hasExecuted=!0,t.once&&t.subscription&&(t.subscription.remove(),t.subscription=null)}catch(e){console.error("onRTEReady callback failed",e)}}const _=window.BRIGHTSPOT?.ui.tooltips;function W(e,t){const o=e.querySelector(t)?.htmlFor;o&&document.getElementById(o)?.focus()}const g=new Map;let y=0;function v(e,t,o){if(t){for(const n of(0,c.A)(t,o))e.appendChild("li"===o?n:(0,a.A)("li",{},n));t.remove()}}(0,d.A)([".ContentEdit.is-new",".StandardForm.is-new"],e=>{if(document.querySelector(".Admin-nav"))return;const t=e.querySelector(".CIG:not(:empty)");if(!t)return;let o;for(const e of t.querySelectorAll(":scope > [data-tab]")){const n=e.dataset.tab;if(o){if(o!==n)return void(0,d.A)(t,":scope > .TabBar",e=>{W(t,`:scope > .CIG-row:not(.inputContainer-readOnly)[data-tab="${Array.prototype.filter.call(e.querySelectorAll("button[data-tab]"),e=>!e.hidden)[0]?.dataset.tab}"] > .CIG-label > label`)})}else o=n}W(t,":scope > .CIG-row:not(.inputContainer-readOnly) > .CIG-label > label")}),(0,d.A)('.Popup[data-popup-source-class*="ContentSelector-edit"] button.Popup-heading',e=>{e.focus()}),(0,d.A)(".ContentEdit-top .Message",e=>{const t=e.closest(".ContentEdit").querySelector(".ContentEdit-main > .ContentEdit-title");t.parentNode.insertBefore(e,t.nextSibling)}),(0,d.A)(".ContentEdit",e=>{const t=e.closest(".Popup-content");t?t.classList.add("is-editing"):document.body.classList.add("is-editing");const o=(0,s.A)(e,".widget-publishing");if(!o)return;const n=(0,a.A)("ul",{className:"ContentEdit-controlsList",role:"menu","aria-label":_.actions?.contentEdit}),i=new MutationObserver(e=>{e.forEach(e=>{const t=e.target,o=t.classList.contains("is-locked");t.querySelectorAll("[accesskey]").forEach(e=>{o?e.setAttribute("disabled",""):e.removeAttribute("disabled")})})});i.observe(e,{attributeFilter:["class"]});const r=(0,s.A)(e,".ContentEdit-bar"),c=(0,s.A)(e,".widget-publishingExtra-left"),p=(0,s.A)(c,['[name="action-draft"]','[name="action-newDraft"]']),b=(0,s.A)(r,".ContentEdit-workflow")||(0,s.A)(r,".ContentEdit-publish");if(null!==p){const t=p.cloneNode(!0);"action-draft"===t.name&&t.addEventListener("click",()=>{const t=e.querySelector('input[name="publishDate"]');t&&(t.value="")}),b?r.insertBefore(t,b):r.appendChild(t),p.closest(".ContentEdit").classList.contains("is-new")||"action-draft"===p.getAttribute("name")?p.parentNode.remove():t.style.display="none"}v(n,(0,s.A)(e,".widget-contentCreate"),"li"),v(n,c,"li"),v(n,(0,s.A)(e,".widgetControls"),"a"),v(n,(0,s.A)(e,".widget-publishingExtra-right"),"li"),v(n,(0,s.A)(e,".widget-publishing > .widget-controls"),"a");const M=(0,s.A)(n,".widgetControlsEditInFull");M&&!e.closest(".Popup")&&M.closest("li").remove();const d=(0,a.A)("div",{className:"ContentEdit-controls"}),l=(0,a.A)("button",{className:"ContentEdit-controlsToggle",type:"button",title:_.actions?.actions,"aria-haspopup":"menu","aria-expanded":"false","aria-label":_.actions?.contentEdit,onclick:()=>{(0,m.AM)(n,l,d)}});(0,m.D1)(n,l),d.appendChild(l),d.appendChild(n),d.setAttribute("data-tether-anchor",""),o.appendChild(d)}),(0,d.A)(".ContentEdit-controlsList .DraftAndReturnAction",e=>e.setAttribute("aria-hidden","true")),(0,d.A)(".ContentEdit-controlsList .NewDraftAndReturnAction",e=>e.setAttribute("aria-hidden","true")),(0,d.A)(".ContentEdit-restore",e=>{const t=e.closest(".ContentEdit-controls");t.parentNode.insertBefore(e,t);const o=(0,a.A)("div",{className:"ContentEdit-restoreToggle",onclick:()=>{z.A.toggle(o,e,()=>e.classList.toggle("is-open",o.classList.toggle("is-open")))}},e.getAttribute("data-restore-label")||"restore");e.parentNode.insertBefore(o,e)}),(0,d.A)(".ContentEdit-workflow",e=>{const t=e.closest("btu-dialog");e.setAttribute("hidden","");const o=e=>{"Escape"===e.key?(t?.close(e),b.click(),b.focus()):"Tab"!==e.key||document.activeElement.closest(".ContentEdit-workflow.is-open")||document.activeElement.closest(".Popup.is-calendar")||document.activeElement.matches(".Page")||document.activeElement===b||b.click()},n=e=>{if(window.BRIGHTSPOT?.ui.cms.enableV5UI)return;const t=e.target.closest(".Popup"),o=(0,s.A)(document,".ProseMirror-fullscreen-container:not(.hide)");(t&&!e.target.matches(".Popup-close")||o&&e.target.closest(".ProseMirrorToolbar-action")||e.target.closest(".ProseMirror-fullscreen-container")||e.target.matches(".rte2-toolbar-fullscreen"))&&b.click()},i=(0,s.A)(e,".ContentEdit-workflowWrapper > .ContentEdit-workflowBody");let r=0;const p=(0,s.A)(e.parentNode,".ContentEdit-publish"),b=(0,a.A)("button",{"aria-expanded":!1,"aria-haspopup":!0,className:"ContentEdit-workflowToggle",onclick:()=>{if(z.A.toggle(b,e,()=>{const t=b.classList.toggle("is-open"),i=(0,s.A)(document,".Popup"),r=(0,s.A)(document,".ProseMirror-fullscreen-container:not(.hide)");return t?(e.removeAttribute("hidden"),window.addEventListener("keyup",o),window.addEventListener("click",n)):(window.removeEventListener("keyup",o),i||r||window.removeEventListener("click",n)),b.setAttribute("aria-expanded",t?"true":"false"),e.classList.toggle("is-open",t)}),p)for(const t of(0,c.A)(e,".ContentEdit-workflowWrapper"))t.classList.toggle("is-active","workflow"===t.getAttribute("data-name"))},type:"button"},e.getAttribute("data-workflow-label")||"Workflow");e.parentNode.insertBefore(b,e),e.closest(".ContentEdit").classList.add("is-workflow");const M=e.querySelectorAll('.ContentEdit-workflowActions button[name="action-workflow"]');if(e.querySelector(".ContentEdit-workflowActions button[data-workflow-comment-required]")&&(0,d.A)('.CIG-row[data-field-name="comment"] > .AutoExpand > textarea',e=>{e.addEventListener("input",()=>{M.forEach(t=>{t.disabled?""!==e.value.trim()?t.removeAttribute("disabled"):t.setAttribute("disabled","true"):""===e.value.trim()&&t.setAttribute("disabled","true")})})}),p){(0,s.A)(e,'.ContentEdit-workflowWrapper[data-name="publishOverride"] > .ContentEdit-workflowBody').appendChild(p),e.classList.add("is-publishOverride");for(const t of(0,c.A)(e,".ContentEdit-workflowWrapper > .ContentEdit-workflowLink"))t.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),"workflow"===t.parentNode.getAttribute("data-name")&&(r=i.offsetHeight+"%");for(const o of(0,c.A)(e,".ContentEdit-workflowWrapper"))o.classList.toggle("is-active",o.getAttribute("data-name")===t.getAttribute("data-action")),o.classList.contains("is-active")&&o.querySelector(".DateTimeInput, .AutoExpand textarea")?.focus();(0,s.A)(e,'.ContentEdit-workflowWrapper:not([data-name="workflow"]) > .ContentEdit-workflowBody').style.height=r})}}),(0,d.A)(".ContentEdit-publish .ContentEdit-publishButton",e=>{const t=e.closest(".ContentEdit-publish"),o=t.querySelector('input[name="publishDate.date"]'),n=t.querySelector('input[name="publishDate.time"]');if(!o||!n)return;const i=t.querySelector(".DateTimeInput"),r=(0,s.A)(e.parentNode.parentNode,".ContentEdit-overrideMessage"),a=e.textContent;function c(){o.value&&n.value?(t.classList.add("is-scheduling"),e.innerText=e.getAttribute("data-schedule-label"),i.classList.remove("is-empty")):(t.classList.remove("is-scheduling"),e.innerText=a,i.classList.add("is-empty")),r&&(r.innerHTML=t.classList.contains("is-scheduling")?r.getAttribute("data-schedule-message"):r.getAttribute("data-publish-message"))}c(),o.addEventListener("change",c),n.addEventListener("change",c);const p=t.querySelector('select[name="newSchedule"]');p&&p.addEventListener("change",c)}),(0,d.A)(".ContentEdit-workflowActions .ContentEdit-publishButton",e=>{const t=e.closest(".ContentEdit-workflowActions"),o=t.querySelector("input.ContentEdit-workflowScheduleDate"),n=t.querySelector("input.ContentEdit-workflowScheduleTime");if(!o||!n)return;const i=t.querySelector(".ContentEdit-workflowScheduleLink"),r=e.textContent;function a(){o.value&&n.value?(t.classList.add("is-scheduling"),e.innerText=e.getAttribute("data-schedule-label"),i&&i.classList.remove("is-empty")):(t.classList.remove("is-scheduling"),e.innerText=r,i&&i.classList.add("is-empty"))}a(),o.addEventListener("change",a),n.addEventListener("change",a)});const L=window.localStorage;let w=0;(0,d.A)(".ContentEdit",e=>{if(!e.querySelector(".ContentEdit-top"))return;const t=e.getAttribute("data-object-id"),o=e.closest(".Page-content, .Popup");if(!o)return;const i=o.querySelector(".ContentEdit-preview");if(!i)return;i.setAttribute("inert","");const r=i.querySelector(".PreviewFrame");if(!r)return;const a=i.querySelector(".PreviewFrame-typeFrame");if(!a)return;window.addEventListener("viewport-device-changed",e=>{window.requestAnimationFrame(()=>{R(t)?.contentWindow?.postMessage({type:"BSP.ContentEdit.ViewportDeviceChanged"},"*")})}),e.closest(".Page.is-previewToEdit")&&o.setAttribute("data-preview-menu",!1);const s=(0,O.A)(()=>{const e=a.querySelector(".PreviewFrame-typeDisplay");if(e){const t=e.querySelectorAll("iframe");if(t.length<1)return;const n=t[0],i=r.querySelector(".deviceWidthSelect");let s=n.getBoundingClientRect().width;if(n.style.transform="",n.style.width="",i){if(o){o.style.removeProperty("--ContentEdit-previewWidth");const e=i.options[i.selectedIndex];e&&(s=parseInt(e.getAttribute("data-device-width"),10),n.style.width=`${s}px`,s<r.getBoundingClientRect().width&&o.style.setProperty("--ContentEdit-previewWidth",`${s}px`))}}else o&&(o.style.removeProperty("--ContentEdit-previewWidth"),n.style.width="",s=1920);y=s;const c=e.clientWidth/s;n.style.transform=`scale(${c})`,n.setAttribute("previewScale",c),n.style.setProperty("--PreviewFrame-scale",c),h.getOverlayWindow(a.querySelector(":scope iframe:first-of-type").getAttribute("data-container-id"))?.dispatchEvent(new Event("resize"))}});let c=new A.A(r,s);const p=function(){window.addEventListener("resize",s),e.addEventListener("brightspot-content-state-change",()=>c.updatePreview())};window.ContentEditFields=new Map;const b=o.querySelector(".content-edit > .ContentEdit .ContentEdit-left");b&&(0,d.A)(b,'.inputContainer[data-tab="Main"]:not([type="hidden"])',e=>{const t=e.dataset.name;e.closest(".TC-unselected")&&window.ContentEditFields.has(t)?window.ContentEditFields.delete(t):window.ContentEditFields.set(t,e)}),(0,d.A)(e,":scope .ContentEdit-previewButton",t=>{t.type="button",t.ariaLabel=o.classList.contains("is-previewing")?_.preview.close:_.preview.open,t.title=t.ariaLabel;const r=t.closest(".ContentEdit-toolbar");t.onclick=function(){if(o.classList.toggle("is-previewing")){o.classList.contains("Popup")&&o.querySelector(":scope > .Popup-content")?.classList.add("is-previewing"),c.isVisible=!0,i.removeAttribute("inert"),t.title=_.preview.close,t.ariaLabel=_.preview.close,(0,n.iP)(_.preview.opened),L.removeItem("BSP.ContentEdit.previewClosed"),c.reloadPreview(),p();const a=r.querySelector("button.is-active[data-right-tab]");if((!window.BRIGHTSPOT?.ui?.cms?.enableV5UI||o.offsetWidth<900)&&a){const t=e.querySelector(`.ContentEdit-right[data-right-tab="${a.dataset.iconButtonName}"]`);C(a,t,{container:o,updateStorage:!0})}}else o.classList.contains("Popup")&&o.querySelector(":scope > .Popup-content")?.classList.remove("is-previewing"),c.isVisible=!1,i.setAttribute("inert",""),t.title=_.preview.open,t.ariaLabel=_.preview.open,(0,n.iP)(_.preview.closed),L.setItem("BSP.ContentEdit.previewClosed",1),setTimeout(function(){c.deletePreview()},500),window.removeEventListener("resize",s),e.removeEventListener("brightspot-content-state-change",()=>c.updatePreview())},window.innerWidth>=768&&!i.classList.contains("is-previewClosedByDefault")&&!L.getItem("BSP.ContentEdit.previewClosed")&&!o.classList.contains("is-previewing")?(t.title=_.preview.close,t.onclick()):o.classList.contains("is-previewing")&&(c.isVisible||(c.isVisible=!0),c.updatePreview(),p(),i.removeAttribute("inert"))})}),(0,d.A)(".ContentEdit",e=>{const t=e.querySelector(".ContentEdit-top");if(!t)return;const o=e.closest(".Page-content, .Popup");if(!o)return;const n=o.querySelector(".ContentEdit-preview");if(!n)return;let i=n.querySelector(".ContentEdit-previewControls");if(!i)return;let r=i.querySelector("form[id]");if(!r)return;let s=r.querySelector('input[name="_previewObject"]');const p=n.querySelector(".ContentEdit-previewDisplay");if(!p)return;const b=n.querySelector(".ContentEdit-previewTypes");let M=!0;const z=e.getAttribute("data-object-id");e.closest(".Page.is-previewToEdit")&&o.setAttribute("data-preview-menu",!1),(0,d.A)(".ContentEdit-preview",e=>{(0,d.A)(e,[".widget-preview > .ContentEdit-previewControls",'.frame.loaded[name^="previewControls"] .ContentEdit-previewControls'],e=>{const t=e.querySelector("form:last-of-type");if(t){const e=(0,a.A)("div",{class:"ContentEdit-secondaryPreviewControls"});(0,d.A)(t,":scope select:not(.deviceWidthSelect) + .ComboInput",t=>{e.appendChild(t)}),t.appendChild(e)}})}),e.addEventListener("brightspot-content-state-change",e=>{for(const t of(0,c.A)(i,'input[name="_previewObject"]'))t.value=e.detail});const A=document.createElement("A");A.className="ContentEdit-previewButton",A.href="#";const f=(0,a.A)("div",{className:"ContentEdit-previewButtonWrapper"},[(0,a.A)("div",{className:"ContentEdit-previewButtonCircle"}),A]),h=(0,O.A)(()=>{const e=p.querySelectorAll("iframe");if(e.length<1)return;const t=e[0],i=document.querySelector(".deviceWidthSelect");let r=t.getBoundingClientRect().width;if(t.style.transform="",t.style.width="",o.style.removeProperty("--ContentEdit-previewWidth"),i){const e=i.options[i.selectedIndex];e&&(r=parseInt(e.getAttribute("data-device-width"),10),t.style.width=`${r}px`,r<n.getBoundingClientRect().width&&o.style.setProperty("--ContentEdit-previewWidth",`${r}px`))}y=r,t.style.transform=`scale(${p.clientWidth/r})`});window.ContentEditFields=new Map;const m=o.querySelector(".content-edit > .ContentEdit .ContentEdit-left");m&&(0,d.A)(m,'.inputContainer[data-tab="Main"]:not([type="hidden"])',e=>{const t=e.dataset.name;e.closest(".TC-unselected")&&window.ContentEditFields.has(t)?window.ContentEditFields.delete(t):window.ContentEditFields.set(t,e)});const q=(0,u.A)(1e3,()=>{if(s&&""===s.value)return;const e=document.createElement("IFRAME");e.name="ContentEdit-previewFrame"+w++,p.insertBefore(e,p.firstChild),e.setAttribute("data-container-id",z);const t=e.closest(".Popup"),o=(e=null)=>{const o=t??document;o.querySelector(".ContentEdit-previewButtonWrapper")?.classList.toggle("is-animating",e)};o(!0),h(),e.onload=function(){const t=[];for(let o=e;o=o.nextElementSibling;)"IFRAME"!==o.tagName||o.classList.contains("Preview-overlayFrame")||t.push(o);const n=e.parentNode;t.forEach(e=>n.removeChild(e)),o(!1)},(0,l.A)(e,()=>o(!1)),r.target=e.name,r.submit()}),_=function(){window.addEventListener("resize",h),e.addEventListener("brightspot-content-state-change",q)},W=function(){window.removeEventListener("resize",h),e.removeEventListener("brightspot-content-state-change",q)};b&&(0,d.A)(".ContentEdit-previewTypesForm",e=>{const t=e.querySelector('select[name="previewType"]');M="true"===t.selectedOptions[0].getAttribute("data-refresh"),t.onchange=function(){p.innerHTML="",M="true"===t.selectedOptions[0].getAttribute("data-refresh"),q()};const n=b.querySelector('div[name^="previewControls"]');n.onload=function(){const e=s?.value;i=n.querySelector(".ContentEdit-previewControls"),r=i.querySelector("form[id]"),s=r.querySelector('input[name="_previewObject"]'),s&&""===s.value&&(s.value=e),o.classList.contains("is-previewing")&&(M||"true"===t.options[t.selectedIndex].getAttribute("data-refresh"))?(q(),_()):W()}}),A.onclick=function(){return o.classList.toggle("is-previewing")?(L.removeItem("BSP.ContentEdit.previewClosed"),L.removeItem("BSP.ContentEdit.rightPanel"),window.BRIGHTSPOT?.ui?.cms?.enableV5UI||o.style.setProperty("--ContentEdit-rightWidth","0px"),n.removeAttribute("inert"),M&&(q(),_())):(L.setItem("BSP.ContentEdit.previewClosed",1),n.setAttribute("inert",""),M&&(W(),setTimeout(function(){p.querySelectorAll(":scope > iframe").forEach(e=>e.remove())},500))),!1},t.insertBefore(f,t.firstChild),window.innerWidth>=768&&!n.classList.contains("is-previewClosedByDefault")&&!L.getItem("BSP.ContentEdit.previewClosed")&&A.onclick()}),(0,d.A)(".ContentEdit-title",e=>{const t=e.closest("form");if(!t)return;t.insertAdjacentElement("afterbegin",e);const o=(0,s.A)(e.closest(".content-edit"),".ContentEdit-overlayList");if(!o)return;e.insertBefore((0,a.A)("button",{className:"ContentEdit-overlay",type:"button","aria-haspopup":"true","aria-expanded":"false","aria-label":(0,s.A)(o,"li.selected").textContent,onclick:e=>{(0,m.AM)(o,e.target)}},(0,s.A)(o,"li.selected").textContent),e.firstChild);const n=e.querySelector(".ContentEdit-overlay");(0,m.D1)(o,n)});const R=e=>{let t;return e?t=document.querySelector(`iframe[data-container-id="${e}"]`):(t=document.querySelector(".ContentEdit-previewDisplay iframe:first-of-type"),t||(t=document.querySelector(".PreviewFrame-typeDisplay iframe:first-of-type"))),t};(0,d.A)(".CIG > .TabBar",e=>{const t=e.closest(".CIG");(0,d.A)(t,".CIG-row.is-overlaid",o=>{const n=o.dataset.tab,i=(0,s.A)(e,`:scope > .TabBar-item[data-tab="${n}"]`);if(!i)return;let r=0;for(const e of(0,c.A)(t,`:scope > [data-tab="${n}"]`))r+=e.classList.contains("is-overlaid")?1:(0,c.A)(e,".is-overlaid").length;const p=(0,s.A)(i,":scope > .Badge");r>0?p?p.textContent=r:(0,M.A)((0,a.A)("div",{className:"Badge"},r),i):p.remove()})}),(0,d.A)([".Page-content .publishing-workflow",".Popup .publishing-workflow"],e=>{const t=(0,s.A)(e,":scope > .progress"),o=(0,s.A)(e,":scope > ul"),n=(0,s.A)(o,".icon-step-forward"),i=(0,s.A)(o,".icon-stop");e.closest(".Page-content, .Popup").classList.add("is-workstream"),e.classList.add("ContentEdit-workstreamMessage"),e.removeAttribute("style"),t.classList.add("ContentEdit-workstreamProgressText"),t.removeAttribute("style"),o.classList.add("ContentEdit-workstreamActions"),n.classList.add("ContentEdit-workstreamSkip"),i.classList.add("ContentEdit-workstreamStop"),(0,b.A)(e,(0,p.A)((0,a.A)("div",{className:"ContentEdit-workstream"},(0,a.A)("div",{className:"ContentEdit-workstreamProgress"},(0,s.A)(t,":scope > .progressBar"),t),o),e))});const k=(e,t)=>{const o=(0,s.A)(document,`.CIG-row[data-name='${e}/${t}']`),n=(0,s.A)(document,`.EIG-title[data-object-id='${e}']`),i=(0,s.A)(document,`option[value='${e}'], input.objectId[value='${e}']`),r=(0,s.A)(document,`[data-rte-container] .Enhancement[data-state*="${e}"]`),a=(0,s.A)(document,`.RCIG-title[data-object-id="${e}"]`);if(o){const n=o.querySelector(`:scope .RCS ol[data-sortable-input-name='${e}/${t}']`);return n?{type:"RCS",element:n}:{type:"CIG",element:o}}return i?{type:"OPTION",element:i}:r?{type:"ENHANCEMENT",element:r}:n?{type:"EIG",element:n}:a?{type:"RCIG",element:a}:(console.debug("Form element does not exist for the preview overlay"),null)},T=(e,t,o,n)=>{if(e.classList.contains("is-new-item")&&e.classList.remove("is-new-item"),!e.closest(".is-preview-menu"))return;const i=e.parentNode;let r;const s=e.nextElementSibling,c=()=>{t.classList.remove("is-visible"),r.removeChild(M),d&&r.removeChild(d);const o=e.classList.contains("RCS-item")&&e.querySelector(":scope > .ContentSelector-clear");o&&o.classList.remove("is-visible"),i.insertBefore(e,s),r.remove()},p=(0,a.A)("div",{className:"Preview-popupCancel",onclick:e=>{c()}}),b=document.createElement("button");b.classList.add("is-save"),b.classList.add("is-dominant"),b.textContent="Save & Close";const M=(0,a.A)("div",{className:"ActionBar"});let d;M.appendChild(b),n&&(d=(0,a.A)("div",{className:"Preview-popupHeading"},n)),r=(0,a.A)("div",{className:"Preview-popup is-previewEditing"},d,e,p,M),o.appendChild(r),b.addEventListener("click",e=>{c()}),t.classList.add("is-visible")};window.addEventListener("message",async({data:e})=>{if("object"!=typeof e)return;const t=e.id,o=e.type,n=e.name;if("BSP.Preview.onChangedHeight"===o){const t=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(t){const o=t.closest(".Page-content, .Popup"),n=o?.querySelector(".ContentEdit-preview");n?.style.setProperty("--PreviewFrame-height",`${e.height}px`)}}else if("BSP.Preview.OverlayClick"===o){const o=e.parentFields,i=e.hasFormField,a=()=>{const a=k(t,n);if(!a)return;(0,c.A)(document.body,".RCIG-item").forEach(e=>{const t=(0,s.A)(e,":scope > .RCIG-title");t&&(e.contains(a.element)||e.isEqualNode(a.element)?e.classList.contains("is-collapsed")&&t.click():e.classList.contains("is-collapsed")||t.click())});const p=a.element.closest(".CIG-row");if(p&&p.classList.contains("is-inHiddenCluster"))for(let e=p;e=e.previousElementSibling;)if(e.classList.contains("CIG-title")){e.click();break}(e=>{if(!e)return;let t=e,o=null,n=[];const i=function(e){return e?e.closest("[data-tab]"):null};for(;o=i(t),o;){const e=o.getAttribute("data-tab"),i=o.parentNode.querySelector(":scope > .TabBar");i&&n.push(i.querySelector(`[data-tab="${e}"]`)),t=o.parentNode}return n})(a.element).forEach(e=>{e&&!e.classList.contains("is-selected")&&e.click()});const b=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});if("CIG"===a.type||"EIG"===a.type){r()(a.element,{align:{top:0,topOffset:10}});const e=a.element.querySelector(".CIG-small");e&&(0,d.A)(e,[":scope > btu-input input",":scope > textarea",":scope > btu-textarea-input > textarea",":scope > .ComboInput",":scope > input"],t=>{const o=e.querySelector(".ProseMirrorContainer > .ProseMirror");o?o.focus():t.focus()})}else if("RCS"===a.type){const e=a.element.closest(".CIG-small");if(e.classList.contains("RCS")){let t=a.element.closest(".RCS-item")??e;r()(t,{align:{top:0,topOffset:10}}),t.dispatchEvent(b)}else e&&(0,d.A)(e,":scope > .ComboInput",e=>{e.focus()}),r()(a.element.closest(".CIG-row"),{align:{top:0,topOffset:10}});a.element.dispatchEvent(b)}else if("OPTION"===a.type){const e=a.element.closest(".CIG-small");if(e.classList.contains("RCS")){let t=a.element.closest(".RCS-item")??e;r()(t,{align:{top:0,topOffset:0}}),t.dispatchEvent(b)}else e&&(0,d.A)(e,":scope > .ComboInput",e=>{e.focus()}),r()(a.element.closest(".CIG-row"),{align:{top:0,topOffset:10}});a.element.dispatchEvent(b)}else if("RCIG"===a.type)r()(a.element,{align:{top:0,topOffset:10}});else if("ENHANCEMENT"===a.type){let e,t=0;const o=a.element.closest(".ProseMirrorContainer");o&&(t=o.querySelector(".ProseMirrorToolbar")?.offsetHeight);let n=parseInt(window.getComputedStyle(a.element).marginTop);isNaN(n)||(e=Math.abs(t-n)),r()(a.element,{align:{top:0,topOffset:e}})}if(e.behavior){let e=a.element;"OPTION"===a.type&&e.closest(".RCS-item")&&(e=e.closest(".RCS-item"));const t=e.querySelector(".ContentSelector-edit");t?.click()}i||(o.push({id:e.id,name:e.name}),h.getOverlayWindow(e.previewContainerId).postMessage({type:"BSP.Preview.UpdateOverlays",overlays:o},"*"))},p=t=>{const o=t.key,{id:n,name:i,overlayType:r,isEnhancement:s}=e;let c;s?c=`.CIG-row[data-name='${o}'] .ProseMirrorContainer`:"bspField"===r?c=`.CIG-row[data-name='${n}/${i}']`:"bspModule"===r&&(c="RCS"===t.ui.type?`input.objectId[value="${n}"]`:`.repeatableLabel[data-object-id="${n}"]`),(0,d.A)(c,()=>{a()})};if(i)a();else{let t=[];o.forEach((o,n)=>{const{id:i,name:a,type:s}=o;let c="";"bspField"===s?c=`.CIG-row[data-name='${i}/${a}']`:"bspModule"===s&&(c=`.repeatableLabel[data-object-id="${i}"]`);const p=(t,o)=>{(0,d.A)(c,()=>{let n=k(i,a);if(!n)return void o("Could not load edit ui: fields for one or more parent overlay(s) are missing in the form");const s=n.element;r()(s,{align:{top:0,topOffset:10}}),e.isEnhancement&&function(t,o){const{once:n=!0}={},i="string"==typeof o?document.querySelector(o):o;if(!(i instanceof HTMLTextAreaElement))return()=>{};const a={callback:t=>{const o=t.view.dom.querySelector(`[data-state*='_id":"${e.id}']`);o&&(r()(o),o.click())},once:n,hasExecuted:!1,subscription:null};return null!==(s=i)&&"rte"in s&&"object"==typeof s.rte&&i.rte.loaded&&(q(i.rte,a),n)?()=>{}:(a.subscription=window.PubSub.subscribe("rteLoaded",e=>{e.ctx===i&&q(e,a)}),()=>a.subscription?.remove());var s}(0,s.querySelector("textarea.richtext")),"RCIG"===n.type&&s?.closest(".is-collapsed")&&s.click();const c=s.closest(".CIG-row");if(c&&c.classList.contains("is-inHiddenCluster"))for(let e=c;e=e.previousElementSibling;)if(e.classList.contains("CIG-title")){e.click();break}t&&t({ui:n,key:i+"/"+a})})};t.push(new Promise((e,t)=>{p(e,t)}))}),Promise.all(t).then(e=>{const t=e[e.length-1];p(t)}).catch(e=>{console.debug(e)})}}else if("BSP.Preview.ContentLoad"===o){const t=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`),o=t?.closest(".Page-content.is-previewing")||t?.closest(".Popup.is-previewing"),n=document.activeElement;let i=n.closest(".Preview-overlayFrame")||n.closest(`iframe[data-container-id="${e.previewContainerId}"]`),r=!o||!i;const a=R(e.previewContainerId);a?.contentWindow.postMessage({type:"BSP.Preview.UpdateInitToggle",deferPreviewInit:r},"*");let s=h.getOverlayWindow(e.previewContainerId);s?.postMessage({type:"BSP.Preview.UpdateInitToggle",deferPreviewInit:r},"*")}else if("BSP.Preview.DOMParsed"===o){const t=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(!t?.closest(".Page-content.is-previewing")&&!t?.closest(".Popup.is-previewing"))return;let o=new Map;const n=(e,t,n)=>{o.set(e,t),n&&("bspModule"!==n.type||n.dimensions||(n.childKeys?n.childKeys.push(e):n.childKeys=[e]))},i=(t,r,a,s,c)=>{const p=t===e.previewContainerId,b=o.get(c),M=r.querySelector(`.RCIG-title[data-object-id="${t}"]`),d=r.querySelector(`.EIG-title[data-object-id="${t}"]`);let l,z;const u=r.querySelector(`.objectInputs[data-object-id="${t}"]`);if(!M&&!d||u){let o=a,b=s;if(z=u||r,l=[...z.querySelectorAll(`div.inputContainer[data-name^="${t}"]:not([hidden])`)].filter(e=>!e.closest(".TC-unselected")),M||d){const t=e.overlays.get(c);b=c;let i={id:c.split("/")[0],hasFormField:!0,parentKey:s,parentRoot:a.parentRoot,depth:a.depth+1,type:"bspModule",name:c.split("/")[1]};t&&(i=Object.assign(i,t)),n(c,i,o),o=i}l.forEach(t=>{const a=t.dataset.name;let s;const c=e.overlays.get(a);let M,d;if(!c||c.isEmpty)return;if("bspField"===c.type){M=!p&&t.querySelector(`select[name="${a}.id"]`),d=t.querySelector(`select[name="${a}.id"]`);const e=S(a,t,c.fieldValue?.split("/")[0]),i=c.hasElement;if(e&&!i)return;let r=`${a}_acEdit`;e&&(e.dataset.previewAction=r),s=Object.assign({isShared:!!e&&r,isLocked:E(t),isInitialized:!0,depth:p?1:o.depth+1,parentRoot:p?a:o.parentRoot,parentKey:p?null:b,hasFormField:!0,isDropdown:d},c),M||n(a,s,o)}else"bspModule"===c.type&&c.referencesRichText&&r.querySelectorAll(".Enhancement").forEach(e=>{e.dataset.state&&JSON.parse(e.dataset.state)._id===c.id&&(s=Object.assign({isShared:!1,isInitialized:!0,depth:p?1:o.depth+1,parentRoot:o.parentRoot,parentKey:b,hasFormField:!0},c),n(a,s,o))});let l=[];s.children?l=[...s.children]:!s.isShared&&s.fieldValue&&l.push(s.fieldValue);const z=t.querySelector(`.RCS ol[data-sortable-input-name='${a}']`);if("text"===s.internalType){const o=function(t){(new DOMParser).parseFromString(t,"text/html").querySelectorAll("[data-state]").forEach(t=>{const o=t.getAttribute("data-state"),i=JSON.parse(o);i&&Object.keys(i).forEach(t=>{if(!/^_|^theme./.test(t)){const o=i._id+"/"+t,r=e.overlays.get(o);r&&!r.isInitialized&&n(o,Object.assign({behaviors:!1,isLocked:!1,isInitialized:!0,isRoot:!1,parentKey:a,depth:s.depth+1,hasFormField:!1,isEnhancement:!0,parentRoot:s.parentRoot},r),s)}})})},i=t.querySelector('[data-rte-container="true"]'),r=t.querySelector("textarea");i&&r&&(i.dataset.value?o(i.dataset.value):r.value&&o(r.value))}const u=z?.querySelectorAll(`input[name="${a}"]`);l?.forEach((r,c)=>{const p=e.overlays.get(r);let d,l,O=r.split("/")[0],A=`${a}_${O}_acEdit`;z&&(d=[...u].find(e=>e.value===O),l=S(O,d,void 0,a),l&&(l.dataset.previewAction=A));const f={id:O,isInitialized:!0,parentKey:a,parentRoot:s.parentRoot,depth:s.depth+1,type:"bspModule",name:r.split("/")[1],isShared:!(!d||!l)&&A,hasFormField:!0};d&&d.dataset.label&&(f.label=d.dataset.label),M?i(r.split("/")[0],t,o,b,r):(p?n(r,Object.assign(f,p),s):(n(r,f,s),e.overlays.set(r,Object.assign({},f))),i(r.split("/")[0],t,s,a,r))})})}else{let o=[];const i=r.querySelector(`input[name="${s}.id"][value="${t}"]`)?.parentNode,a=i?.querySelector(`input[name="${s}.data"]`).value;if(a){const t=JSON.parse(a),i=(t,r,a,s)=>{let c=a.children?.find(e=>e.split("/")[0]===t._id),p=a;if(c){const t=e.overlays.get(c);let o={id:c.split("/")[0],hasFormField:!1,parentKey:a.id+"/"+a.name,parentRoot:a.parentRoot,depth:a.depth+1,type:"bspModule",name:c.split("/")[1]};t&&(o=Object.assign(o,t)),n(c,o,a),p=o}r.forEach(r=>{if(!/^_|^theme./.test(r)){let c,b,M;const d=t[r];if(t._id){const i=t._id+"/"+r;o.push(i);const a=e.overlays.get(i);a&&(d&&"object"==typeof d&&(b=Object.keys(d).includes(a.name),Object.keys(d).find(e=>!/^_|^theme./.test(e))||(M=!0)),b&&!s||(c=Object.assign({parentKey:p.id+"/"+p.name,parentRoot:p.parentRoot,depth:p.depth+1,isInitialized:!0,hasFormField:!1,isShared:t[r]._ref?i+"_acEdit":null,isEnhancement:!!s,isDropdown:M},a),n(i,c,p)))}!s&&(b?c=p:c||(c=a),d)&&("object"==typeof d?Array.isArray(d)?d.forEach(t=>{if(t._ref){const o=c.children?.find(e=>t._ref===e.split("/")[0]),i=e.overlays.get(o);if(i){const e=Object.assign({parentKey:c.id+"/"+c.name,parentRoot:c.parentRoot,depth:p.depth+1,isInitialized:!0,hasFormField:!1,isShared:c.id+"/"+c.name+"_"+i.id+"_acEdit"});n(o,e,c)}}else i(t,Object.keys(t),c)}):i(d,Object.keys(d),c):"string"==typeof d&&(new DOMParser).parseFromString(d,"text/html").querySelectorAll("[data-state]").forEach(e=>{const t=e.getAttribute("data-state"),o=JSON.parse(t);o&&i(o,Object.keys(o),c,!0)}))}})};i(t,Object.keys(t),b)}}};if(i(e.previewContainerId,document),[...o.values()].filter(e=>e.isDropdown&&!e.linked&&!e.isShared).forEach(e=>{const t=e.id+"/"+e.name;[...o.values()].find(e=>e.parentKey===t&&e.dimensions)?delete e.isDropdown:o.delete(t)}),g.get(e.previewContainerId)){let t=R(e.previewContainerId);g.get(e.previewContainerId)?._overlayFrame.contentDocument.getElementsByTagName("html")[0].style.setProperty("--PreviewScale",t.getAttribute("previewScale")),g.get(e.previewContainerId).reload(o,e,y)}else{const t=await h.create(e);g.set(e.previewContainerId,t),g.get(e.previewContainerId).reload(o,e,y),(0,l.A)(g.get(e.previewContainerId)._overlayFrame,()=>{g.get(e.previewContainerId).destroy(),g.get(e.previewContainerId),g.delete(e.previewContainerId)})}}else if("BSP.Preview.OverlayActionClick"===o){const t=e.key,o=document.querySelector(`.CIG-row[data-name="${t}"]`),n=document.querySelector(".ContentEdit-previewModal"),i=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(e.handler){const t=(e.elementId?document.querySelector(`.repeatableLabel[data-object-id="${e.elementId}"]`):null).parentElement;return"moveUp"===e.handler?t.parentElement.insertBefore(t,t.previousElementSibling):"moveDown"===e.handler&&t.parentElement.insertBefore(t,t.nextElementSibling?.nextElementSibling),void i.dispatchEvent(new Event("change",{bubbles:!0}))}if("text"===e.internalType)T(o,n,i);else{const t=e.elementId?document.querySelector(`.repeatableLabel[data-object-id="${e.elementId}"]`):null,o=(t?t.parentNode:document).querySelector(`[data-preview-action="${e.actionId}"]`);if(o.classList.contains("RCIG-addSelect")?(0,d.A)(o,":scope > .ComboInput",e=>{e.click()}):o.click(),t&&o.classList.contains("removeButton")&&(t.click(),r()(t)),o.classList.contains("RCIG-add")){const e=o.closest(".RCIG");(0,d.A)(e,":scope > .RCIG-list > li.RCIG-item.is-new-item",e=>{T(e,n,i)})}else if(o.classList.contains("RCS-add")){const t=o.closest(".RCS"),r=e.label;(0,d.A)(t,":scope > .RCS-list > li.RCS-item.is-new-item",e=>{T(e,n,i,r)})}else if(o.classList.contains("EIG-add")){const e=o.closest(".EIG");(0,d.A)(e,":scope > .EIG-item",e=>{T(e,n,i)})}else{const e=o.closest(".RCIG-item, .EIG-item");T(e,n,i)}}}});const S=(e,t,o,n)=>{if(null===t)return;let i,r=t.querySelector(`input[name="${e}"]`);return r&&!n?(o&&(r=t.querySelector(`input[name="${o}/${e.split("/")[1]}"]`)??r),r&&(i=!(r.parentNode.classList.contains("RCIG-item")||r.parentNode.classList.contains("RCS-item"))&&r.parentNode.querySelector(":scope > .ContentSelector-edit"))):t.getAttribute("name")===n&&(i=t.parentNode.querySelector(":scope > .ContentSelector-edit")),i},E=e=>!!e.closest(".is-readOnly")||!!(e.classList.contains("is-readOnly")||e.classList.contains("is-pending")||e.closest(".is-pending"))||!!e.closest(".is-locked")||null;function N(e,t){if(!e.closest(".Page.is-guideOpen"))return;const o=[];for(let t,n=e;t=n.closest(".CIG-row");)n=t.closest(".CIG"),o.unshift({typeId:n.dataset.typeId,field:t.dataset.fieldName});if(o.length<1)return;let n="";for(let e=0,i=o.length;e<i;++e){const{typeId:r,field:a}=o[e];if(n+=`.Guide-content[data-type-id="${r}"] > .Guide-field[data-field="${a}"] `,e+1===i){const i=document.querySelector(`${n} > form > select`);i&&(i.value=t(o[e]),i.dispatchEvent(new Event("change",{bubbles:!0})))}}const i=new MutationObserver(async()=>{const e=document.querySelector(n);e&&(i.disconnect(),e.scrollIntoView(),e.classList.add("is-focus"))});i.observe(document,{attributes:!0,childList:!0,subtree:!0})}(0,d.A)([".ContentEdit",".enhancementForm",".standardForm"],e=>{e.addEventListener("focusin",({target:e})=>{N(e,e=>e.typeId)}),e.addEventListener("focusout",()=>{for(const e of document.querySelectorAll(".Guide-field"))e.classList.remove("is-focus")})}),(0,d.A)('.CIG-row[data-type="record"] > .CIG-small > select, .CIG-row[data-type="record"] > .CIG-small > btu-toggleable > select',e=>{e.addEventListener("change",()=>{N(e,()=>{const t=e.selectedIndex;return t>=0?e.options[t].dataset.type:null})})}),(0,d.A)(".Guide-field.is-embedded",e=>{const t=e.querySelector("select");if(!t)return;const o=e.closest(".Guide-content[data-type-id]")?.dataset?.typeId;if(!o)return;const n=document.querySelector(`.CIG[data-type-id='${o}'] > .CIG-row[data-field-name='${e.dataset.field}'] .CIG`)?.dataset?.typeId;n&&(t.value=n,t.dispatchEvent(new Event("change",{bubbles:!0})),t.form.requestSubmit())});const B="BSP.ContentEdit.rightPanel",C=(e,t,o)=>{const n=e.classList.toggle("is-active");e.ariaExpanded=n,t.classList.toggle("is-visible",n);const i=t.querySelector(".ContentEdit-right-title")?.textContent;if(e.ariaLabel=`${n?_.close:_.open} ${i}`,e.title=e.ariaLabel,"manage_search"!==e.dataset.iconButtonName){const t=e.closest(".ContentEdit-toolbar"),i=o?.container||t?.closest(".Page-content, .Popup-content, .Popup");if(i)if(n)i.classList.add("has-widget-panel-open");else{const e=t?.querySelector('button.is-active:not([data-icon-button-name="manage_search"])');e||i.classList.remove("has-widget-panel-open")}}if(!o)return;const{container:r,updateStorage:a}=o;let s;r&&(s=n?t.dataset.width:"0px",r.style.setProperty("--ContentEdit-rightWidth",s)),!r.classList.contains("Popup")&&a&&(n?L.setItem(B,e.dataset.iconButtonName):L.removeItem(B))};(0,d.A)(".ContentEdit-toolbar",e=>{const t=e.closest(".Page-content, .Popup-content, .Popup");t.style.setProperty("--ContentEdit-rightWidth","0px");const o=e.closest(".ContentEdit");if(!o)return;const n=o.dataset.objectId,i=L.getItem(B);[...e.querySelectorAll("button[data-right-tab]")].forEach(r=>{if("manage_search"===r.dataset.iconButtonName)return;const a=r.dataset.iconButtonName,s=o.querySelector(`.ContentEdit-right[data-right-tab="${a}"]`);if(!s)return;const c=n+"/"+a;if(s.id=c,!s.dataset.width){const e=getComputedStyle(s).getPropertyValue("--contentRight-width");s.dataset.width=parseFloat(e)?e:"320px"}r.setAttribute("aria-controls",s.id);const p=`${_.open} ${r.ariaLabel}`;r.ariaLabel=p,r.title=p,r.ariaExpanded=!1,(0,d.A)(".ContentEdit-right .Widget.is-error",e=>{const t=e.closest(".ContentEdit-right");if(!t)return;const o=document.querySelector(`button[aria-controls="${t.id}"]`);o&&o.classList.add("is-error")});const b=s.querySelector(".ContentEdit-right-close");b.ariaLabel=_.close,b.title=_.close,b.onclick=()=>{C(r,s,{container:t,updateStorage:!0}),r.focus()},r.onclick=n=>{const i=e.querySelector('button.is-active:not([data-icon-button-name="manage_search"])'),c=r.classList.contains("is-active");if(window.BRIGHTSPOT?.ui?.cms?.enableV5UI&&!c&&t.classList.contains("is-previewing")&&t.offsetWidth<900){const t=e.querySelector(".ContentEdit-previewButton");t?.click()}if(C(r,s,{container:t,updateStorage:!0}),i){if(i.dataset.iconButtonName!==a){const e=o.querySelector(`.ContentEdit-right.is-visible[data-right-tab=${i.dataset.iconButtonName}]`);C(i,e)}}else!window.BRIGHTSPOT?.ui.cms.enableV5UI&&t.classList.contains("is-previewing")&&e.querySelector(".ContentEdit-previewButton").click();!c&&r.classList.contains("is-active")&&n.isTrusted&&t.addEventListener("transitionend",function e(o){"grid-template-columns"===o.propertyName&&(t.removeEventListener("transitionend",e),r.classList.contains("is-active")&&b.focus())})},i===a&&r.click()}),window.BRIGHTSPOT?.ui?.cms?.enableV5UI&&new ResizeObserver(()=>{if(t.offsetWidth<900&&t.classList.contains("is-previewing")&&t.querySelector(".ContentEdit-right.is-visible")){const t=e.querySelector(".ContentEdit-previewButton");t?.click()}}).observe(t)})},52265(e,t,o){"use strict";o(44764),o(84978),o(25809);var n=o(53186),i=o.n(n),r=o(88903),a=o(32246),s=o(5292),c=o(52215);let p,b=!1;const M=[];function d(e,t,o,n,i,a){if(clearInterval(e),t.emit(a+".leaving",o),l(i)&&0===n.length)if(navigator.sendBeacon){const e=new FormData;e.append("unlock",!0),e.append("contentId",a),e.append("_csrf",r.A.get("bsp.csrf")),navigator.sendBeacon(CONTEXT_PATH+"contentLock",e)}else fetch(CONTEXT_PATH+"contentLock",{method:"POST",headers:{"Brightspot-CSRF":r.A.get("bsp.csrf"),"Content-Type":"application/x-www-form-urlencoded"},body:"unlock=true&contentId="+a}).catch(e=>console.log(e))}function l(e){return document.documentElement.getAttribute("data-user-id")===e.getAttribute("data-content-lock-owner")}function z(e,t){fetch(CONTEXT_PATH+"contentLock"+t).then(function(e){if(!e.ok)throw Error(e.statusText);return e.text()}).then(function(t){try{const o=JSON.parse(t);Array.isArray(e)?function(e,t){e.forEach(e=>{const o=e.getAttribute("data-rtc-content-id"),n=t.lockOwnerIds[o];n&&(e.setAttribute("data-content-lock-owner",n),A(e,n))})}(e,o):"FORM"===e.nodeName&&u(e,o)}catch(e){console.error(e)}}).catch(t=>{Array.isArray(e)||"FORM"!==e.nodeName||function(e){if(!l(e)||b)return;const t=e.getAttribute("data-lock-network-timeout"),o=(0,s.A)("div",{className:"ContentLockMessage-timeout message message-error"}),n=(0,s.A)("span");n.innerHTML="Disconnected from network. Trying to reconnect. The lock might be dropped in: ";const i=(0,s.A)("span",{class:"ContentLockTimer"});i.innerHTML=(t<10?"0"+t:t)+":00",o.appendChild(n),o.appendChild(i);const r=e.querySelector(".ContentEdit-main")||e;r.insertBefore(o,r.firstChild),b=!0,function(e,t){let o,n,i=e;const r=setInterval(function(){o=parseInt(i/60,10),n=parseInt(i%60,10),o=o<10?"0"+o:o,n=n<10?"0"+n:n,t.textContent=o+":"+n,(--i<0||!b)&&clearInterval(r)},1e3)}(60*t-1,i)}(e),console.error(t)})}function u(e,t){if(t.hardTimeout)return e.setAttribute("data-content-lock-owner",null),void(window.location.href=CONTEXT_PATH);const o=e.getAttribute("data-rtc-content-id"),n=t.lockOwnerId;if(!n)return;if(b){const t=e.querySelector(".ContentLockMessage-timeout");t&&t.remove(),b=!1}const i=n!==document.documentElement.getAttribute("data-user-id"),r=e.getAttribute("data-content-lock-owner")!==n,a="true"===e.getAttribute("data-unlocking-disabled")!==t.unlockingDisabled,c=e.querySelector(".ContentEdit-main")||e,M=document.querySelector(".Widget-controls");if(e.classList.toggle("is-locked",i),e.setAttribute("data-content-lock-owner",n),e.setAttribute("data-unlocking-disabled",t.unlockingDisabled),M&&M.classList.toggle("is-locked",i),r){let o=e.querySelector(".ContentLockMessage-eviction");t.evictionMessage?(o||(o=(0,s.A)("div",{className:"ContentLockMessage-eviction message message-warning"}),c.insertBefore(o,c.firstChild)),o.innerHTML=t.evictionMessage):o&&o.remove()}let d=e.querySelector(".ContentLockMessage-status");if(i&&(r||a)){d&&d.remove(),d=(0,s.A)("div",{className:"ContentLockMessage-status message message-warning"}),c.insertBefore(d,c.firstChild),d.innerHTML=t.statusMessage;const n=d.querySelector(".ContentLock-link");n&&(n.onclick=()=>{const t=new FormData;t.append("forceUnlock",!0),t.append("contentId",o),O(e,n,t)}),document.activeElement&&document.activeElement.blur()}else if(!i){if(t.statusMessage){if(r||a){d&&d.remove(),d=(0,s.A)("div",{className:"ContentLockMessage-status message message-info"}),c.insertBefore(d,c.firstChild),d.innerHTML=t.statusMessage;const n=d.querySelector(".ContentLock-link");n&&(n.onclick=()=>{const t=new FormData;t.append("disableUnlock",!0),t.append("contentId",o),O(e,n,t)})}}else d&&d.remove();const n=e.querySelector(".ContentLockMessage-eviction");n&&n.remove()}let l=e.querySelector(".ContentLockMessage-inactive");if(t.inactivityMessage)if(i&&!l){l=(0,s.A)("div",{className:"ContentLockMessage-inactive message message-info"}),c.insertBefore(l,c.firstChild),l.innerHTML=t.inactivityMessage;const n=l.querySelector(".ContentLock-link");n&&(n.onclick=()=>{const t=new FormData;t.append("inactiveUnlock",!0),t.append("contentId",o),O(e,n,t)})}else i||p||(p=document.title,document.title=t.inactivityMessage);else l&&l.remove(),p&&(document.title=p,p=null);r&&A(e,n)}function O(e,t,o){const n=t.getAttribute("data-confirm");n&&confirm(n)&&function(e,t){fetch(CONTEXT_PATH+"contentLock",{method:"post",headers:{"Brightspot-CSRF":r.A.get("bsp.csrf")},body:t}).then(function(e){return e.text()}).then(function(t){try{if(e){const o=JSON.parse(t);u(e,o)}}catch(e){console.error(e)}})}(e,o)}function A(e,t){e.querySelectorAll(".EditFieldUpdateViewers-viewer").forEach(e=>{e.toggleAttribute("data-locked",e.getAttribute("data-user-id")===t)})}(0,a.A)('form[data-rtc-content-id][data-content-locking="true"]',e=>{const t=e.getAttribute("data-rtc-content-id"),o=Date.now(),n=i().client(),r=t+".viewing",s=t+".leaving",p=[],b={viewer:o};n.on(r,function(e){const t=e.viewer;t&&-1===p.indexOf(t)&&(p.push(e.viewer),n.emit(r,b))}),n.on(s,function(e){const t=e.viewer;if(t){const e=p.indexOf(t);-1!==e&&p.splice(e,1)}}),n.emit(r,b);const M="?contentId="+t+"&typeId="+e.getAttribute("data-type-id");z(e,M);const u=setInterval(()=>{const t=M+"&isLockOwner="+l(e)+"&isInactive="+document.hidden;z(e,t)},5e3);window.addEventListener("unload",()=>{d(u,n,b,p,e,t)}),(0,a.A)("[data-rtc-unlock-onreceive]",o=>{o.dataset.rtcUnlockOnreceive&&c.default.receive(o.dataset.rtcUnlockOnreceive,o=>{d(u,n,b,p,e,t)})}),(0,a.A)("[data-rtc-unlock-onclick]",o=>{o.addEventListener("click",o=>{d(u,n,b,p,e,t)})})}),(0,a.A)(':not(form)[data-rtc-content-id][data-content-locking="true"]',e=>{if(0===M.length){const t=e.closest("table");t?t.querySelectorAll(':not(form)[data-rtc-content-id][data-content-locking="true"]').forEach(e=>{-1===M.indexOf(e)&&M.push(e)}):M.push(e);let o="?"+M.map(()=>"contentIds="+e.getAttribute("data-rtc-content-id")).join("&");z(M,o);const n=setInterval(()=>{o="?";const e=[];for(let t=M.length-1;t>=0;--t){const n=M[t];if(document.body.contains(n)){const t=n.getAttribute("data-rtc-content-id");-1===e.indexOf(t)&&(e.push(t),o+="contentIds="+t+"&")}else M.splice(t,1)}0!==M.length&&0!==e.length?z(M,o.substring(0,o.length-1)):clearInterval(n)},5e3)}else-1===M.indexOf(e)&&M.push(e)}),(0,a.A)(".EditFieldUpdateViewers-viewer",e=>{const t=e.closest("[data-content-lock-owner]");t&&e.toggleAttribute("data-locked",e.getAttribute("data-user-id")===t.getAttribute("data-content-lock-owner"))})},53560(e,t,o){"use strict";var n=o(32246);(0,n.A)(".ContentReportingWidget div.widgetControls",e=>{const t=document.querySelector("a.ContentReporting-runLink");t&&e.before(t)}),(0,n.A)(".ContentReportingWidget.is-viewOnly",e=>{const t=e.querySelector("div.widgetControls"),o=e.querySelector("div.widget-contentCreate"),n=e.querySelector("div.ActionBar");t&&(t.innerHTML="",t.parentNode.removeChild(t)),o&&(o.innerHTML="",o.parentNode.removeChild(o)),n&&(n.innerHTML="",n.parentNode.removeChild(n))})},3815(e,t,o){"use strict";o(44764);var n=o(40627),i=o(32246),r=o(26594);function a(e){return e.parentNode.getBoundingClientRect().width<500}window.addEventListener("resize",(0,r.A)(()=>{const e=[];for(const t of(0,n.A)(document,".DT"))e.push({table:t,compact:a(t)});for(const{table:t,compact:o}of e)t.classList.toggle("is-compact",o)})),(0,i.A)(".DT",e=>{e.classList.toggle("is-compact",a(e))})},66118(e,t,o){"use strict";var n=o(32246),i=o(69792),r=o.n(i);(0,n.A)("input.date",e=>{e.classList.remove("date"),e.setAttribute("type","hidden");const t=document.querySelector("html").getAttribute("data-time-zone");e.setAttribute("data-time-zone",t);const o=document.createElement("a");o.classList.add("DateTimeInput","is-legacy"),o.setAttribute("target","DateStringCalendarFrame");const n=e.getAttribute("placeholder");n&&o.setAttribute("data-placeholder",n);const i=new URLSearchParams;let s,c;if(i.append("showDate",!0),i.append("showTime",!0),i.append("hideSecond",!0),e.value){const o=r().tz(parseInt(e.value),t);s=o.format("YYYY-MM-DD"),c=o.format("HH:mm:ss.SSS"),i.append("date",s),i.append("time",c)}else o.classList.add("is-empty");a(o,null,s,c),o.href=window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.ui.form.CalendarFrame"]+"?"+i,e.parentNode.insertBefore(o,e.nextSibling)}),(0,n.A)(".DateStringCalendarEmbedded .DateStringCalendar",e=>{b(e,e.closest(".DateStringCalendarEmbedded"))}),(0,n.A)(".Popup .DateStringCalendar",e=>{const t=e.closest(".frame"),o=t.closest(".Popup");o.setAttribute("aria-label",e.getAttribute("data-popupLabel"));const n=o.classList;n.add("is-local"),n.add("is-calendar");const i=t._bspFrameLink;"true"===i.getAttribute("data-hide-popup-close")&&o.querySelector(".Popup-close").classList.add("is-hidden"),b(e,i)});const a=(e,t,o,n,i,r)=>{if(!e)return;"object"==typeof o&&(n=o.getAttribute("data-time"),i=o.getAttribute("data-zoneOffset"),r=o.getAttribute("data-zoneId"),o=o.getAttribute("data-date"));const a=e.getAttribute("data-placeholder");if(!o&&!n&&a)return e.setAttribute("aria-label",a),void(e.innerHTML="");const s=new URLSearchParams;s.append("date",o),s.append("time",n),s.append("zoneOffset",i),s.append("zoneId",r),s.append("formatDateTime",!0),fetch(window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.ui.form.CalendarFrame"]+"?"+s,{method:"get",credentials:"include"}).then(e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.text()}).then(o=>{const n=`${t||""}${o}`;e.setAttribute("aria-label",n),e.innerHTML=n})},s=(e,t,o)=>{const[n,i]=(t.getAttribute("href")||"").split("?"),a=new URLSearchParams(i);let s;if(t.classList.contains("is-legacy")){const n=t.previousSibling;if(o)e.removeAttribute("data-date"),a.delete("date"),e.removeAttribute("data-time"),a.delete("time"),n.value=null;else{const t=e.getAttribute("data-date");a.set("date",t);const o=e.getAttribute("data-time");a.set("time",o),n.value=r().tz(`${t}T${o}`,n.getAttribute("data-time-zone")).valueOf()}s=n}else{const n=t.closest("li, .CIG-large, .CIG-small, .ContentEdit-publish, .ContentEdit-workflowActions, .SearchWidget-customDate"),i="true"===e.getAttribute("data-showDate"),r="true"===e.getAttribute("data-showTime"),c="true"===e.getAttribute("data-showZoneOffset"),p="true"===e.getAttribute("data-showZoneId");if(i){const t=n.querySelector('input[name$=".date"], .DateTimeInput-date');if(o)e.removeAttribute("data-date"),a.delete("date"),t.value=null;else{const o=e.getAttribute("data-date");a.set("date",o),t.value=o}s=t}if(r){const t=n.querySelector('input[name$=".time"], .DateTimeInput-time');if(o)e.removeAttribute("data-time"),a.delete("time"),t.value=null;else{const o=e.getAttribute("data-time");a.set("time",o),t.value=o}if(c){let t=n.querySelector('input[name$=".zoneOffset"]');if(o)e.removeAttribute("data-zoneOffset"),a.delete("zoneOffset"),t.value=null;else{const o=e.getAttribute("data-zoneOffset");a.set("zoneOffset",o),t.value=o}}else if(p){let t=n.querySelector('input[name$=".zoneId"]');if(o)e.removeAttribute("data-zoneId"),a.delete("zoneId"),t.value=null;else{const o=e.getAttribute("data-zoneId");a.set("zoneId",o),t.value=o}}s=t}}return s.dispatchEvent(new Event("change",{bubbles:!0})),n+"?"+a.toString()},c=(e,t)=>{s(e,t),e.closest(`.CIG-row[data-type$="${["/date","/instant","/zonedDateTime","/offsetDateTime","/offsetTime","/localDateTime","/localDate","/localTime"].join('"], .CIG-row[data-type$="')}"]`)?(e=>{const t=e.closest("li"),o=t.getAttribute("data-type");a(t.querySelector(".RCIG-title"),`${o}: `,e)})(e):a(t.closest(".CIG-row").querySelector(".CIG-note"),null,e)},p=(e,t,o)=>{t.setAttribute("href",s(e,t,o)),o?t.classList.add("is-empty"):t.classList.remove("is-empty"),a(t,null,e),e.closest(".Popup").querySelector(".Popup-close").click()},b=(e,t)=>{const o="true"===e.getAttribute("data-isWidgetEmbedded"),n="true"===e.getAttribute("data-showDate"),i="true"===e.getAttribute("data-showTime"),r="true"===e.getAttribute("data-showZoneOffset"),a="true"===e.getAttribute("data-showZoneId"),s=e.querySelector(".DateStringCalendarForm");if(n){const n=e.querySelector(".DateStringCalendarDate"),i=s.querySelector('input[name="date"]');n.querySelector(".Month-body").addEventListener("click",n=>{const r=n.target.closest(".Month-day"),a=r.getAttribute("data-date");i.value=a,e.setAttribute("data-date",a),e.querySelector(".is-selected")?.classList.remove("is-selected"),r.classList.add("is-selected"),o&&c(e,t)}),s.querySelector(".DateStringCalendarForm-previous").addEventListener("click",e=>{const t=e.target.querySelector("input");t.value=!0,t.dispatchEvent(new Event("change",{bubbles:!0}))}),s.querySelector(".DateStringCalendarForm-next").addEventListener("click",e=>{const t=e.target.querySelector("input");t.value=!0,t.dispatchEvent(new Event("change",{bubbles:!0}))})}if(i){const i=e.querySelector(".DateStringCalendarTime-custom"),p=i.querySelector(".DateStringCalendarTime-hour"),b=i.querySelector(".DateStringCalendarTime-meridiem"),M=i.querySelector(".DateStringCalendarTime-minute"),d=i.querySelector(".DateStringCalendarTime-second"),l=i.querySelector(".DateStringCalendarTime-nanosecond"),z=i.querySelector(".DateStringCalendarTime-zoneOffset"),u=i.querySelector(".DateStringCalendarTime-zoneId");d.addEventListener("change",()=>l.value=0);const O=()=>{const i=b.value;let O=parseInt(p.value);"pm"===i&&(O+=12);const A=`${O.toString().padStart(2,"0")}:${M.value.padStart(2,"0")}:${d.value.padStart(2,"0")}.${l.value}`;e.setAttribute("data-time",A),r?e.setAttribute("data-zoneOffset",z.value):a&&e.setAttribute("data-zoneId",u.value),n&&(s.querySelector('input[name="time"]').value=A,r?s.querySelector('input[name="zoneOffset"]').value=z.value:a&&(s.querySelector('input[name="zoneId"]').value=u.value)),o&&c(e,t)};i.addEventListener("change",O);const A=e.querySelector(".DateStringCalendarTime-common");A&&A.addEventListener("change",r=>{const a=r.target.selectedOptions[0].value;"_custom"===r.target.selectedOptions[0].value?(i.classList.remove("is-hidden"),O()):(i.classList.add("is-hidden"),e.setAttribute("data-time",a),n&&(s.querySelector('input[name="time"]').value=a),o&&c(e,t))})}o?c(e,t):(e.querySelector(".DateStringCalendarAction-clear").addEventListener("click",o=>p(e,t,!0)),e.querySelector(".DateStringCalendarAction-set").addEventListener("click",o=>p(e,t))),e.querySelector(".DateStringCalendarAction-now").addEventListener("click",e=>{let t;if(n){const e=s.querySelector('input[name="date"]');e.value=null,s.querySelector('input[name="renderYear"]').value=null,s.querySelector('select[name="renderMonth"]').value=null,t=e}if(i){const e=s.querySelector('input[name="time"]');e.value=null,r?s.querySelector('input[name="zoneOffset"]').value=null:a&&(s.querySelector('input[name="zoneId"]').value=null),t=e}t.dispatchEvent(new Event("change",{bubbles:!0}))})}},53039(e,t,o){"use strict";o.a(e,async(e,t)=>{try{o(67219),o(18136),o(47172),o(62824),o(41956),o(92);var n=o(47397),i=o(82982),r=o(5292),a=o(32246),s=o(41044),c=o(36711),p=o(10013),b=o(40627),M=o(66556),d=(o(89756),o(73136),o(80990),o(66808),o(78062),o(57366)),l=(o(60958),o(37592),o(95033)),z=(o(49080),o(12857),o(52265),o(3815),o(66118),o(82555),o(4389),o(60626),o(39806),o(30003),o(94073),o(3771),o(57519),o(50326),o(80082),o(5894),o(91533),o(95546),o(35066),o(66315),o(19106),o(53560),o(90819),o(11532),o(90880),o(34216),o(83368)),u=(o(93563),o(45080),o(73609)),O=(o(96538),o(95835),o(13411),o(3341),o(48557),o(47626),o(77663),o(7724),o(33482),o(57535),o(38387),o(75850),o(70823),o(64660),o(84977),o(26912),o(59240)),A=o(88903),f=e([O]);function h(){const e=document.createElement("div");Object.assign(e.style,{height:"100px",overflow:"scroll",visibility:"hidden",width:"100px"});const t=document.body;t.appendChild(e),document.documentElement.style.setProperty("--scrollbarSize",e.offsetWidth-e.clientWidth+"px"),t.removeChild(e)}O=(f.then?(await f)():f)[0],o.p=CONTEXT_PATH+"dist/",window.addEventListener("mouseup",e=>{const t=e.target;if(t===document.activeElement){let e=t.tagName;e&&(e=e.toLowerCase(),("a"===e||"button"===e&&!t.classList.contains("TabBar-item"))&&t.blur())}}),(0,a.A)(".autoSubmit:not(:has(:state(btu-loading))), [data-bsp-autosubmit]:not(:has(:state(btu-loading)))",e=>{new d.A(e)}),(0,p.A)("select",e=>{if(!e.isConnected)return;let t="";(e.closest(".RCIG-addSelect")||e.closest(".Page-create")||e.classList.contains("ContentSelector-select")&&e.parentNode.querySelector(".ContentSelector-clear"))&&(t="is-hidePlaceholder");const o=new l.A(e,{getOptionsUrl:t=>{const o=e.getAttribute("data-options-url");return o?o+encodeURIComponent(t):null},modifier:t});(0,c.A)(e,()=>{o.destroy()})}),(0,a.A)(".is-readOnly:not(select)",e=>{for(const t of(0,b.A)(e,"input, textarea, select"))t.type.includes("select")?t.classList.add("is-readOnly"):t.readOnly=!0}),(0,p.A)(".TC",e=>{new u.A(e),e.dispatchEvent(new CustomEvent("tc-loaded",{bubbles:!0}))}),window.addEventListener("brightspot-frame-load",a.A.triggerCallbacks),window.addEventListener("brightspot-frame-load",e=>{const t=window.BRIGHTSPOT.ajaxInitiator;if(t){const{action:o,id:n,nodeName:i,shadowField:r}=t;if("select"!==i&&!r)return;const a=r?`[shadow-field="${r}"]`:`form[action*="${new URL(o).pathname}"] ${i}[name="${n}"] ~ .ComboInput`;(0,s.A)(a,()=>{let t=e.target.querySelector(a);null==t&&(t=document.querySelector(a)),t&&(t.focus(),window.BRIGHTSPOT.ajaxInitiator=null)})}}),(0,a.A)('input[autocomplete="off"]',e=>{if(e.closest("btu-search-input"))return;const t=e;t.readOnly||(t.readOnly=!0,t.addEventListener("focus",()=>{t.readOnly=!1}))}),(0,z.Ts)(),"loading"===document.readyState?window.addEventListener("DOMContentLoaded",()=>{h(),window.location!==window.parent.location&&(document.body.classList.contains("is-inIframe")||document.body.classList.add("is-inIframe"))}):h(),window.BRIGHTSPOT&&(window.BRIGHTSPOT.js={...window.BRIGHTSPOT.js,trapFocusWithin:i.J,getFocusableDescendants:n.l,getFirstAndLastFocusableDescendants:n.q,create:r.A,onFind:a.A,onRemove:c.A,Cookies:A.A,setupMenuForAria:M.D1,toggleMenu:M.AM}),t()}catch(m){t(m)}})},4389(e,t,o){"use strict";o(67219),o(84978),o(92280),(0,o(32246).A)(".ExternalItemAuthLink",e=>{e.addEventListener("click",()=>{document.addEventListener("visibilitychange",e=>{"visible"===document.visibilityState&&document.cookie.split(";").some(e=>e.includes("bsp.csrf=externalTypeAuthenticated"))&&window.location.reload()})})})},82555(e,t,o){"use strict";var n=o(40627);const i=['button:not([type="button"])','input[type="submit"]'].join(",");window.addEventListener("click",function(e,t){const o=Array.isArray(e)?e.join(","):e;return function(...e){if(e[0]instanceof Event||e[0]instanceof window.jQuery.Event){const n=e[0].target;n instanceof Element&&n.matches(o)&&t.apply(n,e)}}}(i,function(){for(const e of(0,n.A)(this.closest("form"),i))e.classList.remove("is-clicked");this.classList.add("is-clicked")})),window.addEventListener("submit",e=>{const t=e.target;if(t.target&&!t.classList.contains("is-loader"))for(const e of(0,n.A)(t,".is-clicked"))e.classList.remove("is-clicked");else t.classList.add("is-submitting")})},60626(e,t,o){"use strict";o(67219),o(84978),o(25809);var n=o(32246);window.addEventListener("click",e=>{const t=e.target;if(t.classList.contains("Hierarchy-expand")){for(const e of t.closest("ul").querySelectorAll(".is-selected"))e.classList.remove("is-selected");t.closest("li").classList.add("is-selected")}},{capture:!0}),window.addEventListener("brightspot-frame-load",e=>{const t=e.target;if(t.classList.contains("Hierarchy-children")){const e=t.querySelector(".Hierarchy-column");e&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}if(t.classList.contains("HierarchyResults")){const e=[...t.querySelectorAll("li")],o=t.closest(".Hierarchy-column").querySelector("ul");e.forEach(e=>{o.appendChild(e)})}const o=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&document.querySelector(".Hierarchy-moreElements")?.click()})});let n=document.getElementsByClassName("lastHierarchyElement");n.item(0)&&(o.observe(n.item(0)),n.item(0).classList.remove("lastHierarchyElement"))}),(0,n.A)("div[data-popup-source-class*='Page-search'] div.Hierarchy-column a[data-hierarchy-item]",e=>{const t=e.getAttribute("data-type-id"),o=e.getAttribute("data-parent-type-ids"),n=e.closest("div.SearchWidget-form");if(!n||!t)return;const i=n.querySelector("select[name='st'] option[selected]").value;t===i||o&&o.includes(i)||e.setAttribute("data-mismatch-hierarchy-type","true")}),(0,n.A)("div[data-popup-source-class*='objectId-select'] div.Hierarchy-column a[data-hierarchy-item]",e=>{const t=e.getAttribute("data-type-id"),o=e.closest("div.SearchWidget-form");if(!o||!t)return;const n=o.querySelector("div.searchCreate form.objectId-create"),i=n.querySelector("input[name='typeId']")?.value,r=n.querySelector("select[name='typeId']")?.getAttribute("data-typeids");i&&t===i||r&&r.includes(t)||e.setAttribute("data-mismatch-hierarchy-type","true")})},39806(e,t,o){"use strict";o(84978),o(75178);var n=o(56155);const i=window.BRIGHTSPOT?.icons?.materialToLucide??{},r=!!window.BRIGHTSPOT?.ui?.cms?.enableV5UI,a=!r&&Object.keys(i).length>0?Object.keys(i).reduce((e,t)=>(e[i[t]]=t,e),{}):void 0;r||(0,n.A)(["[data-icon]","[data-icon-name]","[data-icon-button-name]"],function(e){const t=e.hasAttribute("data-icon")?"data-icon":e.hasAttribute("data-icon-name")?"data-icon-name":e.hasAttribute("data-icon-button-name")?"data-icon-button-name":null;if(!t)return;const o=e.getAttribute(t);if(null==o)return;const n=o.trim(),i=a&&null!=a[n]?a[n]:n;e.setAttribute(t,i)})},30003(e,t,o){"use strict";(0,o(41044).A)(".imageEditor",async()=>{await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(4582),o.e(9277),o.e(4795),o.e(5857)]).then(o.bind(o,5603))})},94073(e,t,o){"use strict";var n=o(88903);(0,o(32246).A)(".LinkCarousel-item",e=>{e.addEventListener("click",async t=>{const o=t.target;if(o.classList.contains("LinkCarousel-item-favorite")){o.classList.toggle("is-unstarred");const t=o.classList.contains("is-unstarred")?o.getAttribute("data-title-on"):o.getAttribute("data-title-off");o.title=t,o.setAttribute("aria-label",t);let i=CONTEXT_PATH+"update-create-new-favorites?quickStartId="+e.querySelector(".LinkCarousel-item-favorite").getAttribute("data-id");const r=new Headers;r.append("Brightspot-CSRF",n.A.get("bsp.csrf"));try{await fetch(i,{method:"POST",headers:r})}catch(e){console.error(e)}}else{if(e!==o)return;t.stopPropagation(),e.querySelector("a").click()}})})},3771(e,t,o){"use strict";var n=o(5292);(0,o(32246).A)(".LinkList td:not(.LinkList-image, .LinkList-main, .LinkList-viewers, .LinkList-button, .LinkList-type, .LinkList-description, .date-time)",e=>{const t=(0,n.A)("span",{className:"LinkList-icon","aria-hidden":"true"});e.prepend(t)})},57519(e,t,o){"use strict";var n=o(5292),i=o(95628),r=o(40627),a=o(32246);(0,a.A)(".LinkTable .Label",e=>{const t=e.closest("th, td");if(!t||t.classList.contains("LinkTable-label")||e.closest(".CommunityWidget"))return;const o=t.previousElementSibling;if(o&&o.classList.contains("LinkTable-label"))return void o.appendChild(e);const i=e.closest("tr"),r=Array.from(i.querySelectorAll("th, td")).indexOf(t);let a;const s=i.closest("table").querySelector("tr").querySelectorAll("th, td");for(let e=0,t=0;t-1<r;e++)a=s[e],t+=a.colSpan;if(!a.hasAttribute("data-skip-labels-move")){for(const e of i.closest("table").querySelectorAll("tr"))if(e.querySelectorAll("th, td")[r].getAttribute("data-value-count")>1)return void a.setAttribute("data-skip-labels-move","");for(const e of i.closest("table").querySelectorAll("tr:not(thead.screen-reader-only tr")){let t=r;for(const o of e.querySelectorAll("th, td"))if(t-=o.colSpan,t<0){e.insertBefore((0,n.A)(o.tagName,{className:"LinkTable-label"},"TH"===o.tagName&&e.closest("table").classList.contains("searchResultTable")?window.BRIGHTSPOT.ui?.searchContentStatus:""),o);break}}i.querySelectorAll("th, td")[r].appendChild(e)}});const s=new ResizeObserver(e=>{for(const t of e)t.target.classList.toggle("is-compact",(t.borderBoxSize?.inlineSize||t.contentRect.width)<500)});(0,a.A)(".LinkTable",e=>{e.classList.contains("is-compact")||s.observe(e);const t=e.classList.contains("is-static");for(const o of(0,r.A)(e,":scope > tbody > tr")){const e=(0,r.A)(o,":scope > td");if(!t)for(const t of e)if((0,i.A)(t,":scope > a")){t.classList.add("LinkTable-main");break}const n=e[0].classList;n.contains("LinkTable-main")?e.length>1&&e[1].classList.add("LinkTable-first"):n.add("LinkTable-first")}})},50326(e,t,o){"use strict";var n=o(10013);(0,n.A)(".locationMap",async e=>{const{default:t}=await Promise.all([o.e(8897),o.e(5598),o.e(1888)]).then(o.bind(o,83814));new t(e)}),(0,n.A)(".regionMap",async e=>{const{default:t}=await Promise.all([o.e(8897),o.e(5598),o.e(6086),o.e(6379)]).then(o.bind(o,35657));new t(e)})},80082(e,t,o){"use strict";var n=o(32246),i=o(95628);(0,n.A)('.LookingGlass-actions[data-action="copy"]',e=>{e.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation();const o=document.createElement("textarea");o.value=(0,i.A)(e,"a").href,o.setAttribute("readonly",""),document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o),e.setAttribute("data-copied","true"),setTimeout(()=>{e.removeAttribute("data-copied")},2e3)})})},5894(e,t,o){"use strict";var n=o(5292);(0,o(32246).A)(".Message",e=>{const t=(0,n.A)("span",{className:"Message-icon","aria-hidden":"true"}),o=e.querySelector(".ContentEdit-revisionInfo");o?o.insertAdjacentElement("afterend",t):e.append(t)})},91533(e,t,o){"use strict";var n=o(40627),i=o(32246),r=o(26594);function a(e){const t=e.style;t.overflow="auto",t.transform="",t.width="100%";const o=e.getBoundingClientRect().width,n=e.scrollWidth;o<n&&(t.transform=`scale(${o/n})`,t.transformOrigin="left"),t.overflow="",t.width=""}(0,i.A)(".NB",a),window.addEventListener("resize",(0,r.A)(()=>{for(const e of(0,n.A)(document,".NB"))a(e)}))},95546(e,t,o){"use strict";o(67219),o(44764),o(84978),o(13722),o(91672);var n=o(5292),i=o(95628),r=o(40627),a=o(68243),s=o(32246),c=o(41044),p=o(36711),b=o(34980),M=o(15483),d=o(47397),l=o(82982),z=o(1439);const u=window.BRIGHTSPOT?.ui.tooltips;function O(e,t){t&&e.style.setProperty("--Page-headerBottom",`calc(var(--Page-headerHeight) + ${t.clientHeight}px)`)}function A(e,t=!1){const o=e?.querySelector(".Page-nav"),n=e.classList.contains("is-navigating")||!0===t;n?o?.setAttribute("inert",""):o?.removeAttribute("inert"),n||o.querySelector(":scope .selected li:first-of-type")?.querySelector("a")?.focus();const i=n?u.menu.open:u.menu.close;e.classList.toggle("is-navigating",!0!==t&&void 0);const r=e?.querySelector(".Page-navToggle");r&&(r.title=i,r.setAttribute("aria-label",i),r.setAttribute("aria-expanded",!n))}function f(e,t){const o=document.querySelector(".Page-nav");if(!e)return;let n,i,r=e.classList;if(r.remove("is-active"),r.contains("selected")&&r.contains("isNested")||r.contains("is-expanded")){const o=e.querySelector("ul").firstElementChild;null!=o&&f(o,t)}const a=e.closest("ul").closest("li"),s=e.closest(".isNested");if(1===t){i=e.nextSibling;const t=e.classList.contains("is-expanded");null!==i?t?n=e.querySelector("ul").firstElementChild:"LI"===i.tagName&&(n=i):t||(n=null!==s.nextSibling?a.nextSibling:o.firstElementChild.querySelector("ul").firstElementChild),n.querySelector("a").focus()}else if(i=e.previousSibling,null!==i)"LI"===i.tagName&&(n=i,n.querySelector("a").focus()),e.classList.contains("isNested")&&(n=i.querySelector("ul").lastElementChild,n.querySelector("a").focus());else{const e=s.previousSibling;if(a.classList.contains("isNested")?n=a:null!==e&&(n=e.classList.contains("selected")?e.querySelector("ul").lastElementChild:a),s.classList.contains("selected")){const e=o.lastElementChild;n=e.classList.contains("is-expanded")?e.querySelector("ul").lastElementChild:e}n.querySelector("a").focus()}}(0,s.A)(".Page .Container-broadcast",e=>{const t=e.closest(".Page");new ResizeObserver(o=>{O(t,e)}).observe(e),O(t,e)}),(0,s.A)(".Page-nav",e=>{e.setAttribute("inert",""),e.addEventListener("keydown",t=>{switch(t.key){case"Enter":document.activeElement.closest("li").setAttribute("aria-expanded",document.activeElement.closest("li").matches(".is-expanded"));break;case"ArrowUp":case"ArrowLeft":f(t.target.closest("li"),-1),t.preventDefault(),t.stopPropagation();break;case"ArrowRight":case"ArrowDown":f(t.target.closest("li"),1),t.preventDefault(),t.stopPropagation();break;case"Escape":if("false"===document.activeElement.closest("li").getAttribute("aria-expanded")||document.activeElement.parentElement.parentElement.parentElement.classList.contains("selected"))A(e.closest(".Page"),!0);else if(t.target.closest("li").classList.contains("is-expanded")||t.target.closest("li").closest("ul").classList.contains("is-expanded")){const e=t.target.closest(".isNested");e.classList.remove("is-expanded"),e.firstElementChild.focus()}else A(e.closest(".Page"),!0)}});const t=(0,a.A)((0,n.A)("button",{className:"Page-navToggle",title:u.menu.open,"aria-label":u.menu.open,"aria-haspopup":"true","aria-expanded":"false",onclick:t=>{A(e.closest(".Page"))},onkeydown:t=>{e.closest(".Page");const o=(0,i.A)(e,":scope > li");switch(t.key){case"ArrowUp":case"ArrowLeft":e.lastElementChild.querySelector("a").focus();break;case"ArrowDown":case"ArrowRight":o.classList.contains("isNested")&&o.classList.contains("selected")?o.querySelector("ul").firstElementChild.querySelector("a").focus():o.querySelector("a").focus()}}}),e);for(const t of(0,r.A)(e,".isNested")){const e=`BSP.Page.navItemExpanded.${t.textContent.trim()}`,o=(0,i.A)(t,":scope > a"),r=b.A.get(e),a=r?u.collapse:u.expand,s=(0,n.A)("div",{className:"Page-navItemToggle","aria-label":a});o.setAttribute("tabindex",0),t.setAttribute("aria-expanded",t.classList.toggle("is-expanded",r)),o.appendChild(s),o.title=a,o.addEventListener("click",n=>{n.preventDefault();const i=t.classList.toggle("is-expanded");o.title=i?u.collapse:u.expand,s.setAttribute("aria-label",o.title),b.A.toggle(e,i),t.setAttribute("aria-expanded",i),i&&setTimeout(()=>t.scrollIntoView({behavior:"smooth",block:"nearest"}),100)})}window.addEventListener("click",o=>{e.contains(o.target)||t.contains(o.target)||window.BRIGHTSPOT?.ui.cms.enableV5UI||A(e.closest(".Page"),!0)})}),(0,s.A)(".toolUserDisplay",e=>{const t=e.querySelector(".toolUserNotifications"),o=e.querySelector(".toolUserNotifications a");e.parentNode.insertBefore((0,n.A)("div",{className:"Page-notifications","data-new":o.dataset.new,"data-count":o.dataset.count,"data-count-label":o.dataset.countLabel},Array.from(t.children)),e.nextSibling),t.remove()}),(0,s.A)('.Popup[name="profilePanel"] .p-tud > h1',e=>{const t=(0,n.A)("div",{className:"Widget-controls"});for(let e of document.querySelectorAll(".toolUserControls a"))e=e.cloneNode(!0),e.getAttribute("target")?e.setAttribute("data-popup-mode","local"):e.setAttribute("target","_top"),t.appendChild(e);e.parentNode.insertBefore(t,e.nextSibling)}),(0,s.A)(".ProfileDropdown-items > li",e=>{e.addEventListener("click",e=>{e.target.dispatchEvent(new CustomEvent("close",{bubbles:!0}))})}),(0,c.A)(".Page-login",()=>{const e=document.querySelector(".Page-login"),t=e.querySelector("label")?.htmlFor;t&&document.getElementById(t)?.focus()});const h=[];let m;function q(){if(!document.querySelector(".Page").classList.contains("is-guideOpen"))return;const{href:e,name:t}=h[h.length-1];if(e&&e!==m){m=e;const o=document.querySelector(".Page-guide");if(!o.querySelector(`:scope > .frame[name="${t}"]`)){const n=document.createElement("div");n.classList.add("frame"),n.setAttribute("name",t),o.appendChild(n);const i=new URLSearchParams;i.append("subject",e);const r=document.createElement("a");r.href=`${document.querySelector(".Page-guideLink a").href}?${i}`,r.target=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}for(const e of o.querySelectorAll(":scope > .frame")){const t=e.getAttribute("name");h.some(({name:e})=>e===t)||o.removeChild(e)}}}function _(e){const t=e.dataset.href;return"true"===new URLSearchParams(t).get("isFieldGuide")}let W=0;function g(e,t,o,n=!1){if("Tab"!==e.key)return;const i=o!==document&&o?.matches(".is-fromTop"),r={header:(n?"header.Page-header":i&&".Page-search.toolSearch")||null,popupClose:"button.Popup-close.closeButton",searchInput:".SearchInput.SearchWidget-query",actionsToggle:".SearchWidget-actionsToggle",reset:".action.action-cancel",contentTypeForm:".searchFiltersType.SearchWidget-type",searchFiltersRest:".searchFiltersRest",searchHistory:".SearchWidget-history",create:".SearchWidget-create",results:".SearchWidget-result",pageGuide:n?".Page-guide":null,queryFieldDone:o!==document&&o?.matches('[name="queryField"]')?".QueryField-button":null},a=Object.values(r).filter(e=>e).map(e=>{const n=".searchFiltersRest"!==e||t?0:1,i=e.includes("Page-search.toolSearch")?document:o;return(0,d.l)(e,i,n)}).filter(e=>null!==e);(0,l.J)(e,a,!n)}function y(e,t){"Tab"===t.key&&(0,s.A)(e,e=>{const o=(0,M.Kr)(e,{includeContainer:!0});o&&o.length>0&&function(e,t){let o,n;if(t[t.length-1].classList.contains("ContentSelector-search")?(o=t.pop(),n=t.pop()):t[t.length-1].classList.contains("ComboInput")&&(o=t.pop()),o){const e=n?[n,o]:[o];e.length>0&&t.splice(1,0,...e)}let i=null;t[0].nextElementSibling instanceof HTMLElement&&(i=t[0].nextElementSibling);const r=i?(0,M.Kr)(i,{includeContainer:!0}):[],a=e.target instanceof HTMLElement||e.target instanceof SVGElement,s=e.target&&a?t.indexOf(document.activeElement):-1,c=e.shiftKey?"back":"forward";"forward"===c?s>=0&&s<t.length-1?(e.preventDefault(),t[s+1]?.focus()):s===t.length-1&&(e.preventDefault(),r[0]?.focus()):"back"===c&&(a&&e.target===r[0]?(e.preventDefault(),t[t.length-1]?.focus()):s>0&&(e.preventDefault(),t[s-1]?.focus()))}(t,o)})}(0,s.A)([".Page",".Popup"],e=>{if("DateStringCalendarFrame"===e.getAttribute("name"))return;const t=e.dataset.href;t&&(h.push({href:t,name:"guide-"+ ++W}),function(e){const t=new URLSearchParams(e);return null!=t.get("typeId")||null!=t.get("id")||e.includes("?typeId=")||e.includes("?id=")}(t)&&e.setAttribute("data-subject-type","true"),q(),(0,p.A)(e,()=>{h.splice(h.indexOf(t),1),q()}))}),(0,s.A)(".Page-guideLink a",e=>{const t=e.closest(".Page");t.classList.contains("is-guideOpen")&&e.setAttribute("aria-expanded","true"),e.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation();const n=t.querySelector("div.Popup[name='guideField']");n&&n.querySelector(".closeButton").click();const i=t.querySelector(".Page-navToggle");"true"===i?.getAttribute("aria-expanded")&&i.click(),t.classList.add("is-guideOpen"),e.setAttribute("aria-expanded","true");const r=".Page-guide a.Guide-close";(0,c.A)(r,()=>{document.querySelector(r).focus()}),q()},{capture:!0})}),(0,s.A)(".Guide-close",e=>{const t=e.closest(".Page");e.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),document.querySelector(".CIG-row.is-openPopup")?.classList.remove(".is-openPopup"),t.classList.remove("is-guideOpen");const n=t.querySelector(".Page-guideLink a");n.setAttribute("aria-expanded","false"),n.focus(),fetch(e.href)},{capture:!0})}),(0,s.A)('.Popup[name="edit-guide"] .ActionBar > button[name="action-save"]',e=>{e.addEventListener("click",()=>{let t=z(e).popup("source").frame("container")[0];t&&(t.classList.contains("Guide-embedded")&&(t=t.closest(".Guide")?.closest(".frame")),t&&t.parentNode?.removeChild(t))})}),(0,s.A)("a.CIG-guide",e=>{e.addEventListener("click",t=>{if(!document.querySelector(".Page").classList.contains("is-guideOpen"))return;t.preventDefault(),t.stopPropagation();const o=e.getAttribute("href"),n=o.substring(o.indexOf("?")+1),i=new URLSearchParams(n).get("fieldName"),r=document.querySelector('div.Guide-field[data-field="'+i+'"]');r&&r.scrollIntoView({behavior:"smooth"})})}),(0,s.A)('div.Popup[name="edit-guide"] button[name="action-save"]',e=>{e.addEventListener("click",t=>{const o=e.closest('div.Popup[name="edit-guide"]');if(!_(o))return;const n=o.parentElement.querySelector('div.Popup[name="guideField"]');n.parentElement.removeChild(n)})}),(0,s.A)('div.Popup[name="edit-guide"] button.closeButton',e=>{e.addEventListener("click",t=>{if(!_(e.closest('div.Popup[name="edit-guide"]')))return;const o=document.querySelectorAll("div.Page-guide>div.frame");if(!o.length)return;const i=document.querySelector(".Page");let r,a;if(o.length>1&&i.querySelector("div.Popup")?.dataset.href?(r=i.querySelector("div.Popup").dataset.href,a=o.item(o.length-1)):(r=document.querySelector(".Page").dataset.href,a=o.item(0)),!r)return;const s=new URLSearchParams;s.append("subject",r);const c=(0,n.A)("a");c.href=`${document.querySelector(".Page-guideLink a").href}?${s}`,c.target=a.getAttribute("name"),document.body.appendChild(c),c.click(),document.body.removeChild(c)})}),(0,s.A)(".aria--skiptoContent",e=>{e.addEventListener("click",e=>{const t=document.querySelector("body main");let o=t;const n=t.querySelector(".ContentEdit");n&&(o=n.querySelector(".ContentEdit-left")??n);const i=t.querySelector(".main");i&&(o=i);const r=t.querySelector(":scope .SearchWidget-result");r&&(o=r);const a=t.querySelector(":scope > .SearchWidget .SearchResult-view");a&&(o=a),o&&(o.setAttribute("tabindex","-1"),o.focus({focusVisible:!0}))})}),window.addEventListener("keydown",e=>{if("Tab"!==e.key)return;const t=document.querySelector(".Admin-main"),o=document.querySelector(".content-edit"),n=document.querySelector('.SearchWidget[name="searchAdvancedFull"]'),i=e.target.closest(".ProseMirror-fullscreen-container"),r=e.target.closest(".Popup.is-visible"),a=r?.dataset.popupSourceClass,s=r?.querySelector(".ContentEdit"),c=r?.matches('[name="miscSearch"]'),p=a?.includes("ContentSelector-search"),b=r?.matches('[name="queryField"]'),M=c||p||b,z=document.querySelector(".BulkWorkflow");if(!(M||n||i||o||t||r||z))return;const u=".searchFilter.searchFilter-record.SearchWidget-filter.is-record.is-multiple.searchFilter-multiple";if(z){const t=(0,d.q)(z);if(!t)return;(0,l.J)(e,[t])}else if(M){const t=r.querySelector(".SearchWidget-query"),o="none"===window.getComputedStyle(t).display;y(".Popup "+u,e),g(e,o,r)}else if(n&&!r)y(u,e),g(e,!1,document,!0);else if(i){const t=[(0,d.q)(i)].filter(e=>null!==e);(0,l.J)(e,t)}else if(s||!r&&o){const t=s?r:document,o=window.BRIGHTSPOT?.ui.cms.enableV5UI,n=[(0,d.l)(".Page-header",t),o?(0,d.l)("btu-nav-rail",t):null,o?(0,d.l)(".Page-guide",t):null,o?(0,d.l)(".Page-askAi",t):null,o?null:(0,d.l)(".popup-objectId-edit-heading.Link",t),o?null:(0,d.l)(".ContentEdit-title.breadcrumbs",t),o&&s?(0,d.l)(":scope > .Popup-content > .Popup-close",t):null,(0,d.l)(".ContentEdit-top",t),(0,d.l)(".ContentEdit-left",t),(0,d.l)(".ContentEditDrawer.is-open",t),(0,d.l)(".ContentEdit-preview:not([inert])",t),(0,d.l)(".ContentEdit-right.is-visible",t),(0,d.l)(".ContentEdit-toolbar",t),o?null:(0,d.l)(".Page-guide",t),o?null:(0,d.l)(".Page-askAi",t)].filter(e=>null!==e);(0,l.J)(e,n,!!s)}else if(t&&!r){const t=window.BRIGHTSPOT?.ui.cms.enableV5UI,o=[(0,d.l)(".Page-header",document),t?(0,d.l)("btu-nav-rail",document):null,t?(0,d.l)(".Page-guide",document):null,t?(0,d.l)(".Page-askAi",document):null,(0,d.l)('.frame.loaded[name$="Result"] > ul.pagination',document),(0,d.l)(".leftNav.Admin-nav .Widget-controls",document),(0,d.l)(".leftNav.Admin-nav .Widget-controls + ul.LinkTable",document),(0,d.l)('form[target$="Result"]',document),(0,d.l)('.leftNav.Admin-nav form[target="dashboardsResult"] + ul.LinkTable',document),(0,d.l)('.frame.loaded[name$="Result"] > ul.pagination + ul.LinkTable',document)].filter(e=>null!==e);(0,l.J)(e,o,!1)}else if(r){const t=[(0,d.q)(r)].filter(e=>null!==e);(0,l.J)(e,t)}})},35066(e,t,o){"use strict";o(44764),o(84978),o(25809);const n=function(){let e={},t=e.hasOwnProperty;return{subscribe:function(o,n){t.call(e,o)||(e[o]=[]);let i=e[o].push(n)-1;return{remove:function(){delete e[o][i]}}},publish:function(o,n){t.call(e,o)&&e[o].forEach(function(e){e(void 0!==n?n:{})})}}}();window.PubSub=n},66315(e,t,o){"use strict";o(84978),o(25809);var n=o(32246),i=o(30473);function r(e,t){if(e.querySelector(".Message.is-error"))return e.querySelector(".Message.is-error").textContent;const o=e.querySelector(".QueryField-keyword"),n=e.querySelector(".QueryField-queryString").textContent;let i,r,a="";o.textContent&&(a+='"'+o.textContent+'" '+QF_STRING+" ");const s=e.querySelector(".SearchWidget-type");s.querySelector(".ComboInput-selected")?r=s.querySelector(".ComboInput-selected"):s.querySelector("option[selected]")?r=s.querySelector("option[selected]"):s.querySelector("select > option")?r=s.querySelector("select > option"):e.querySelector("[data-selected-type-label]")?i=e.querySelector("[data-selected-type-label]").dataset.selectedTypeLabel:r=t.closest(".CIG-row").querySelector(".CIG-label label"),a+=i||r.textContent;const c=e.querySelector(".SearchWidget-filter.searchFilter-visibilities"),p=c.querySelectorAll(".ComboInput-selected"),b=c.querySelectorAll('option[selected="selected"]');if((p.length>0||b.length>0&&!c.querySelector(".ComboInput-label"))&&(a+=" "+QF_VISIBILITIES+" ",p.length>0?p.forEach(e=>{a+=e.textContent+", "}):b.length>0&&!c.querySelector(".ComboInput-label")&&b.forEach(e=>{a+=e.textContent+", "}),a=a.substring(0,a.length-2)),n.match(/cms.content.publishDate/)){a+=" "+QF_PUBLISH_DATE+" ";const e={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"},t=n.match(/cms.content.publishDate greaterthanorequals \d+/),o=n.match(/cms.content.publishDate lessthanorequals \d+/);if(t){const o=t[0].match(/\d+/)[0],n=new Date(parseInt(o));a+=QF_PUBLISH_START+" "+n.toLocaleString(void 0,e)}if(t&&o&&(a+=" "+QF_CONJUNCTION+" "),o){const t=o[0].match(/\d+/)[0],n=new Date(parseInt(t));a+=QF_PUBLISH_END+" "+n.toLocaleString(void 0,e)}}return a}(0,n.A)(".QueryField input",e=>{e.closest(".CIG.TC").classList.add("is-query")}),(0,n.A)(".QueryField input[data-initialized]",e=>{!function(e){const t=document.createElement("div");t.classList.add("QueryField-toggle"),t.frame=e.frame,e.frame.queryToggle=t;const o=document.createElement("span");o.classList.add("QueryField-icon");const n=document.createElement("span");n.classList.add("QueryField-label"),e.closest(".CIG-row").appendChild(t),t.appendChild(n),t.appendChild(o),t.label=n}(e.closest(".QueryField"))}),(0,n.A)(".QueryField-frame .SearchWidget-result.loaded",e=>{const t=e.closest(".QueryField-frame"),o=t.queryToggle;o&&(o.label.textContent=r(e.closest(".widget-queryField"),o),o.closest(".QueryField-toggle.is-open")&&e.closest(".Popup.is-fromRight.popup-show").classList.add("is-visible")),t.style["z-index"]=(0,i.default)()}),(0,n.A)(".QueryField-button",e=>{e.addEventListener("click",t=>{t.preventDefault();const o=e.closest(".QueryField-frame").queryToggle,n=e.closest(".widget-queryField");if(o){o.label.textContent=r(n,o),o.classList.remove("is-open");const e=o.closest(".CIG-row")?.querySelector(".ComboInput")||o.closest(".CIG-row")?.parentElement?.closest(".CIG-row")?.querySelector(".ComboInput");e?.focus()}e.closest(".Popup").classList.remove("is-visible"),document.querySelector(".QueryField-frame > .Popup").classList.remove("is-visible")})}),(0,n.A)(".QueryField-toggle",e=>{e.addEventListener("click",()=>{const t=e.frame;e.classList.add("is-open");const o=t.querySelector(".Popup.is-ready");o.classList.add("is-visible"),o.querySelector(".SearchWidget-query input")?.focus()})}),(0,n.A)(".widget-queryField > .SearchWidget-title",e=>{e.textContent="Edit Dynamic Query"})},19106(e,t,o){"use strict";o(84978),o(92280);var n=o(5292),i=o(95628),r=o(40627),a=o(45594),s=o(32246),c=o(10013);const p=window.BRIGHTSPOT?.ui.tooltips,b=p?.expandAll,M=p?.collapseAll;window.addEventListener("click",e=>{const t=e.target,o=t.closest(".RCIG-addSelect");if(o){const e=(0,i.A)(o,":scope > .ComboInput");e&&!e.contains(t)&&e.click()}}),(0,c.A)(".RCIG-list > .RCIG-item",e=>{(0,s.A)(e,":scope > .RCIG-title",t=>{t.role="button",t.ariaExpanded="false",t.ariaLabel=`${t.textContent}`,e.hasAttribute("data-empty")||(t.ariaExpanded="false",t.addEventListener("click",()=>{const o=!e.classList.contains("is-collapsed");t.ariaExpanded=o?"true":"false"}))})}),(0,c.A)(".RCIG",e=>{const t=e.querySelector(":scope > .RCIG-list");if(!t)return;let o=t.children.length;for(const e of t.children)(0,s.A)(e,":scope > .RCIG-title",t=>{t.role="button",t.ariaExpanded="false",t.ariaLabel=`${t.textContent}`,e.hasAttribute("data-empty")||(t.ariaExpanded="false",t.addEventListener("click",()=>{const o=!e.classList.contains("is-collapsed");t.ariaExpanded=o?"true":"false"}))});e.dataset.rcigSize=o;const i=e.previousElementSibling?.querySelector(".CIG-label label")?.textContent;let c=b,d=M;i&&(c+=` ${i}`,d+=` ${i}`),e.addEventListener("repeatable.add",()=>{e.dataset.rcigSize=++o,e.closest(".CIG-row")?.classList.add("is-expandable")}),e.addEventListener("repeatable.remove",()=>{e.dataset.rcigSize=--o,0===o&&e.closest(".CIG-row")?.classList.remove("is-expandable")});const l=e.querySelector(":scope > ol, :scope > ul");if(Array.from(l.children).some(e=>!e.hasAttribute("data-empty"))){e.addEventListener("repeatable.toggle",()=>{const e=t.querySelectorAll(":scope > li.is-collapsed").length;0===e?(i.classList.add("is-expanded"),i.title=d,i.setAttribute("aria-label",d)):e===o&&(i.classList.remove("is-expanded"),i.title=c,i.setAttribute("aria-label",c))});const i=(0,n.A)("button",{className:"RCIG-expandAll",type:"button",title:c,"aria-label":c,onclick:t=>{const o=i.classList.toggle("is-expanded");o?(i.title=d,i.setAttribute("aria-label",d),s.textContent=p?.expandedAll):(i.title=c,i.setAttribute("aria-label",c),s.textContent=p?.collapsedAll);for(const t of(0,r.A)(e,":scope > .RCIG-list > .RCIG-item > .RCIG-title")){const e=t.parentElement.classList.contains("is-collapsed");(o&&e||!o&&!e)&&t.click()}}}),s=(0,n.A)("div",{className:"screen-reader-only","aria-live":"polite"});0===o?i.classList.add("is-expanded"):e.closest(".CIG-row")?.classList.add("is-expandable"),(0,a.A)(s,e),(0,a.A)(i,e)}})},90819(e,t,o){"use strict";o(67219),o(44764),o(84978),o(13722),o(25809),o(91672);var n=o(32246),i=o(5292),r=o(10013),a=o(1439);(0,n.A)(".richtext",e=>{const t=e.closest("div");t.style.position="relative";const o=e.getBoundingClientRect().height,n=(0,i.A)("div",{className:"ProseMirror-loader"});n.style.minHeight=`${o}px`,t.appendChild(n)});const s=new Map;RICH_TEXT_ELEMENTS.forEach(e=>{let t=e.tag,o="";const n=/[\u0030-\u0039\u0061-\u007A\u0041-\u005A-]/g;[...t].forEach(e=>{let t=e;e.match(n)||(t=`--${e.charCodeAt(0)}--`),o+=t}),s.set(t,o)}),window.RICH_TEXT_ELEMENTS_PM=RICH_TEXT_ELEMENTS.map(e=>{if(e.tag=s.get(e.tag),e.context){const t=[];e.context.forEach(e=>{let o=e;o&&(o=s.get(e)),t.push(o)}),e.context=t}return e}),(0,r.A)(".richtext",async e=>{const{RTE:t}=await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(4582),o.e(2825),o.e(9360),o.e(4795),o.e(1386)]).then(o.bind(o,73061)),n=e.getAttribute("data-rte-toolbar");let i=RICH_TEXT_TOOLBARS[n];if(!window.BRIGHTSPOT?.ai?.AI_CHAT_ENABLED){const e=["rte2-toolbar-track-ai","rte2-toolbar-ai-inline"];i=i.filter(t=>!e.includes(t.className))}const r=e.getAttribute("data-rte-lines"),a="true"===e.getAttribute("data-inline"),c=e.getAttribute("data-user"),p=e.getAttribute("data-user-id");let b=e.getAttribute("data-rte-tags");if(b)try{b=JSON.parse(b).map(e=>s.get(e))}catch(e){console.log(e)}const M=e.getAttribute("name"),d="true"===e.getAttribute("data-collab"),l=new t(e,i,a,c,p,b,M,d,s,parseInt(r,10)||1,RICH_TEXT_ELEMENTS_PM);l.init(),e.rte=l,e.dispatchEvent(new CustomEvent("brightspot.rte.init",{bubbles:!0,detail:{rte:l}}))}),(0,n.A)(".RichTextEditor-uploadComplete",e=>{let t=e.dataset.html;if(!t)return;const o=a(e),n=o.popup("source");if(!n)return;const i=n.attr("data-event-id");t=t.replace(/<br>/g,"");const r=document.createElement("div");r.innerHTML=t;const s=r.children,c=[];[...s].forEach(e=>{const t=[...e.attributes].reduce((e,t)=>(e[t.name]=t.value,e),{});c.push({label:e.innerText,data:t,tag:e.tagName.toLowerCase()})}),PubSub.publish(i,c),o.popup("close")})},11532(e,t,o){"use strict";o(67219),o(84978),o(25809),o(91672);var n=o(32246);(0,n.A)(".SearchFields-input",e=>{const t=window.BRIGHTSPOT?.ui.tooltips;e.setAttribute("title",e.closest(".SearchFields-hide")?t.fieldSelect:t.fieldHide),e.addEventListener("keydown",i),e.addEventListener("click",r)}),(0,n.A)(".SearchFields-filter",e=>{e.addEventListener("keydown",i)});const i=e=>{"Enter"===e.key&&e.preventDefault()},r=e=>{e.preventDefault(),e.stopPropagation();const t=e.target.matches("input")?e.target:e.target.querySelector("input"),o=t.closest(".SearchFields"),n=t.closest("li"),i=n.closest("div");let s,c,p=n.nextSibling;if(o.querySelector(".SearchFields-tab-container")){const e=o.querySelector(".SearchFields-tab-container").querySelector("ul").querySelector(".is-selected").classList[0].toLowerCase();s=o.querySelector(`.SearchFields-container-${e} > .SearchFields-displayContainer > .SearchFields-displayTitle > ul`),c=o.querySelector(`.SearchFields-container-${e} > .SearchFields-hide`)}else s=o.querySelector(".SearchFields-displayTitle > ul"),c=o.querySelector(".SearchFields-hide > ul");if(i.classList.contains("SearchFields-hide")){const e=n.cloneNode(!0),t=e.querySelector(".SearchFields-input");t.addEventListener("click",r),t.setAttribute("title",window.BRIGHTSPOT?.ui.tooltips.fieldHide),s.appendChild(e);const o=s?.querySelector(":scope > li .SearchFields-input");if(p)if(p.classList.contains("is-disabled"))for(;p?.classList.contains("is-disabled");)p=p.nextSibling,p?p.classList.contains("is-disabled")||p.querySelector("input")?.focus():o?.focus();else p.querySelector("input")?.focus();else o?.focus()}else p?p.querySelector("input")?.focus():o?.querySelector(".actions > button")?.focus(),n.remove();a(t.value,c)},a=(e,t)=>{const o=t.querySelector(`input[value="${e}"]`),n=o?.closest("li");n?.classList.contains("is-disabled")&&o.addEventListener("click",r),n?.classList.toggle("is-disabled"),o?.toggleAttribute("disabled"),n?.querySelector(".SearchFields-drag")?.toggleAttribute("disabled")};(0,n.A)(".SearchFields .SearchFields-filter",e=>{e.addEventListener("input",t=>{const o=e.closest(".SearchFields-hide"),n=new RegExp(t.target.value.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");o.querySelectorAll("label").forEach(e=>{const t=e.parentElement;n.test(e.getAttribute("data-display-name"))?t.style.display="flex":t.style.display="none"}),o.querySelectorAll(".SearchFields-subheading").forEach(e=>{const t=e.nextSibling;t.querySelector('li[style*="display: flex"]')?(e.style.display="flex",t.style.display="block"):(e.style.display="none",t.style.display="none")})})}),(0,n.A)(".SearchFields .SearchFields-tab-container .SearchFields-tab-ul",e=>{const t=e.closest(".SearchFields");t.classList.add("has-tabs");const o=[...e.children].filter(e=>e.classList.contains("is-selected"))[0],n=[...e.children].filter(e=>!e.classList.contains("is-selected"))[0],i=t.querySelector(".SearchFields-container-"+o.classList[0].toLowerCase()),r=t.querySelector(".SearchFields-container-"+n.classList[0].toLowerCase());o.addEventListener("click",()=>{s(o,n,i,r)}),n.addEventListener("click",()=>{s(n,o,i,r)})}),(0,n.A)(".SearchFields-container",e=>{const t=e.querySelectorAll(".SearchFields-hide .SearchFields-input"),o=e.querySelectorAll(".SearchFields-displayContainer .SearchFields-input"),n=Array.from(o).map(e=>e.value);n&&t.forEach(e=>{if(n.includes(e.value)){const t=e.closest(".RCIG-item");t?.classList.add("is-disabled"),e.setAttribute("disabled",""),t?.querySelector(".SearchFields-drag")?.setAttribute("disabled","")}}),e.querySelector(".SearchFields-hide .SearchFields-subheading")&&e.classList.add("has-subheadings"),e.querySelectorAll(".SearchFields-hide ul, .SearchFields-displayContainer ul").forEach(e=>{e.closest(".SearchFields-hide")&&e.classList.add("is-clonable"),e.addEventListener("add",t=>{if(t.detail&&(t=t.detail),!t.item)return;const o=t.item.querySelector(".SearchFields-input"),n=o.value,i=t.from.classList.contains("is-clonable"),s=t.to.classList.contains("is-clonable"),c=e.closest(".SearchFields-hide");setTimeout(()=>{if(o.addEventListener("click",r),s&&i){t.item.remove();const e=c?.querySelector(`.SearchFields-input[value="${n}"]`).closest("li"),o=e.querySelector(".SearchFields-input");e.addEventListener("animationend",()=>{e.classList.remove("is-added")}),e.classList.add("is-added"),o.addEventListener("click",r),o.checked=!1}else i?(o.checked=!0,a(n,t.from)):c?.querySelectorAll(`.SearchFields-input[value="${n}"]`).forEach(e=>{const o=e.closest("li");o.classList.contains("is-disabled")&&(t.item.remove(),a(n,c),e.scrollIntoView({block:"center"}),e.checked=!1,o.addEventListener("animationend",()=>{o.classList.remove("is-added")}),o.classList.add("is-added"))})},0)})})});const s=(e,t,o,n)=>{e.classList.contains("is-selected")||(e.classList.toggle("is-selected"),t.classList.toggle("is-selected"),n.classList.toggle("is-hidden"),o.classList.toggle("is-hidden"))}},90880(e,t,o){"use strict";o(67219),o(84978),o(25809);var n=o(5292),i=o(40627),r=o(68243),a=o(32246),s=o(72402),c=o.n(s),p=o(34980),b=o(66556),M=o(30473);const d=window.BRIGHTSPOT?.ui.tooltips;function l(e,t){e.preventDefault(),e.stopPropagation();const o=e.target.closest(".SearchWidget-form"),n=o.querySelector(`.searchFiltersRest input[name="${t}"]`),i=o.querySelector('input[name="view"]'),r=o.querySelector(".SearchResult-views li.selected a").dataset.view;n.value=e.target.value,i.value=r,n.shadowField=t,n.dispatchEvent(new Event("change",{bubbles:!0}))}(0,a.A)(".searchResult-checkAll",e=>{const t=e.closest("table");if(t){const o=(0,i.A)(t,':scope > tbody input[type="checkbox"]'),n=()=>{const n=(0,i.A)(t,':scope > tbody input[type="checkbox"]:checked');e.checked=o.length>0&&n.length===o.length};for(const e of o)e.addEventListener("click",e=>{n()});e.addEventListener("click",t=>{const n=e.checked,i="data-frame-"+(n?"check":"uncheck");let r="";for(const t of o)t.checked=n,e.getAttribute(i).includes(t.value)||(r+=`&id=${encodeURIComponent(t.value)}`);e.setAttribute(i,e.getAttribute(i)+r)}),n()}}),(0,a.A)(".SearchResult-view > .SearchResult-actions.loaded",e=>{const t=e.closest(".SearchResult-view"),o=(0,n.A)("div",{className:"SearchResult-actions-wrapper"});e.querySelectorAll('[role="menuitem"]').forEach(e=>e.setAttribute("tabindex","-1"));const i=(0,n.A)("button",{className:"SearchResult-actions-toggle",id:"SearchResult-actions-toggle",title:d.actions?.actions,"aria-haspopup":"menu","aria-label":d.actions?.searchResult,"aria-expanded":"false",onclick:()=>{(0,b.H0)(e,i),(0,b.AM)(e,i)}});if(t.prepend(o),o.appendChild(i),o.appendChild(e),(0,b.D1)(e,i),t.closest('.SearchWidget[name="searchAdvancedFull"]'))return;const r=t.querySelector('.SearchResult-action-link[href*="/searchAdvancedFull"]'),a=(0,n.A)("button",{className:"SearchResult-fullscreen",title:d.fullScreenSearch,"aria-label":d.fullScreen,onclick:e=>{r.click()}});o.appendChild(a)}),(0,a.A)(".SearchResult-actions .SearchResult-selectionReset",e=>{e.addEventListener("click",()=>{const t=e.closest(".SearchResult-actions-wrapper");t?.querySelector(".SearchResult-actions-toggle")?.focus()})}),(0,a.A)(".SearchResult-views",e=>{const t=e.closest(".SearchWidget"),o=t?.querySelector(".searchFiltersRest");if(o){const t=o.querySelector('input[name="view"]');t&&e.querySelectorAll("[data-view]").forEach(e=>{e.addEventListener("click",()=>t.value=e.dataset.view)})}}),(0,a.A)(".SearchResult-images",e=>{const t=e.closest(".SearchWidget-form"),o=t?.querySelector('.searchFiltersRest input[name="iz"]'),i=e.closest(".SearchResult-list"),a=o?.value||p.A.get("BSP.SearchResult.imageHeight")||20;e.setAttribute("data-height",a),i&&(0,r.A)((0,n.A)("div",{className:"SearchResult-imageHeightInput"},(0,n.A)("input",{type:"range",title:d.imageHeight,min:1,max:100,step:1,value:a,"aria-label":d.imageHeight,"shadow-field":o?.name,oninput:({target:{value:t}})=>{e.setAttribute("data-height",t),p.A.set("BSP.SearchResult.imageHeight",t)},onmouseup:e=>{o&&a!==e.target.value&&l(e,o.name)}})),i)}),(0,a.A)(".SearchResult-board-field",e=>{e.addEventListener("change",t=>{l(t,e.name)})}),(0,a.A)(".SearchResult [data-highlight]",e=>{const t=e.dataset.highlight;if(t){const o=e.matches("table")&&e.querySelector("tbody")||e;new(c())(o).mark(t.trim().split(/\s+/),{className:"SearchResult-highlight"})}}),(0,a.A)('.Popup[name="bulkArchive"]',e=>{const t=e.parentNode.querySelector('.Popup[name="miscSearch"] .queryRestrictions'),o=e.querySelector(".closeButton");o&&o.addEventListener("click",function(){if(e.querySelector(".message.is-success")){let o=new CustomEvent("submit",{bubbles:!0});t.dispatchEvent(o),e.parentNode.removeChild(e)}})}),(0,a.A)('.Popup[name="miscSearch"] .SearchResult-list',e=>{e.addEventListener("click",function(e){const t=e.target.closest('a[href*="/edit.jsp"]');if(!t)return;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||0!==e.button)return;e.preventDefault();const o=(0,n.A)("div",{id:"searchResult-loader-overlay",className:"searchResult-loader-overlay"},(0,n.A)("span",{className:"searchResult-loader-spinner"}));o.style.zIndex=(0,M.default)(),document.body.appendChild(o),window.location=t.href})})},34216(e,t,o){"use strict";var n=o(32246),i=o(47626);(0,n.A)(".action-share",async e=>{const t=e.closest(".PreviewFrame");if(!t)return;const o=t.querySelector(".PreviewFrame-typeForm");let i=null;if(o){const e=o.querySelector('select[name="previewType"]');i=e.options[e.selectedIndex].value}e.addEventListener("click",t=>{let o=e.href;return!o||(i&&(o=o+"&defaultPreviewTypeId="+encodeURIComponent(i)),e.href=o,!0)}),(0,n.A)(".PreviewFrame-iFrameControlsForm",async t=>{t.addEventListener("submit",o=>{let n=e.getAttribute("data-original-href");if(n||(n=e.href,e.setAttribute("data-original-href",n)),!n)return!0;let i=new URLSearchParams(new FormData(t)).toString();return i&&(n=n+"&="+i),e.href=n,!0})})}),(0,n.A)(".SharePreview",async e=>{const t=e.querySelector(".PreviewFrame"),o=new i.A(t);o.isVisible=!0,o.updatePreview()})},83368(e,t,o){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function i(e,t,o){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r.apply(null,arguments)}function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach(function(t){i(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function p(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}o.d(t,{Ts:()=>kt}),o(67219),o(44764),o(84978),o(13722),o(39589),o(25809),o(92280);var b=p(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),M=p(/Edge/i),d=p(/firefox/i),l=p(/safari/i)&&!p(/chrome/i)&&!p(/android/i),z=p(/iP(ad|od|hone)/i),u=p(/chrome/i)&&p(/android/i),O={capture:!1,passive:!1};function A(e,t,o){e.addEventListener(t,o,!b&&O)}function f(e,t,o){e.removeEventListener(t,o,!b&&O)}function h(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function m(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function q(e,t,o,n){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&h(e,t):h(e,t))||n&&e===o)return e;if(e===o)break}while(e=m(e))}return null}var _,W=/\s+/g;function g(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(W," ").replace(" "+t+" "," ");e.className=(n+(o?" "+t:"")).replace(W," ")}}function y(e,t,o){var n=e&&e.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in n||-1!==t.indexOf("webkit")||(t="-webkit-"+t),n[t]=o+("string"==typeof o?"":"px")}}function v(e,t){var o="";if("string"==typeof e)o=e;else do{var n=y(e,"transform");n&&"none"!==n&&(o=n+" "+o)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(o)}function L(e,t,o){if(e){var n=e.getElementsByTagName(t),i=0,r=n.length;if(o)for(;i<r;i++)o(n[i],i);return n}return[]}function w(){return document.scrollingElement||document.documentElement}function R(e,t,o,n,i){if(e.getBoundingClientRect||e===window){var r,a,s,c,p,M,d;if(e!==window&&e.parentNode&&e!==w()?(a=(r=e.getBoundingClientRect()).top,s=r.left,c=r.bottom,p=r.right,M=r.height,d=r.width):(a=0,s=0,c=window.innerHeight,p=window.innerWidth,M=window.innerHeight,d=window.innerWidth),(t||o)&&e!==window&&(i=i||e.parentNode,!b))do{if(i&&i.getBoundingClientRect&&("none"!==y(i,"transform")||o&&"static"!==y(i,"position"))){var l=i.getBoundingClientRect();a-=l.top+parseInt(y(i,"border-top-width")),s-=l.left+parseInt(y(i,"border-left-width")),c=a+r.height,p=s+r.width;break}}while(i=i.parentNode);if(n&&e!==window){var z=v(i||e),u=z&&z.a,O=z&&z.d;z&&(c=(a/=O)+(M/=O),p=(s/=u)+(d/=u))}return{top:a,left:s,bottom:c,right:p,width:d,height:M}}}function k(e,t,o){for(var n=B(e,!0),i=R(e)[t];n;){var r=R(n)[o];if(!("top"===o||"left"===o?i>=r:i<=r))return n;if(n===w())break;n=B(n,!1)}return!1}function T(e,t,o,n){for(var i=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Pe.ghost&&(n||a[r]!==Pe.dragged)&&q(a[r],o.draggable,e,!1)){if(i===t)return a[r];i++}r++}return null}function S(e,t){for(var o=e.lastElementChild;o&&(o===Pe.ghost||"none"===y(o,"display")||t&&!h(o,t));)o=o.previousElementSibling;return o||null}function E(e,t){var o=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Pe.clone||t&&!h(e,t)||o++;return o}function N(e){var t=0,o=0,n=w();if(e)do{var i=v(e),r=i.a,a=i.d;t+=e.scrollLeft*r,o+=e.scrollTop*a}while(e!==n&&(e=e.parentNode));return[t,o]}function B(e,t){if(!e||!e.getBoundingClientRect)return w();var o=e,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var i=y(o);if(o.clientWidth<o.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!o.getBoundingClientRect||o===document.body)return w();if(n||t)return o;n=!0}}}while(o=o.parentNode);return w()}function C(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function D(e,t){return function(){if(!_){var o=arguments;1===o.length?e.call(this,o[0]):e.apply(this,o),_=setTimeout(function(){_=void 0},t)}}}function x(e,t,o){e.scrollLeft+=t,e.scrollTop+=o}function X(e){var t=window.Polymer,o=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):o?o(e).clone(!0)[0]:e.cloneNode(!0)}function Y(e,t){y(e,"position","absolute"),y(e,"top",t.top),y(e,"left",t.left),y(e,"width",t.width),y(e,"height",t.height)}function P(e){y(e,"position",""),y(e,"top",""),y(e,"left",""),y(e,"width",""),y(e,"height","")}function I(e,t,o){var n={};return Array.from(e.children).forEach(function(i){var r,a,s,c;if(q(i,t.draggable,e,!1)&&!i.animated&&i!==o){var p=R(i);n.left=Math.min(null!==(r=n.left)&&void 0!==r?r:1/0,p.left),n.top=Math.min(null!==(a=n.top)&&void 0!==a?a:1/0,p.top),n.right=Math.max(null!==(s=n.right)&&void 0!==s?s:-1/0,p.right),n.bottom=Math.max(null!==(c=n.bottom)&&void 0!==c?c:-1/0,p.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var H="Sortable"+(new Date).getTime();var j=[],F={initializeByDefault:!0},G={mount:function(e){for(var t in F)F.hasOwnProperty(t)&&!(t in e)&&(e[t]=F[t]);j.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),j.push(e)},pluginEvent:function(e,t,o){var n=this;this.eventCanceled=!1,o.cancel=function(){n.eventCanceled=!0};var i=e+"Global";j.forEach(function(n){t[n.pluginName]&&(t[n.pluginName][i]&&t[n.pluginName][i](s({sortable:t},o)),t.options[n.pluginName]&&t[n.pluginName][e]&&t[n.pluginName][e](s({sortable:t},o)))})},initializePlugins:function(e,t,o,n){for(var i in j.forEach(function(n){var i=n.pluginName;if(e.options[i]||n.initializeByDefault){var a=new n(e,t,e.options);a.sortable=e,a.options=e.options,e[i]=a,r(o,a.defaults)}}),e.options)if(e.options.hasOwnProperty(i)){var a=this.modifyOption(e,i,e.options[i]);void 0!==a&&(e.options[i]=a)}},getEventProperties:function(e,t){var o={};return j.forEach(function(n){"function"==typeof n.eventProperties&&r(o,n.eventProperties.call(t[n.pluginName],e))}),o},modifyOption:function(e,t,o){var n;return j.forEach(function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[t]&&(n=i.optionListeners[t].call(e[i.pluginName],o))}),n}};function $(e){var t=e.sortable,o=e.rootEl,n=e.name,i=e.targetEl,r=e.cloneEl,a=e.toEl,c=e.fromEl,p=e.oldIndex,d=e.newIndex,l=e.oldDraggableIndex,z=e.newDraggableIndex,u=e.originalEvent,O=e.putSortable,A=e.extraEventProperties;if(t=t||o&&o[H]){var f,h=t.options,m="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||b||M?(f=document.createEvent("Event")).initEvent(n,!0,!0):f=new CustomEvent(n,{bubbles:!0,cancelable:!0}),f.to=a||o,f.from=c||o,f.item=i||o,f.clone=r,f.oldIndex=p,f.newIndex=d,f.oldDraggableIndex=l,f.newDraggableIndex=z,f.originalEvent=u,f.pullMode=O?O.lastPutMode:void 0;var q=s(s({},A),G.getEventProperties(n,t));for(var _ in q)f[_]=q[_];o&&o.dispatchEvent(f),h[m]&&h[m].call(t,f)}}var U=["evt"],V=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=o.evt,i=function(e,t){if(null==e)return{};var o,n,i=function(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)o=r[n],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}(o,U);G.pluginEvent.bind(Pe)(e,t,s({dragEl:K,parentEl:Q,ghostEl:Z,rootEl:ee,nextEl:te,lastDownEl:oe,cloneEl:ne,cloneHidden:ie,dragStarted:Ae,putSortable:be,activeSortable:Pe.active,originalEvent:n,oldIndex:re,oldDraggableIndex:se,newIndex:ae,newDraggableIndex:ce,hideGhostForTarget:De,unhideGhostForTarget:xe,cloneNowHidden:function(){ie=!0},cloneNowShown:function(){ie=!1},dispatchSortableEvent:function(e){J({sortable:t,name:e,originalEvent:n})}},i))};function J(e){$(s({putSortable:be,cloneEl:ne,targetEl:K,rootEl:ee,oldIndex:re,oldDraggableIndex:se,newIndex:ae,newDraggableIndex:ce},e))}var K,Q,Z,ee,te,oe,ne,ie,re,ae,se,ce,pe,be,Me,de,le,ze,ue,Oe,Ae,fe,he,me,qe,_e=!1,We=!1,ge=[],ye=!1,ve=!1,Le=[],we=!1,Re=[],ke="undefined"!=typeof document,Te=z,Se=M||b?"cssFloat":"float",Ee=ke&&!u&&!z&&"draggable"in document.createElement("div"),Ne=function(){if(ke){if(b)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Be=function(e,t){var o=y(e),n=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),i=T(e,0,t),r=T(e,1,t),a=i&&y(i),s=r&&y(r),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+R(i).width,p=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+R(r).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var b="left"===a.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==b?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=n&&"none"===o[Se]||r&&"none"===o[Se]&&c+p>n)?"vertical":"horizontal"},Ce=function(e){function t(e,o){return function(n,i,r,a){var s=n.options.group.name&&i.options.group.name&&n.options.group.name===i.options.group.name;if(null==e&&(o||s))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(n,i,r,a),o)(n,i,r,a);var c=(o?n:i).options.group.name;return!0===e||"string"==typeof e&&e===c||e.join&&e.indexOf(c)>-1}}var o={},n=e.group;n&&"object"==c(n)||(n={name:n}),o.name=n.name,o.checkPull=t(n.pull,!0),o.checkPut=t(n.put),o.revertClone=n.revertClone,e.group=o},De=function(){!Ne&&Z&&y(Z,"display","none")},xe=function(){!Ne&&Z&&y(Z,"display","")};ke&&!u&&document.addEventListener("click",function(e){if(We)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),We=!1,!1},!0);var Xe=function(e){if(K){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,r=e.clientY,ge.some(function(e){var t=e[H].options.emptyInsertThreshold;if(t&&!S(e)){var o=R(e),n=i>=o.left-t&&i<=o.right+t,s=r>=o.top-t&&r<=o.bottom+t;return n&&s?a=e:void 0}}),a);if(t){var o={};for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[H]._onDragOver(o)}}var i,r,a},Ye=function(e){K&&K.parentNode[H]._isOutsideThisEl(e.target)};function Pe(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=r({},t),e[H]=this;var o,n,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Be(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Pe.supportPointer&&"PointerEvent"in window&&(!l||z),emptyInsertThreshold:5};for(var a in G.initializePlugins(this,e,i),i)!(a in t)&&(t[a]=i[a]);for(var c in Ce(t),this)"_"===c.charAt(0)&&"function"==typeof this[c]&&(this[c]=this[c].bind(this));this.nativeDraggable=!t.forceFallback&&Ee,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?A(e,"pointerdown",this._onTapStart):(A(e,"mousedown",this._onTapStart),A(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(A(e,"dragover",this),A(e,"dragenter",this)),ge.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),r(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(e){if("none"!==y(e,"display")&&e!==Pe.ghost){n.push({target:e,rect:R(e)});var t=s({},n[n.length-1].rect);if(e.thisAnimationDuration){var o=v(e,!0);o&&(t.top-=o.f,t.left-=o.e)}e.fromRect=t}})},addAnimationState:function(e){n.push(e)},removeAnimationState:function(e){n.splice(function(e,t){for(var o in e)if(e.hasOwnProperty(o))for(var n in t)if(t.hasOwnProperty(n)&&t[n]===e[o][n])return Number(o);return-1}(n,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(o),void("function"==typeof e&&e());var i=!1,r=0;n.forEach(function(e){var o=0,n=e.target,a=n.fromRect,s=R(n),c=n.prevFromRect,p=n.prevToRect,b=e.rect,M=v(n,!0);M&&(s.top-=M.f,s.left-=M.e),n.toRect=s,n.thisAnimationDuration&&C(c,s)&&!C(a,s)&&(b.top-s.top)/(b.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(o=function(e,t,o,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))*n.animation}(b,c,p,t.options)),C(s,a)||(n.prevFromRect=a,n.prevToRect=s,o||(o=t.options.animation),t.animate(n,b,s,o)),o&&(i=!0,r=Math.max(r,o),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},o),n.thisAnimationDuration=o)}),clearTimeout(o),i?o=setTimeout(function(){"function"==typeof e&&e()},r):"function"==typeof e&&e(),n=[]},animate:function(e,t,o,n){if(n){y(e,"transition",""),y(e,"transform","");var i=v(this.el),r=i&&i.a,a=i&&i.d,s=(t.left-o.left)/(r||1),c=(t.top-o.top)/(a||1);e.animatingX=!!s,e.animatingY=!!c,y(e,"transform","translate3d("+s+"px,"+c+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),y(e,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),y(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){y(e,"transition",""),y(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},n)}}}))}function Ie(e,t,o,n,i,r,a,s){var c,p,d=e[H],l=d.options.onMove;return!window.CustomEvent||b||M?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=t,c.from=e,c.dragged=o,c.draggedRect=n,c.related=i||t,c.relatedRect=r||R(t),c.willInsertAfter=s,c.originalEvent=a,e.dispatchEvent(c),l&&(p=l.call(d,c,a)),p}function He(e){e.draggable=!1}function je(){we=!1}function Fe(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,n=0;o--;)n+=t.charCodeAt(o);return n.toString(36)}function Ge(e){return setTimeout(e,0)}function $e(e){return clearTimeout(e)}Pe.prototype={constructor:Pe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(fe=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,K):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,n=this.options,i=n.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,p=n.filter;if(function(e){Re.length=0;for(var t=e.getElementsByTagName("input"),o=t.length;o--;){var n=t[o];n.checked&&Re.push(n)}}(o),!K&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||n.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!l||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=q(s,n.draggable,o,!1))&&s.animated||oe===s)){if(re=E(s),se=E(s,n.draggable),"function"==typeof p){if(p.call(this,e,s,this))return J({sortable:t,rootEl:c,name:"filter",targetEl:s,toEl:o,fromEl:o}),V("filter",t,{evt:e}),void(i&&e.preventDefault())}else if(p&&(p=p.split(",").some(function(n){if(n=q(c,n.trim(),o,!1))return J({sortable:t,rootEl:n,name:"filter",targetEl:s,fromEl:o,toEl:o}),V("filter",t,{evt:e}),!0})))return void(i&&e.preventDefault());n.handle&&!q(c,n.handle,o,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,o){var n,i=this,r=i.el,a=i.options,s=r.ownerDocument;if(o&&!K&&o.parentNode===r){var c=R(o);if(ee=r,Q=(K=o).parentNode,te=K.nextSibling,oe=o,pe=a.group,Pe.dragged=K,Me={target:K,clientX:(t||e).clientX,clientY:(t||e).clientY},ue=Me.clientX-c.left,Oe=Me.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,K.style["will-change"]="all",n=function(){V("delayEnded",i,{evt:e}),Pe.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!d&&i.nativeDraggable&&(K.draggable=!0),i._triggerDragStart(e,t),J({sortable:i,name:"choose",originalEvent:e}),g(K,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){L(K,e.trim(),He)}),A(s,"dragover",Xe),A(s,"mousemove",Xe),A(s,"touchmove",Xe),a.supportPointer?(A(s,"pointerup",i._onDrop),!this.nativeDraggable&&A(s,"pointercancel",i._onDrop)):(A(s,"mouseup",i._onDrop),A(s,"touchend",i._onDrop),A(s,"touchcancel",i._onDrop)),d&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),V("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(M||b))n();else{if(Pe.eventCanceled)return void this._onDrop();a.supportPointer?(A(s,"pointerup",i._disableDelayedDrag),A(s,"pointercancel",i._disableDelayedDrag)):(A(s,"mouseup",i._disableDelayedDrag),A(s,"touchend",i._disableDelayedDrag),A(s,"touchcancel",i._disableDelayedDrag)),A(s,"mousemove",i._delayedDragTouchMoveHandler),A(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&A(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(n,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&He(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;f(e,"mouseup",this._disableDelayedDrag),f(e,"touchend",this._disableDelayedDrag),f(e,"touchcancel",this._disableDelayedDrag),f(e,"pointerup",this._disableDelayedDrag),f(e,"pointercancel",this._disableDelayedDrag),f(e,"mousemove",this._delayedDragTouchMoveHandler),f(e,"touchmove",this._delayedDragTouchMoveHandler),f(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?A(document,"pointermove",this._onTouchMove):A(document,t?"touchmove":"mousemove",this._onTouchMove):(A(K,"dragend",this),A(ee,"dragstart",this._onDragStart));try{document.selection?Ge(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(_e=!1,ee&&K){V("dragStarted",this,{evt:t}),this.nativeDraggable&&A(document,"dragover",Ye);var o=this.options;!e&&g(K,o.dragClass,!1),g(K,o.ghostClass,!0),Pe.active=this,e&&this._appendGhost(),J({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(de){this._lastX=de.clientX,this._lastY=de.clientY,De();for(var e=document.elementFromPoint(de.clientX,de.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(de.clientX,de.clientY))!==t;)t=e;if(K.parentNode[H]._isOutsideThisEl(e),t)do{if(t[H]&&t[H]._onDragOver({clientX:de.clientX,clientY:de.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=m(t));xe()}},_onTouchMove:function(e){if(Me){var t=this.options,o=t.fallbackTolerance,n=t.fallbackOffset,i=e.touches?e.touches[0]:e,r=Z&&v(Z,!0),a=Z&&r&&r.a,s=Z&&r&&r.d,c=Te&&qe&&N(qe),p=(i.clientX-Me.clientX+n.x)/(a||1)+(c?c[0]-Le[0]:0)/(a||1),b=(i.clientY-Me.clientY+n.y)/(s||1)+(c?c[1]-Le[1]:0)/(s||1);if(!Pe.active&&!_e){if(o&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(Z){r?(r.e+=p-(le||0),r.f+=b-(ze||0)):r={a:1,b:0,c:0,d:1,e:p,f:b};var M="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");y(Z,"webkitTransform",M),y(Z,"mozTransform",M),y(Z,"msTransform",M),y(Z,"transform",M),le=p,ze=b,de=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Z){var e=this.options.fallbackOnBody?document.body:ee,t=R(K,!0,Te,!0,e),o=this.options;if(Te){for(qe=e;"static"===y(qe,"position")&&"none"===y(qe,"transform")&&qe!==document;)qe=qe.parentNode;qe!==document.body&&qe!==document.documentElement?(qe===document&&(qe=w()),t.top+=qe.scrollTop,t.left+=qe.scrollLeft):qe=w(),Le=N(qe)}g(Z=K.cloneNode(!0),o.ghostClass,!1),g(Z,o.fallbackClass,!0),g(Z,o.dragClass,!0),y(Z,"transition",""),y(Z,"transform",""),y(Z,"box-sizing","border-box"),y(Z,"margin",0),y(Z,"top",t.top),y(Z,"left",t.left),y(Z,"width",t.width),y(Z,"height",t.height),y(Z,"opacity","0.8"),y(Z,"position",Te?"absolute":"fixed"),y(Z,"zIndex","100000"),y(Z,"pointerEvents","none"),Pe.ghost=Z,e.appendChild(Z),y(Z,"transform-origin",ue/parseInt(Z.style.width)*100+"% "+Oe/parseInt(Z.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,n=e.dataTransfer,i=o.options;V("dragStart",this,{evt:e}),Pe.eventCanceled?this._onDrop():(V("setupClone",this),Pe.eventCanceled||((ne=X(K)).removeAttribute("id"),ne.draggable=!1,ne.style["will-change"]="",this._hideClone(),g(ne,this.options.chosenClass,!1),Pe.clone=ne),o.cloneId=Ge(function(){V("clone",o),Pe.eventCanceled||(o.options.removeCloneOnHide||ee.insertBefore(ne,K),o._hideClone(),J({sortable:o,name:"clone"}))}),!t&&g(K,i.dragClass,!0),t?(We=!0,o._loopId=setInterval(o._emulateDragOver,50)):(f(document,"mouseup",o._onDrop),f(document,"touchend",o._onDrop),f(document,"touchcancel",o._onDrop),n&&(n.effectAllowed="move",i.setData&&i.setData.call(o,n,K)),A(document,"drop",o),y(K,"transform","translateZ(0)")),_e=!0,o._dragStartId=Ge(o._dragStarted.bind(o,t,e)),A(document,"selectstart",o),Ae=!0,window.getSelection().removeAllRanges(),l&&y(document.body,"user-select","none"))},_onDragOver:function(e){var t,o,n,i,r=this.el,a=e.target,c=this.options,p=c.group,b=Pe.active,M=pe===p,d=c.sort,l=be||b,z=this,u=!1;if(!we){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=q(a,c.draggable,r,!0),X("dragOver"),Pe.eventCanceled)return u;if(K.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||z._ignoreWhileAnimating===a)return P(!1);if(We=!1,b&&!c.disabled&&(M?d||(n=Q!==ee):be===this||(this.lastPutMode=pe.checkPull(this,b,K,e))&&p.checkPut(this,b,K,e))){if(i="vertical"===this._getDirection(e,a),t=R(K),X("dragOverValid"),Pe.eventCanceled)return u;if(n)return Q=ee,Y(),this._hideClone(),X("revert"),Pe.eventCanceled||(te?ee.insertBefore(K,te):ee.appendChild(K)),P(!0);var O=S(r,c.draggable);if(!O||function(e,t,o){var n=R(S(o.el,o.options.draggable)),i=I(o.el,o.options,Z);return t?e.clientX>i.right+10||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>i.bottom+10||e.clientX>n.right&&e.clientY>n.top}(e,i,this)&&!O.animated){if(O===K)return P(!1);if(O&&r===e.target&&(a=O),a&&(o=R(a)),!1!==Ie(ee,r,K,t,a,o,e,!!a))return Y(),O&&O.nextSibling?r.insertBefore(K,O.nextSibling):r.appendChild(K),Q=r,j(),P(!0)}else if(O&&function(e,t,o){var n=R(T(o.el,0,o.options,!0)),i=I(o.el,o.options,Z);return t?e.clientX<i.left-10||e.clientY<n.top&&e.clientX<n.right:e.clientY<i.top-10||e.clientY<n.bottom&&e.clientX<n.left}(e,i,this)){var A=T(r,0,c,!0);if(A===K)return P(!1);if(o=R(a=A),!1!==Ie(ee,r,K,t,a,o,e,!1))return Y(),r.insertBefore(K,A),Q=r,j(),P(!0)}else if(a.parentNode===r){o=R(a);var f,h,m,_=K.parentNode!==r,W=!function(e,t,o){var n=o?e.left:e.top,i=o?e.right:e.bottom,r=o?e.width:e.height,a=o?t.left:t.top,s=o?t.right:t.bottom,c=o?t.width:t.height;return n===a||i===s||n+r/2===a+c/2}(K.animated&&K.toRect||t,a.animated&&a.toRect||o,i),v=i?"top":"left",L=k(a,"top","top")||k(K,"top","top"),w=L?L.scrollTop:void 0;if(fe!==a&&(h=o[v],ye=!1,ve=!W&&c.invertSwap||_),f=function(e,t,o,n,i,r,a,s){var c=n?e.clientY:e.clientX,p=n?o.height:o.width,b=n?o.top:o.left,M=n?o.bottom:o.right,d=!1;if(!a)if(s&&me<p*i){if(!ye&&(1===he?c>b+p*r/2:c<M-p*r/2)&&(ye=!0),ye)d=!0;else if(1===he?c<b+me:c>M-me)return-he}else if(c>b+p*(1-i)/2&&c<M-p*(1-i)/2)return function(e){return E(K)<E(e)?1:-1}(t);return(d=d||a)&&(c<b+p*r/2||c>M-p*r/2)?c>b+p/2?1:-1:0}(e,a,o,i,W?1:c.swapThreshold,null==c.invertedSwapThreshold?c.swapThreshold:c.invertedSwapThreshold,ve,fe===a),0!==f){var N=E(K);do{N-=f,m=Q.children[N]}while(m&&("none"===y(m,"display")||m===Z))}if(0===f||m===a)return P(!1);fe=a,he=f;var B=a.nextElementSibling,C=!1,D=Ie(ee,r,K,t,a,o,e,C=1===f);if(!1!==D)return 1!==D&&-1!==D||(C=1===D),we=!0,setTimeout(je,30),Y(),C&&!B?r.appendChild(K):a.parentNode.insertBefore(K,C?B:a),L&&x(L,0,w-L.scrollTop),Q=K.parentNode,void 0===h||ve||(me=Math.abs(h-R(a)[v])),j(),P(!0)}if(r.contains(K))return P(!1)}return!1}function X(c,p){V(c,z,s({evt:e,isOwner:M,axis:i?"vertical":"horizontal",revert:n,dragRect:t,targetRect:o,canSort:d,fromSortable:l,target:a,completed:P,onMove:function(o,n){return Ie(ee,r,K,t,o,R(o),e,n)},changed:j},p))}function Y(){X("dragOverAnimationCapture"),z.captureAnimationState(),z!==l&&l.captureAnimationState()}function P(t){return X("dragOverCompleted",{insertion:t}),t&&(M?b._hideClone():b._showClone(z),z!==l&&(g(K,be?be.options.ghostClass:b.options.ghostClass,!1),g(K,c.ghostClass,!0)),be!==z&&z!==Pe.active?be=z:z===Pe.active&&be&&(be=null),l===z&&(z._ignoreWhileAnimating=a),z.animateAll(function(){X("dragOverAnimationComplete"),z._ignoreWhileAnimating=null}),z!==l&&(l.animateAll(),l._ignoreWhileAnimating=null)),(a===K&&!K.animated||a===r&&!a.animated)&&(fe=null),c.dragoverBubble||e.rootEl||a===document||(K.parentNode[H]._isOutsideThisEl(e.target),!t&&Xe(e)),!c.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),u=!0}function j(){ae=E(K),ce=E(K,c.draggable),J({sortable:z,name:"change",toEl:r,newIndex:ae,newDraggableIndex:ce,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){f(document,"mousemove",this._onTouchMove),f(document,"touchmove",this._onTouchMove),f(document,"pointermove",this._onTouchMove),f(document,"dragover",Xe),f(document,"mousemove",Xe),f(document,"touchmove",Xe)},_offUpEvents:function(){var e=this.el.ownerDocument;f(e,"mouseup",this._onDrop),f(e,"touchend",this._onDrop),f(e,"pointerup",this._onDrop),f(e,"pointercancel",this._onDrop),f(e,"touchcancel",this._onDrop),f(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;ae=E(K),ce=E(K,o.draggable),V("drop",this,{evt:e}),Q=K&&K.parentNode,ae=E(K),ce=E(K,o.draggable),Pe.eventCanceled||(_e=!1,ve=!1,ye=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),$e(this.cloneId),$e(this._dragStartId),this.nativeDraggable&&(f(document,"drop",this),f(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),l&&y(document.body,"user-select",""),y(K,"transform",""),e&&(Ae&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),Z&&Z.parentNode&&Z.parentNode.removeChild(Z),(ee===Q||be&&"clone"!==be.lastPutMode)&&ne&&ne.parentNode&&ne.parentNode.removeChild(ne),K&&(this.nativeDraggable&&f(K,"dragend",this),He(K),K.style["will-change"]="",Ae&&!_e&&g(K,be?be.options.ghostClass:this.options.ghostClass,!1),g(K,this.options.chosenClass,!1),J({sortable:this,name:"unchoose",toEl:Q,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==Q?(ae>=0&&(J({rootEl:Q,name:"add",toEl:Q,fromEl:ee,originalEvent:e}),J({sortable:this,name:"remove",toEl:Q,originalEvent:e}),J({rootEl:Q,name:"sort",toEl:Q,fromEl:ee,originalEvent:e}),J({sortable:this,name:"sort",toEl:Q,originalEvent:e})),be&&be.save()):ae!==re&&ae>=0&&(J({sortable:this,name:"update",toEl:Q,originalEvent:e}),J({sortable:this,name:"sort",toEl:Q,originalEvent:e})),Pe.active&&(null!=ae&&-1!==ae||(ae=re,ce=se),J({sortable:this,name:"end",toEl:Q,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){V("nulling",this),ee=K=Q=Z=te=ne=oe=ie=Me=de=Ae=ae=ce=re=se=fe=he=be=pe=Pe.dragged=Pe.ghost=Pe.clone=Pe.active=null;var e=this.el;Re.forEach(function(t){e.contains(t)&&(t.checked=!0)}),Re.length=le=ze=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":K&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,n=0,i=o.length,r=this.options;n<i;n++)q(e=o[n],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||Fe(e));return t},sort:function(e,t){var o={},n=this.el;this.toArray().forEach(function(e,t){var i=n.children[t];q(i,this.options.draggable,n,!1)&&(o[e]=i)},this),t&&this.captureAnimationState(),e.forEach(function(e){o[e]&&(n.removeChild(o[e]),n.appendChild(o[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return q(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(void 0===t)return o[e];var n=G.modifyOption(this,e,t);o[e]=void 0!==n?n:t,"group"===e&&Ce(o)},destroy:function(){V("destroy",this);var e=this.el;e[H]=null,f(e,"mousedown",this._onTapStart),f(e,"touchstart",this._onTapStart),f(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(f(e,"dragover",this),f(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ge.splice(ge.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ie){if(V("hideClone",this),Pe.eventCanceled)return;y(ne,"display","none"),this.options.removeCloneOnHide&&ne.parentNode&&ne.parentNode.removeChild(ne),ie=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ie){if(V("showClone",this),Pe.eventCanceled)return;K.parentNode!=ee||this.options.group.revertClone?te?ee.insertBefore(ne,te):ee.appendChild(ne):ee.insertBefore(ne,K),this.options.group.revertClone&&this.animate(K,ne),y(ne,"display",""),ie=!1}}else this._hideClone()}},ke&&A(document,"touchmove",function(e){(Pe.active||_e)&&e.cancelable&&e.preventDefault()}),Pe.utils={on:A,off:f,css:y,find:L,is:function(e,t){return!!q(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},throttle:D,closest:q,toggleClass:g,clone:X,index:E,nextTick:Ge,cancelNextTick:$e,detectDirection:Be,getChild:T,expando:H},Pe.get=function(e){return e[H]},Pe.mount=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Pe.utils=s(s({},Pe.utils),e.utils)),G.mount(e)})},Pe.create=function(e,t){return new Pe(e,t)},Pe.version="1.15.7";var Ue,Ve,Je,Ke,Qe,Ze,et=[],tt=!1;function ot(){et.forEach(function(e){clearInterval(e.pid)}),et=[]}function nt(){clearInterval(Ze)}var it=D(function(e,t,o,n){if(t.scroll){var i,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,c=t.scrollSpeed,p=w(),b=!1;Ve!==o&&(Ve=o,ot(),Ue=t.scroll,i=t.scrollFn,!0===Ue&&(Ue=B(o,!0)));var M=0,d=Ue;do{var l=d,z=R(l),u=z.top,O=z.bottom,A=z.left,f=z.right,h=z.width,m=z.height,q=void 0,_=void 0,W=l.scrollWidth,g=l.scrollHeight,v=y(l),L=l.scrollLeft,k=l.scrollTop;l===p?(q=h<W&&("auto"===v.overflowX||"scroll"===v.overflowX||"visible"===v.overflowX),_=m<g&&("auto"===v.overflowY||"scroll"===v.overflowY||"visible"===v.overflowY)):(q=h<W&&("auto"===v.overflowX||"scroll"===v.overflowX),_=m<g&&("auto"===v.overflowY||"scroll"===v.overflowY));var T=q&&(Math.abs(f-r)<=s&&L+h<W)-(Math.abs(A-r)<=s&&!!L),S=_&&(Math.abs(O-a)<=s&&k+m<g)-(Math.abs(u-a)<=s&&!!k);if(!et[M])for(var E=0;E<=M;E++)et[E]||(et[E]={});et[M].vx==T&&et[M].vy==S&&et[M].el===l||(et[M].el=l,et[M].vx=T,et[M].vy=S,clearInterval(et[M].pid),0==T&&0==S||(b=!0,et[M].pid=setInterval(function(){n&&0===this.layer&&Pe.active._onTouchMove(Qe);var t=et[this.layer].vy?et[this.layer].vy*c:0,o=et[this.layer].vx?et[this.layer].vx*c:0;"function"==typeof i&&"continue"!==i.call(Pe.dragged.parentNode[H],o,t,e,Qe,et[this.layer].el)||x(et[this.layer].el,o,t)}.bind({layer:M}),24))),M++}while(t.bubbleScroll&&d!==p&&(d=B(d,!1)));tt=b}},30),rt=function(e){var t=e.originalEvent,o=e.putSortable,n=e.dragEl,i=e.activeSortable,r=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var c=o||i;a();var p=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,b=document.elementFromPoint(p.clientX,p.clientY);s(),c&&!c.el.contains(b)&&(r("spill"),this.onSpill({dragEl:n,putSortable:o}))}};function at(){}function st(){}at.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var n=T(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(t,n):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:rt},r(at,{pluginName:"revertOnSpill"}),st.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:rt},r(st,{pluginName:"removeOnSpill"});var ct,pt,bt,Mt,dt,lt=[],zt=[],ut=!1,Ot=!1,At=!1;function ft(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?A(document,"pointerup",this._deselectMultiDrag):(A(document,"mouseup",this._deselectMultiDrag),A(document,"touchend",this._deselectMultiDrag))),A(document,"keydown",this._checkKeyDown),A(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,o){var n="";lt.length&&pt===e?lt.forEach(function(e,t){n+=(t?", ":"")+e.textContent}):n=o.textContent,t.setData("Text",n)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;bt=t},delayEnded:function(){this.isMultiDrag=~lt.indexOf(bt)},setupClone:function(e){var t=e.sortable,o=e.cancel;if(this.isMultiDrag){for(var n=0;n<lt.length;n++)zt.push(X(lt[n])),zt[n].sortableIndex=lt[n].sortableIndex,zt[n].draggable=!1,zt[n].style["will-change"]="",g(zt[n],this.options.selectedClass,!1),lt[n]===bt&&g(zt[n],this.options.chosenClass,!1);t._hideClone(),o()}},clone:function(e){var t=e.sortable,o=e.rootEl,n=e.dispatchSortableEvent,i=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||lt.length&&pt===t&&(ht(!0,o),n("clone"),i()))},showClone:function(e){var t=e.cloneNowShown,o=e.rootEl,n=e.cancel;this.isMultiDrag&&(ht(!1,o),zt.forEach(function(e){y(e,"display","")}),t(),dt=!1,n())},hideClone:function(e){var t=this,o=(e.sortable,e.cloneNowHidden),n=e.cancel;this.isMultiDrag&&(zt.forEach(function(e){y(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)}),o(),dt=!0,n())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&pt&&pt.multiDrag._deselectMultiDrag(),lt.forEach(function(e){e.sortableIndex=E(e)}),lt=lt.sort(function(e,t){return e.sortableIndex-t.sortableIndex}),At=!0},dragStarted:function(e){var t=this,o=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(o.captureAnimationState(),this.options.animation)){lt.forEach(function(e){e!==bt&&y(e,"position","absolute")});var n=R(bt,!1,!0,!0);lt.forEach(function(e){e!==bt&&Y(e,n)}),Ot=!0,ut=!0}o.animateAll(function(){Ot=!1,ut=!1,t.options.animation&&lt.forEach(function(e){P(e)}),t.options.sort&&mt()})}},dragOver:function(e){var t=e.target,o=e.completed,n=e.cancel;Ot&&~lt.indexOf(t)&&(o(!1),n())},revert:function(e){var t=e.fromSortable,o=e.rootEl,n=e.sortable,i=e.dragRect;lt.length>1&&(lt.forEach(function(e){n.addAnimationState({target:e,rect:Ot?R(e):i}),P(e),e.fromRect=i,t.removeAnimationState(e)}),Ot=!1,function(e,t){lt.forEach(function(o,n){var i=t.children[o.sortableIndex+(e?Number(n):0)];i?t.insertBefore(o,i):t.appendChild(o)})}(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(e){var t=e.sortable,o=e.isOwner,n=e.insertion,i=e.activeSortable,r=e.parentEl,a=e.putSortable,s=this.options;if(n){if(o&&i._hideClone(),ut=!1,s.animation&&lt.length>1&&(Ot||!o&&!i.options.sort&&!a)){var c=R(bt,!1,!0,!0);lt.forEach(function(e){e!==bt&&(Y(e,c),r.appendChild(e))}),Ot=!0}if(!o)if(Ot||mt(),lt.length>1){var p=dt;i._showClone(t),i.options.animation&&!dt&&p&&zt.forEach(function(e){i.addAnimationState({target:e,rect:Mt}),e.fromRect=Mt,e.thisAnimationDuration=null})}else i._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,o=e.isOwner,n=e.activeSortable;if(lt.forEach(function(e){e.thisAnimationDuration=null}),n.options.animation&&!o&&n.multiDrag.isMultiDrag){Mt=r({},t);var i=v(bt,!0);Mt.top-=i.f,Mt.left-=i.e}},dragOverAnimationComplete:function(){Ot&&(Ot=!1,mt())},drop:function(e){var t=e.originalEvent,o=e.rootEl,n=e.parentEl,i=e.sortable,r=e.dispatchSortableEvent,a=e.oldIndex,s=e.putSortable,c=s||this.sortable;if(t){var p=this.options,b=n.children;if(!At)if(p.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),g(bt,p.selectedClass,!~lt.indexOf(bt)),~lt.indexOf(bt))lt.splice(lt.indexOf(bt),1),ct=null,$({sortable:i,rootEl:o,name:"deselect",targetEl:bt,originalEvent:t});else{if(lt.push(bt),$({sortable:i,rootEl:o,name:"select",targetEl:bt,originalEvent:t}),t.shiftKey&&ct&&i.el.contains(ct)){var M=E(ct),d=E(bt);~M&&~d&&M!==d&&function(){var e,r;d>M?(r=M,e=d):(r=d,e=M+1);for(var a=p.filter;r<e;r++)~lt.indexOf(b[r])||q(b[r],p.draggable,n,!1)&&(a&&("function"==typeof a?a.call(i,t,b[r],i):a.split(",").some(function(e){return q(b[r],e.trim(),n,!1)}))||(g(b[r],p.selectedClass,!0),lt.push(b[r]),$({sortable:i,rootEl:o,name:"select",targetEl:b[r],originalEvent:t})))}()}else ct=bt;pt=c}if(At&&this.isMultiDrag){if(Ot=!1,(n[H].options.sort||n!==o)&&lt.length>1){var l=R(bt),z=E(bt,":not(."+this.options.selectedClass+")");if(!ut&&p.animation&&(bt.thisAnimationDuration=null),c.captureAnimationState(),!ut&&(p.animation&&(bt.fromRect=l,lt.forEach(function(e){if(e.thisAnimationDuration=null,e!==bt){var t=Ot?R(e):l;e.fromRect=t,c.addAnimationState({target:e,rect:t})}})),mt(),lt.forEach(function(e){b[z]?n.insertBefore(e,b[z]):n.appendChild(e),z++}),a===E(bt))){var u=!1;lt.forEach(function(e){e.sortableIndex===E(e)||(u=!0)}),u&&(r("update"),r("sort"))}lt.forEach(function(e){P(e)}),c.animateAll()}pt=c}(o===n||s&&"clone"!==s.lastPutMode)&&zt.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})}},nullingGlobal:function(){this.isMultiDrag=At=!1,zt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),f(document,"pointerup",this._deselectMultiDrag),f(document,"mouseup",this._deselectMultiDrag),f(document,"touchend",this._deselectMultiDrag),f(document,"keydown",this._checkKeyDown),f(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==At&&At||pt!==this.sortable||e&&q(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;lt.length;){var t=lt[0];g(t,this.options.selectedClass,!1),lt.shift(),$({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},r(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[H];t&&t.options.multiDrag&&!~lt.indexOf(e)&&(pt&&pt!==t&&(pt.multiDrag._deselectMultiDrag(),pt=t),g(e,t.options.selectedClass,!0),lt.push(e))},deselect:function(e){var t=e.parentNode[H],o=lt.indexOf(e);t&&t.options.multiDrag&&~o&&(g(e,t.options.selectedClass,!1),lt.splice(o,1))}},eventProperties:function(){var e,t=this,o=[],i=[];return lt.forEach(function(e){var n;o.push({multiDragElement:e,index:e.sortableIndex}),n=Ot&&e!==bt?-1:Ot?E(e,":not(."+t.options.selectedClass+")"):E(e),i.push({multiDragElement:e,index:n})}),{items:(e=lt,function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(zt),oldIndicies:o,newIndicies:i}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function ht(e,t){zt.forEach(function(o,n){var i=t.children[o.sortableIndex+(e?Number(n):0)];i?t.insertBefore(o,i):t.appendChild(o)})}function mt(){lt.forEach(function(e){e!==bt&&e.parentNode&&e.parentNode.removeChild(e)})}Pe.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?A(document,"dragover",this._handleAutoScroll):this.options.supportPointer?A(document,"pointermove",this._handleFallbackAutoScroll):t.touches?A(document,"touchmove",this._handleFallbackAutoScroll):A(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?f(document,"dragover",this._handleAutoScroll):(f(document,"pointermove",this._handleFallbackAutoScroll),f(document,"touchmove",this._handleFallbackAutoScroll),f(document,"mousemove",this._handleFallbackAutoScroll)),nt(),ot(),clearTimeout(_),_=void 0},nulling:function(){Qe=Ve=Ue=tt=Ze=Je=Ke=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var o=this,n=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(n,i);if(Qe=e,t||this.options.forceAutoScrollFallback||M||b||l){it(e,this.options,r,t);var a=B(r,!0);!tt||Ze&&n===Je&&i===Ke||(Ze&&nt(),Ze=setInterval(function(){var r=B(document.elementFromPoint(n,i),!0);r!==a&&(a=r,ot()),it(e,o.options,r,t)},10),Je=n,Ke=i)}else{if(!this.options.bubbleScroll||B(r,!0)===w())return void ot();it(e,this.options,B(r,!1),!1)}}},r(e,{pluginName:"scroll",initializeByDefault:!0})}),Pe.mount(st,at);const qt=Pe;var _t=o(5292),Wt=o(32246),gt=o(88903),yt=o(36711),vt=o(30473),Lt=o(25734),wt=o(38156),Rt=o(1439);const kt=()=>qt.mount(new ft),Tt=e=>{if(!e)return[];if(e.closest(".SearchFields-container"))return[e.closest(".SearchFields-container")?.querySelector(".SearchFields-hide > ul"),e.closest(".SearchFields-container")?.querySelector(".SearchFields-displayTitle > ul")];const t=e.getAttribute("data-sortable-item-type");return t?[...document.querySelectorAll(`[data-sortable-valid-item-types~="${t}"][data-read-only="false"]`)]:[...document.querySelectorAll(".Sortable:not([data-sortable-valid-item-types])")]},St=(e,t,o)=>{const n=e.dataset.sortableInputName,i=t.closest(".Sortable").dataset.sortableInputName;n!==i&&o.forEach(e=>{e.querySelectorAll(`[name^="${n}"]`).forEach(e=>{e.setAttribute("name",e.getAttribute("name").replace(n,i))})})},Et=e=>{const t=e.closest(".inputContainer");t&&(t.dataset.interacted="true"),e.closest("form")?.dispatchEvent(new Event("change",{bubbles:!0}))},Nt=[];let Bt=!1,Ct=null,Dt=null;function xt(e,t,o){const n=o.children[e],i=o.children[t];e>t?o.insertBefore(n,i):o.insertBefore(n,i.nextElementSibling),(0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[e+1,t+1])}(0,Wt.A)(["ol[data-sortable-input-name]",".plugin-repeatable > ol",".widget-urls",'[data-rte-container="true"]','.CIG-row[data-type="record"][data-sortable-valid-item-types]',"ul[data-sortable-input-name]"],e=>{const t=e.closest(".is-readOnly");if("true"===e.dataset.readOnly||t)return;const o="record"===e.dataset.type;if("true"===e.dataset.rteContainer||o){const t=e.querySelector(":scope .drawerDropOverlay");Nt.push(t)}const n=e.classList.contains("RCIG-list");let i=!1;e.parentElement&&(i=e.parentElement.classList.contains("is-previewable"));const r=e.closest("dialog"),a=new qt(e,{animation:o?null:160,handle:n&&!i?".RCIG-title, .MultiSortable-buttonToggle, .ContentEditDrawer-widget-carousel-list > li, .SearchFields-drag":null,sort:!0,delay:300,delayOnTouchOnly:!0,touchStartThreshold:4,dragClass:"Sortable-drag",selectedClass:"Sortable-selected",chosenClass:"Sortable-chosen",ghostClass:"Sortable-ghost",forceFallback:!0,fallbackTolerance:3,fallbackOnBody:!r,swapThreshold:.65,filter:"input:not(.ContentEditDrawer-widget-carousel-list-item-selectButton), textarea, .ProseMirrorContainer, .CIG-row, .EIG",preventOnFilter:!1,scroll:!0,scrollSpeed:20,dropBubble:!1,multiDrag:!0,group:{put:function(e,t,o){if(Nt.length>0)for(const e in Nt){const t=Nt[e];if(t){const e=t.dataset?.sortableValidItemTypes?.split(" "),n=o.dataset?.sortableLoadTypes?.split(" "),i=n?.find(t=>e.includes(t));i&&(t.style.display="inline")}}let n=!1;if(e.el.dataset.sortableValidItemTypes){if(n=e.el.dataset.sortableValidItemTypes.includes(o.dataset.sortableItemType),!n&&o.dataset.sortableLoadTypes){const t=e.el.dataset.sortableValidItemTypes.split(" ");n=o.dataset.sortableLoadTypes.split(" ").some(e=>t.includes(e))}return n}return n},pull:function(e,t,o){let n=!1;const i=t.el.classList.contains("is-clonable");if(e.el.dataset.sortableValidItemTypes){if(n=e.el.dataset.sortableValidItemTypes.includes(o.dataset.sortableItemType),!n&&o.dataset.sortableLoadTypes){const t=e.el.dataset.sortableValidItemTypes.split(" ");n=o.dataset.sortableLoadTypes.split(" ").some(e=>t.includes(e))}return n&&i?"clone":n}return n}},onSelect:e=>{const t=e.item,o=e.items;if(t.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list"))for(const e in o){const t=o[e];t.parentElement&&!t.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list")&&qt.utils.deselect(t)}else for(const e in o){const t=o[e];t.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list")&&((0,wt.k)(t),qt.utils.deselect(t))}t.classList.contains("is-moving")||qt.utils.deselect(t)},onDeselect:e=>{const t=e.item,o=t.querySelector(".ContentEditDrawer-widget-carousel-list-item-selectButton");t.classList.contains("is-moving")&&(o&&(o.checked=!1),t.classList.remove("is-moving"))},onStart:e=>{const t=e.item,o=+(e.items.length>0?e.items:[e.item]).length,n=Tt(t),i=document.querySelector(".ContentEdit-previewDisplay");if(document.body.style.userSelect="none",i&&(i.style.pointerEvents="none"),o&&(qt.ghost.style.setProperty("--drag-count",o),qt.ghost.style.zIndex=(0,vt.default)()+1,qt.ghost.setAttribute("item-suffix",""),o>1&&qt.ghost.setAttribute("item-suffix","s")),1===n.length){var r=n[0];t.closest(`.${r.className}`)||r.classList.add("Sortable-allowedContainer")}if(n.length>1&&n.forEach(e=>e.classList.add("Sortable-allowedContainer")),window.BRIGHTSPOT?.ui.cms.enableV5UI){const e=parseInt(qt.ghost.style.left);qt.ghost.style.left=.95*e+"px"}yt.A.pause(),Wt.A.pause()},onSort:e=>{const t=e.from,o=e.to,n=e.items.length>0?e.items:[e.item];if(!Bt){if("record"===o.dataset.type){const e=Rt(o).find(":input.objectId").first(),t=Rt(n);return e.attr("data-label",t.data("label-html")),e.attr("data-label-html",t.data("label-html")),e.attr("data-preview",t.find("img").attr("src")||t.find(".ItemPreview-url").attr("data-src")||""),e.attr("data-visibility",t.find("span.Label").text()),e.attr("data-read-only",!!t.attr("data-read-only")&&t.attr("data-read-only")),e.val(t.data("id")),void e.change()}n.sort(function(e,t){return e.dataset.index-t.dataset.index});for(const i in n){const r=n[i];if("true"===o?.dataset?.rteContainer)return;if(o.dataset.sortableValidItemTypes&&t.dataset.sortableEndpoint&&!r.classList.contains("is-pending")){const e=o.dataset.sortableValidItemTypes.split(" "),n=r.dataset.sortableLoadTypes?.split(" "),i=r.dataset?.id,a=n?.find(t=>e.includes(t)),s=o.parentElement.classList.contains("is-previewable"),c=o.dataset.previewable,p=o.dataset.sortableValidItemTypes;if(!a){r.remove();continue}Bt=!0,qt.utils.deselect(r),Xt(t.dataset.sortableEndpoint,i,a,o.dataset.sortableInputName,s,c,p).then(e=>{r.innerHTML=e;const t=o.closest(".plugin-repeatable");r.classList.remove("Sortable-selected"),r.classList.remove("is-moving"),Bt=!1,o.classList.contains("RCIG-list")?(r.classList.remove("RCS-item"),Rt(t).data("repeatable").itemLoad(r).then(()=>{Rt(t).data("repeatable").initItem(r),s&&!o.parentElement.classList.contains("is-gridView")&&(r.classList.remove("is-gridItem"),r.classList.add("is-listItem")),Et(o)})):(r.classList.remove("RCIG-item"),Rt(r).trigger("create"),Rt(t).data("repeatable").initItemRemove(r),Et(o))})}else{let n=e.items.length?e.items:[r];n.forEach(e=>{e.addEventListener("animationend",()=>{e.classList.remove("is-added")}),e.classList.add("is-added")}),St(t,o,n),t.querySelectorAll("input, select, textarea").forEach(e=>{e.dispatchEvent(new Event("change"))}),Et(o)}}}},onEnd:e=>{const t=e.item,o=e.items.length>0?e.items:[t],n=document.querySelector(".ContentEdit-previewDisplay");if(document.body.style.userSelect="unset",n&&(n.style.pointerEvents="initial"),Tt(t).forEach(e=>e.classList.remove("Sortable-allowedContainer")),Nt.length>0)for(const e in Nt){const t=Nt[e];t&&(t.style.display="none")}if("true"===e.to?.dataset?.rteContainer){for(const e in o)qt.utils.deselect(o[e]);const n=new CustomEvent("interchange",{detail:e});e.to.querySelector(".richtext").rte.view.dispatchEvent(n),t.remove()}if("record"===e.to?.dataset?.type)for(const e in o)qt.utils.deselect(o[e]),o[e].remove();yt.A.resume(),Wt.A.resume()},onUpdate:e=>{const t=e.item;t.addEventListener("animationend",()=>{t.classList.remove("is-added")}),t.classList.add("is-added")}});if(a.multiDrag)for(const e of["pointerup","mouseup","touchend"])document.removeEventListener(e,a.multiDrag._deselectMultiDrag,{capture:!1,passive:!1});if(e.classList.add("Sortable"),"OL"===e.tagName||"UL"===e.tagName){const t=e.closest(".CIG-row")?.querySelector("label")?.textContent;e.querySelectorAll(":scope > li > input[type=text]").forEach(e=>{if(e.dataset?.label){const t=e.closest("li");t?.setAttribute("aria-label",e.dataset?.label)}}),(0,Wt.A)(e,":scope > li",e=>{e.addEventListener("focus",e=>{if(!e.relatedTarget)return;const o=t?(0,Lt.wC)(window.BRIGHTSPOT.ui.sortable.namedList,[t]):window.BRIGHTSPOT.ui.sortable.genericList;(0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.listGainedFocus,[o])}),e.addEventListener("blur",e=>{e.relatedTarget&&(Ct&&(yt.A.resume(),Wt.A.resume()),Ct=null)}),e.dataset?.label&&!e.hasAttribute("aria-label")&&e.setAttribute("aria-label",e.dataset?.label)}),e.hasAttribute("aria-label")||e.setAttribute("aria-label",t||"")}const s=e.classList.contains("RTI-list");(0,Wt.A)(e,":scope > *:not(script)",e=>{e.classList.add("Sortable-item"),(e.matches(".RCS-item:not(.is-disabled), .RCIG-item:not(.is-disabled), .widget-urlsItem")||s)&&e.setAttribute("tabindex",0),s&&e.insertAdjacentElement("afterbegin",(0,_t.A)("div",{class:"RTI-handle"}))})});const Xt=async(e,t,o,n,i,r,a)=>{const s=new URLSearchParams;s.set("id",t),s.set("targetTypeId",o),s.set("inputName",n),s.set("isPreviewableContainer",i),s.set("previewable",r),s.set("validTypes",a);const c=await fetch(`${CONTEXT_PATH}${e}`,{method:"POST",credentials:"include",body:s,headers:{"Brightspot-CSRF":gt.A.get("bsp.csrf")}});return await c.text()};(0,Wt.A)([".Sortable-item.RCIG-item .RCIG-remove",".Sortable-item.RCS-item .RCS-remove"],e=>{if(e.closest('.CIG-row[data-type="set/record"]'))return;const t=e.closest("[data-sortable-item-type], .Sortable-item");t.classList.add("MultiSortable"),t.addEventListener("mouseup",e=>{e.target!==i||t.classList.contains("is-moving")?t.classList.remove("is-moving"):(t.classList.add("is-moving"),t.classList.contains("is-collapsed")||!t.classList.contains("RCIG-item")||t.classList.contains("is-gridItem")||t.classList.add("collapsed","is-collapsed"))});let o="";const n=e.closest(".CIG-row");n&&(o=n.querySelector(".CIG-label label").textContent);const i=(0,_t.A)("button",{type:"button",class:"MultiSortable-buttonToggle",title:`${window.BRIGHTSPOT?.ui.tooltips.multiSort} ${o}`,"aria-label":`${window.BRIGHTSPOT?.ui.tooltips.multiSort} ${o}`});e.classList.contains("EIG-remove")||e.insertAdjacentElement("beforeBegin",i)}),window.addEventListener("keydown",e=>{if("Escape"===e.code&&document.querySelectorAll(".Sortable-selected").forEach(e=>{qt.utils.deselect(e),(0,wt.k)(e),e.classList.remove("is-moving")}),!e.target.classList.contains("Sortable-item")&&!e.target.classList.contains("MultiSortable-buttonToggle"))return;const t=e.target.classList.contains("MultiSortable-buttonToggle")?e.target.closest(".Sortable-item"):e.target;if("Tab"===e.code&&Ct){const o=function(e){const t=e.dataset.sortableItemType;return Array.from(document.querySelectorAll(`ol.Sortable[data-sortable-valid-item-types*="${t}"],\n ul.Sortable[data-sortable-valid-item-types*="${t}"]`)).filter(e=>null!==e.offsetParent)}(t);if(o.length){const n=t.closest("ul.Sortable, ol.Sortable");let i=null,r=null;o.forEach((e,t)=>{n.isEqualNode(e)&&(r=t)}),r+1>o.length-1?i=0:r+1<=o.length-1&&(i=r+1);const a=o[i],s=a.children[0];a.isEqualNode(n)&&1===o.length||(s?((0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[r,i]),a.insertBefore(t,s)):((0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[r,1]),a.appendChild(t))),t.focus(),e.preventDefault()}else yt.A.resume(),Wt.A.resume(),Ct=null}if("Escape"===e.code){if(Ct){const e=Ct.prevDropZone.children;e.length&&Ct.prevIdx<e.length-1?Ct.prevDropZone.insertBefore(t,e[Ct.prevIdx]):Ct.prevDropZone.appendChild(t),yt.A.resume(),Wt.A.resume(),(0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemDragCancelled),t.focus()}Ct=null}if("Space"===e.code||"Enter"===e.code){if(Ct){const e=t.closest("ul.Sortable, ol.Sortable");e.querySelectorAll("input, select, textarea").forEach(e=>{e.dispatchEvent(new Event("change"))}),Et(e),0===Ct.prevDropZone?.childElementCount&&Ct.prevDropZone?.removeAttribute("tabindex"),e.dispatchEvent(new CustomEvent("add",{detail:{item:t,from:Ct.prevDropZone,to:e}})),yt.A.resume(),Wt.A.resume(),Ct=null,(0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemDropped)}else Ct={prevIdx:Array.prototype.indexOf.call(t.parentNode.children,t),prevDropZone:t.closest("ul.Sortable, ol.Sortable")},yt.A.pause(),Wt.A.pause(),(0,Lt.iP)(window.BRIGHTSPOT.ui.sortable.itemDragStarted);if(e.preventDefault(),!Ct)return}"ArrowUp"!==e.code&&"ArrowLeft"!==e.code||(Dt=Array.prototype.indexOf.call(t.parentNode.children,t),Ct&&Dt>0&&(xt(Dt,Dt-1,t.closest("ul.Sortable, ol.Sortable")),t.focus())),"ArrowDown"!==e.code&&"ArrowRight"!==e.code||(Dt=Array.prototype.indexOf.call(t.parentNode.children,t),Ct&&Dt<t.parentNode.children.length-1&&(xt(Dt,Dt+1,t.closest("ul.Sortable, ol.Sortable")),t.focus()))}),window.addEventListener("click",()=>{Ct&&(yt.A.resume(),Wt.A.resume()),Ct=null})},93563(e,t,o){"use strict";o(84978),o(25809);var n=o(32246),i=o(88903);(0,n.A)(".StyleEmbeddedContent-items > li",e=>{e.addEventListener("click",async e=>{let t=e.target;const o=t.parentElement.classList.contains("Card");if("LI"===t.parentElement.nodeName||o){o&&(t=t.parentElement);const e=t.dataset.addEmbeddedContentData;if(!e)return;const n=JSON.parse(e),r=n.typeId;if(!r)return;const a=t.closest(".Popup").querySelector(".AddEmbeddedContent-params");if(!a)return;const s=a.dataset.fieldName;if(!s)return;let c="/cms/update-recently-used?fieldName="+s+"&templateTypeId="+r;const p=n.value;p&&(c+="&templateStyle="+p);const b=new Headers;b.append("Brightspot-CSRF",i.A.get("bsp.csrf"));try{await fetch(c,{method:"POST",headers:b})}catch(e){console.error(e)}}})}),(0,n.A)(".StyleEmbeddedContent-search input",e=>{e.addEventListener("input",t=>{const o=e.closest(".StyleEmbeddedContent-nav"),n=o?.nextSibling,i=new RegExp(t.target.value.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");n?.querySelectorAll("a").forEach(e=>{const t=e.parentElement,o=t?.parentElement,n=o?.previousSibling;i.test(e.innerText)?(t.style.display="",o.style.display=o.classList.contains("LinkTable")?"block":"flex",n.style.display="block"):(t.style.display="none",o.querySelector('li:not([style*="display: none"])')||(o.style.display="none",n.style.display="none"))}),o?.querySelectorAll("li").forEach(e=>{e.style.display=e.classList.contains("is-selected")||""===t.target.value?"list-item":"none",e.style.borderColor="var(--color-gray3)"});const r=o?.querySelector('li:not([style*="display: none"])');r.style.borderColor="transparent";const a=n?.querySelector(".StyleEmbeddedContent-warning");a.style.display=n?.querySelector('li:not([style*="display: none"])')?"none":"flex"})})},45080(e,t,o){"use strict";o(50144),o(84978),o(25809);var n=o(32246),i=o(88903),r=o(36500),a=o(1439);const s="> .CIG-large > .CIG > .CIG-row, > .CIG-large > .CIG > .TemplateField",c="> .CIG-large > .CIG > btu-cig-cluster > .TemplateField";(0,n.A)(".CIG-row.StyleguidePreset-row",e=>{let t,o,n,i,r;const a=e.closest(".CIG-row.StyleguideTemplate-row"),b=e.getAttribute("data-original-template"),d=t=>Array.from(e.querySelectorAll(`.TC > .TemplateField[data-template='${t}'] > .CIG-row, .TC > btu-cig-cluster > .TemplateField[data-template='${t}'] > .CIG-row`));if(a){o=a.querySelector(".CIG-small > select");let e=o.value;o.addEventListener("change",()=>{e!==o.value&&(e=o.value,n=e||b,i=d(n),r=l.concat(i),z&&(z.querySelector("option[data-show]").setAttribute("data-show",`${s}[data-template="${n}"], ${c}[data-template="${n}"]`),z.querySelectorAll("option[data-preset]").forEach(e=>e.remove()),(async()=>{const e=await fetch(CONTEXT_PATH+"styleguide/preset?themeId=currentTheme&templateId="+n,{method:"GET",headers:new Headers});try{const t=await e.json(),o=t.success&&t.data;o?.forEach(e=>{const t=document.createElement("option");t.setAttribute("data-hide",`${s}, ${c}`),t.setAttribute("data-preset",e.presetId),t.setAttribute("value",e.presetId),t.textContent=e.label,z.appendChild(t)})}catch(e){console.log(e)}})()),t?p(z,"none"):z.dispatchEvent(new Event("change",{bubbles:!0})))})}n=o?.value||b;const l=Array.from(e.querySelectorAll(".TC > .CIG-row"));i=d(n),r=l.concat(i);const z=e.querySelector(".CIG-small > select");t=z.value,z.setAttribute("data-previous-value",t);const u=e.querySelector(".CIG-large");z.addEventListener("change",e=>{t=z.value;const o=z.getAttribute("data-previous-value");t!==o&&(z.setAttribute("data-previous-value",t),t?u.style.display="none":(u.style.display="",M(n,o,r)))})});const p=(e,t)=>{if(e.nextElementSibling?.matches(".ComboInput")){const o=e.nextElementSibling.getAttribute("aria-owns"),n=document.querySelector(`#${o}`).querySelector(`.ComboInput-option[data-value="${t}"]`);n&&n.click()}else e.value=t},b=(e,t)=>{const o=e.querySelector("textarea"),n=e.querySelector('input[type="checkbox"]'),i=e.querySelector("input.color"),r=e.querySelector("select");if(o)o.value=t||"";else if(n)n.checked=t||!1;else if(i){a(i).spectrum("set",t||"");const e=i.parentElement.querySelector(".sp-preview");e&&t?e.setAttribute("data-color",t):e?e.removeAttribute("data-color"):i.value=t||""}else r&&p(r,t||"")},M=async(e,t,o)=>{const n=e=>{o?.forEach(t=>{const o=t.getAttribute("data-field-name"),n=o?.slice(o.lastIndexOf(".")+1),i=e&&n&&e[n];b(t,i)})};if(t&&"none"!==t){const o=CONTEXT_PATH+"styleguide/preset?themeId=currentTheme&templateId="+e+"&presetId="+t,i=new Headers,r=await fetch(o,{method:"GET",headers:i});try{const e=await r.json(),t=e.success&&e.data[0].values;t&&n(t)}catch(e){console.log(e)}}else n()},d=async(e,t,o)=>{let n,i;if(!o){const e=document.querySelector(".ThemeBundleEditor-top"),t=e?.closest(".ThemeBundle.TC"),o=t?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"] select[name$="_preset"]');i=o?.querySelector(`option[value="${o.value}"]`)?.textContent,n=(e=>{const t=e?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"]'),o=t?.querySelectorAll(":scope > .CIG-large > .CIG .CIG-row"),n=[],i=[];return o.forEach(e=>{const t=e.getAttribute("data-field-name"),o=t.substring(t.lastIndexOf(".")+1),r=e.querySelector("textarea, input.color"),a=e.querySelector('input[type="checkbox"]'),s=e.querySelector('[data-type="text"] select');r?(n[o]=r.value||"",i[o]=r.placeholder||""):a?n[o]=a.checked:s&&(n[o]=s.value||"",i[o]=s.getAttribute("data-placeholder")||"")}),{overrideValues:n,themePlaceholders:i}})(t)}const r=CONTEXT_PATH+"styleguide/preset?themeId="+e+"&templateId="+(o||"themeFields"),a=new Headers,s=await fetch(r,{method:"GET",headers:a});try{const e=await s.json(),o=e.success&&JSON.stringify(e.data);document.querySelector("iframe.StyleguideFrame").contentWindow.postMessage({type:"BSP.Styleguide.ReturnThemePresets",presets:o,selectedPreset:t,themeOverrides:n?.overrideValues,themePlaceholders:n?.themePlaceholders,themePreset:i},"*")}catch(e){console.log(e)}};window.addEventListener("message",async({data:e})=>{if("object"!=typeof e||!e.type?.startsWith("BSP.Styleguide."))return;const t=document.querySelector(".ThemeBundle")?.getAttribute("data-id"),o=e.preset?.key?.startsWith("brightspot-styleguide-template-values-")&&e.preset.key.replace("brightspot-styleguide-template-values-",""),n=document.querySelector(".ThemeBundleEditor-top"),a=n?.closest(".ThemeBundle.TC"),M=a?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"]');if("BSP.Styleguide.RequestPresets"===e.type)d(t,e.label,e.templateName);else if("BSP.Styleguide.SetOverrides"===e.type||"BSP.Styleguide.RemovePreset"===e.type)(async(e,t,o,n)=>{const a=CONTEXT_PATH+"styleguide/preset?themeId="+e,p=new Headers;p.append("Brightspot-CSRF",i.A.get("bsp.csrf"));const b={};b.type=t.type,b.key=t.preset.key,b.values=t.preset.values,b.label=t.preset.label,b.presetId=t.preset.presetId||(0,r.A)();const M=await fetch(a,{method:"POST",headers:p,body:JSON.stringify(b)});try{(await M.json()).success&&d(e,t.preset.label,o)}catch(e){console.log(e)}if("brightspot-styleguide-theme-values"===t.preset.key){const e=n?.querySelector(":scope > .CIG-small select");if("BSP.Styleguide.RemovePreset"===t.type){const o=e?.querySelector(`option[value="${t.preset.presetId}"]`);o?.remove()}else if("BSP.Styleguide.SetOverrides"===t.type)if(t.preset.presetId){const o=e?.querySelector(`option[value="${t.preset.presetId}"]`);o.textContent=t.preset.label}else{const o=document.createElement("option");o.setAttribute("data-hide",`${s}, ${c}`),o.setAttribute("value",b.presetId),o.textContent=t.preset.label,e.appendChild(o)}}})(t,e,o,M);else if("BSP.Styleguide.SyncOverrideField"===e.type){const t=M?.querySelector(`:scope > .CIG-large > .CIG .CIG-row[data-field-name$=".${e.field}"]`);b(t,e.value),M.setAttribute("data-received-update","")}else if("BSP.Styleguide.SyncThemePresetField"===e.type){const t=M?.querySelector(":scope > .CIG-small select"),o="Custom"===e.preset?"":e.preset;t&&p(t,o)}})},73609(e,t,o){"use strict";o.d(t,{A:()=>b}),o(67219),o(44764),o(84978),o(13722),o(39589),o(25809);var n=o(1439),i=o.n(n),r=o(5292),a=o(26594),s=o(40627),c=o(95628),p=o(66556);class b{constructor(e){this._container=e,this._update=(0,a.A)(this._update.bind(this)),this._update(),window.addEventListener("brightspot-content-state-change",()=>{this._toggle()})}_forEachChild(e){for(const t of this._container.children){const o=t.dataset.tab;void 0!==o&&e(o,t)}}_toArray(e){if(e)try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{}return[]}_update(){this._observer&&(this._observer.disconnect(),this._observer=null);const e=(0,r.A)("div",{className:"TabBar",role:"tablist"}),t=(0,r.A)("button",{className:"TabBar-menuToggle",title:window.BRIGHTSPOT?.ui.tooltips.tabs,type:"button","aria-haspopup":"menu","aria-expanded":"false","aria-label":window.BRIGHTSPOT?.ui.tooltips.tabs}),o=(0,r.A)("div",{className:"TabBar-menuList",role:"menu","aria-label":window.BRIGHTSPOT?.ui.tooltips.tabs}),n=(0,r.A)("div",{className:"TabBar-menu"},t,o);t.onclick=()=>{(0,p.AM)(o,t,e)};const i="MENU"===this._container.dataset.tcMode,a=this._container.dataset.tcMain,b=this._toArray(this._container.dataset.tcExceptions),M=new Set;this._defaultTab=null;for(const e of this._container.children){const t=e.dataset.tab;void 0!==t&&(M.has(t)||(this._defaultTab||(this._defaultTab=t),M.add(t)))}const d=this._toArray(this._container.dataset.tcStart),l=this._toArray(this._container.dataset.tcEnd),z=[];for(const e of d)M.has(e)&&z.push(e);for(const e of M)d.includes(e)||l.includes(e)||z.push(e);for(const e of l)M.has(e)&&z.push(e);for(const t of z){const n=b.indexOf(t)>-1?i?e:o:i?o:e;n.insertBefore((0,r.A)("button",{className:"TabBar-item",dataset:{tab:t},role:"tab",onclick:e=>{e.preventDefault(),this.select(t,e)},onkeydown:e=>{var t=e.currentTarget,o=t.closest(".TabBar");switch(e.key){case"ArrowRight":return void(t.nextSibling?t.nextSibling.focus():o.firstChild.focus());case"ArrowLeft":return void(t.previousSibling?t.previousSibling.focus():o.lastChild.focus())}}},t),t===a?n.firstChild:null)}z.includes(a)&&(this._defaultTab=a),1===e.children.length&&o.insertBefore(e.children[0],o.firstChild);for(const e of o.children)e.className="TabBar-menuItem",e.setAttribute("role","menuitem");if((0,p.D1)(o,t),this._bar&&(this._bar.remove(),this._bar=null,this._menu=null,this._menuToggle=null,this._menuList=null),0===z.length||z.length<2&&!this._container.getAttribute("data-show-tabs")){this._container.dataset.tabless="true";const e=this._container.querySelectorAll(":scope > .TC-unselected");return void Array.from(e).forEach(e=>{e.classList.remove("TC-unselected")})}this._bar=e,this._container.insertBefore(e,this._container.firstChild),o.children.length>0&&(0===e.children.length&&(e.classList.add("is-menuOnly"),e.removeAttribute("role")),this._menu=n,this._menuToggle=t,this._menuList=o,this._bar.appendChild(n));const u=this._toggle();u.includes(this._defaultTab)||(this._defaultTab=u[0]),e.hidden=1===Array.from(o.children).filter(e=>!e.hidden).length;let O=!1;for(const e of(0,s.A)(this._container,".CIG-row > .Message.is-error")){let t,o=e;do{t=o,o=t.parentNode}while(o!==this._container);const n=(0,c.A)(this._bar,`[data-tab="${t.dataset.tab}"]`);n&&!n.classList.contains("is-error")&&(n.classList.add("is-error"),n.classList.contains("TabBar-menuItem")&&(O=!0))}O&&e.classList.add("is-menuError"),this.select()}_toggle(){const e=[];this._forEachChild((t,o)=>{o.hidden||o instanceof HTMLHeadingElement||e.push(t)});for(const t of[this._bar,this._menuList])if(t)for(const o of t.children)o!==this._menu&&(o.hidden=!e.includes(o.dataset.tab));return e}select(e,t){const o=e&&this._container.closest(".ContentEdit.is-new, .StandardForm.is-new");if(e||(e=this._defaultTab),this._bar&&!this._bar.classList.contains("is-menuOnly"))for(const t of this._bar.children){const o=t.dataset.tab===e;t.classList.toggle("is-selected",o),t.setAttribute("aria-selected",o),o?t.removeAttribute("tabindex"):t.setAttribute("tabindex","-1")}if(this._menuList){let t=!1;for(const o of this._menuList.children)o.classList.toggle("is-selected",o.dataset.tab===e)&&(t=e!==this._defaultTab);this._bar.classList.toggle("is-menuSelected",t),this._menuToggle.innerText=t?e:""}if(this._forEachChild((t,o)=>{o.classList.toggle("TC-unselected",t!==e)}),window.dispatchEvent(new Event("resize")),i()(this._container).find("> [data-tab]").trigger("tabbedShow"),i()(this._bar).trigger("tabbed-select"),o){const t=this._container.querySelector(`:scope > .CIG-row:not(.inputContainer-readOnly)[data-tab="${e}"] > .CIG-label > label`)?.htmlFor;t&&document.getElementById(t)?.focus()}else t&&t.target.scrollIntoView({block:"nearest"})}}},96538(){window.addEventListener("click",e=>{const t=e.target;if(t.classList.contains("Taxonomy-expand")){for(const e of t.closest("ul").querySelectorAll(".is-selected"))e.classList.remove("is-selected");t.closest("li").classList.add("is-selected")}},{capture:!0}),window.addEventListener("brightspot-frame-load",e=>{const t=e.target;t.classList.contains("Taxonomy-children")&&window.requestAnimationFrame(()=>{t.closest(".Taxonomy").scrollTo({left:3e4})})})},95835(e,t,o){"use strict";o(84978),o(25809);var n=o(5292),i=o(32246);const r="is-open";new class{constructor(){this._editorStage=null,this._editorToggle=null,this._themeBundle=null,this._presetSelect=null,this._selectedPreset=null,this._sg=null,this._zIndex=110,(0,i.A)(document,".ThemeBundle",e=>{this._themeBundle=e,this._initLabels(),this._createUI(this._themeBundle)}),(0,i.A)(document,'.Tab[data-tab="Styleguide"]',e=>{document.body.classList.add("has-theme-styleguide")}),window.addEventListener("message",async({data:e})=>{if("object"==typeof e)if("BSP.Styleguide.CloseStyleguideReady"===e.type){this._editorToggle.setAttribute("aria-expanded","false"),this._editorStage.classList.remove(r);const e=document.querySelector('.CIG-row[data-tab="Overrides"][data-field-name$="._preset"]'),t=e.querySelector(".CIG-large");if(this._selectedPreset!==this._presetSelect.value||e.hasAttribute("data-received-update")){const o=this._presetSelect.closest(".CIG").querySelector(":scope > .TabBar .ThemeBundle-tabOverrides");o&&o.click(),t.style=this._presetSelect.value?"display: none;":"",e.classList.add("state-changed"),e.removeAttribute("data-received-update"),this._presetSelect.value||t.querySelectorAll('input.color, input[type="checkbox"], textarea').forEach(e=>e.removeAttribute("disabled"))}}else"BSP.Styleguide.LoadingV2"===e.type&&this._sg.classList.add("is-v2")})}_initLabels(){this._labels={tab:window.THEME_BUNDLE_EDITOR_LABELS?window.THEME_BUNDLE_EDITOR_LABELS.tabName:"Main",open:window.THEME_BUNDLE_EDITOR_LABELS?window.THEME_BUNDLE_EDITOR_LABELS.openAction:"Open Styleguide",openNewTab:window.THEME_BUNDLE_EDITOR_LABELS?window.THEME_BUNDLE_EDITOR_LABELS.openNewTabAction:"Open in New Window/Tab",close:window.THEME_BUNDLE_EDITOR_LABELS?window.THEME_BUNDLE_EDITOR_LABELS.closeAction:"Back"}}_createUI(e){this._editorStage=(0,n.A)("DIV",{class:"ThemeBundleEditor-stage"}),this._editorStage.addEventListener("transitionend",e=>{e.target===this._editorStage&&(e.stopPropagation(),this._editorStage.classList.contains(r)?this._showStyleguide():this._hideStyleguide())}),this._editorToggle=(0,n.A)("BUTTON",{className:"ThemeBundleEditor-toggle",name:"action-edit",value:this._labels.open,"aria-expanded":"false",onclick:e=>{e.preventDefault(),this._openEditor()}},this._labels.open);const t=(0,n.A)("DIV",{className:"ThemeBundleEditor-stage-main"}),o=(0,n.A)("DIV",{className:"ThemeBundleEditor-stage-top"},(0,n.A)("a",{className:"Popup-heading ThemeBundleEditor-close",onclick:e=>{this._closeEditor()}},this._labels.close));if(this._editorStage.appendChild(o),this._editorStage.appendChild(t),e.appendChild(this._editorStage),e.querySelector('.CIG-row[data-field-name$="._preset"]')){const t=e.querySelector(".CIG-row");t&&e.insertBefore((0,n.A)("DIV",{className:"ThemeBundleEditor-top","data-tab":this._labels.tab},this._editorToggle),t)}}_closeEditor(){this._sg.matches(".is-v2")?this._sg?.contentWindow.postMessage({type:"BSP.Styleguide.CloseStyleguide"},"*"):(this._editorToggle.setAttribute("aria-expanded","false"),this._editorStage.classList.remove(r))}_openEditor(){this._editorStage.style.zIndex=this._zIndex,this._editorToggle.setAttribute("aria-expanded","true"),this._editorStage.classList.add(r)}_showStyleguide(){this._sg?(this._sg.style.visibility="visible",this._sg?.contentWindow.postMessage({type:"BSP.Styleguide.ReopenStyleguide"},"*")):((0,i.A)(".ThemeBundle-edit",async e=>{const t=await fetch(e.href),o=await t.text(),i=document.createElement("template");i.innerHTML=o,this._sg=i.content.querySelector('.Tab[data-tab="Styleguide"] iframe'),this._editorStage.querySelector(".ThemeBundleEditor-stage-main").appendChild(this._sg);const r=(0,n.A)("a",{className:"Popup-heading ThemeBundleEditor-openNewTab",target:"_blank",href:this._sg.getAttribute("src")},this._labels.openNewTab);document.querySelector(".ThemeBundleEditor-stage-top").appendChild(r)}),this._presetSelect=document.querySelector('.CIG-row[data-tab="Overrides"][data-field-name$="._preset"] select[name$="._preset"]'),this._selectedPreset=this._presetSelect.value)}_hideStyleguide(){this._sg&&(this._sg.style.visibility="hidden")}}},13411(e,t,o){"use strict";(0,o(41044).A)(".TimedContentPlayerNote",async()=>{window.BRIGHTSPOT?.ui.cms.enableV5UI||await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(2415)]).then(o.bind(o,43516)),await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(2415)]).then(o.bind(o,55603))})},3341(e,t,o){"use strict";(0,o(41044).A)(".VideoEditor",async()=>{window.BRIGHTSPOT?.ui.cms.enableV5UI||await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(4582),o.e(3543),o.e(4795),o.e(8863)]).then(o.bind(o,86456)),await Promise.all([o.e(8897),o.e(4114),o.e(1173),o.e(4582),o.e(3543),o.e(4795),o.e(8863)]).then(o.bind(o,36245))})},48557(e,t,o){"use strict";var n=o(32246),i=o(47626);(0,n.A)(".ViewMirror",async e=>{const t=e.dataset.contentUrl;if(!t)return;const o=e.dataset.refreshUrl;if(!o)return;const n=e.querySelector(".ViewMirror-content");if(!n)return;let r;const a=async()=>{n.innerHTML=await(await fetch(t,{cache:"no-cache"})).text();const e=n.querySelector(".PreviewFrame");e&&(r=new i.A(e),r.isVisible=!0,r.updatePreview())};let s;await a(),setInterval(()=>{s&&s.readyState!==EventSource.CLOSED||(s=new EventSource(o),s.onmessage=e=>{switch(JSON.parse(e.data).action){case"update-content":a();break;case"update-preview":r&&r.updatePreview()}})},1e3)})},47626(e,t,o){"use strict";o.d(t,{A:()=>s}),o(44764);var n=o(32246),i=o(36711);const r=window.BRIGHTSPOT?.ui.tooltips;let a=0;class s{get isVisible(){return this.__isVisible}set isVisible(e){this.__isVisible=e}constructor(e,t){this.__isVisible=!1,this.__preview=e,this.__onPreviewUpdate=t,this.__typeFrame=e.querySelector(".PreviewFrame-typeFrame"),this.__reloadButton=e.querySelector(".PreviewFrame-reload");const o=e.closest(".Page-content, .Popup");if(o){const e=o.querySelector(".ContentEdit");e&&(this.containerId=e.getAttribute("data-object-id"))}this.__typeFrame.onload=()=>{this.__firstRefresh=!0,this.__previewControls=this.__typeFrame.querySelector(".PreviewFrame-typeControlsContainer"),this.__previewDisplay=this.__typeFrame.querySelector(".PreviewFrame-typeDisplay"),this.__previewControls&&(this.__shouldRefresh="true"===this.__previewControls.getAttribute("data-refresh-on-change")),this.__isVisible&&this.updatePreview()}}updatePreview(){this.__preview.dispatchEvent(new CustomEvent("brightspot-preview-update",{bubbles:!0})),this.refreshIFrames()}refreshIFrames(){if(this.__previewControls&&this.__previewDisplay&&(this.__firstRefresh||this.__shouldRefresh&&this.__isVisible)){this.__firstRefresh=!1;const e=this.__previewControls.querySelector("form");if(!e)return;const t=document.createElement("IFRAME");t.name="PreviewFrame-preview"+a++,t.setAttribute("title",r.preview.iframeTitle);const o=this.__previewDisplay.querySelector("iframe[name^='PreviewFrame-preview']:not(.Preview-overlayFrame)"),n=this.__previewControls.querySelector(".deviceWidthSelect");let s=o?.style.width;if(!s){const e=n?.options[n?.selectedIndex],t=parseInt(e?.getAttribute("data-device-width")||"0",10);t&&(s=`${t}px`)}s&&(t.style.width=s),o?.style.transform&&(t.style.transform=o.style.transform);const c=o?.style.getPropertyValue("--PreviewFrame-scale");c&&t.style.setProperty("--PreviewFrame-scale",c),this.__previewDisplay.insertBefore(t,this.__previewDisplay.firstChild),t.setAttribute("data-container-id",this.containerId);const p=t.closest(".Popup"),b=(e=null)=>{const t=p??document;t.querySelector(".ContentEdit-previewButtonWrapper")?.classList.toggle("is-animating",e)};b(!0),t.onload=()=>{const e=[];this.__onPreviewUpdate&&this.__onPreviewUpdate(),b(!1);for(let o=t;o=o.nextElementSibling;)"IFRAME"!==o.tagName||o.classList.contains("Preview-overlayFrame")||e.push(o);const o=t.parentNode;e.forEach(e=>o.removeChild(e))},(0,i.A)(t,()=>b(!1)),e.target=t.name,e.submit()}}reloadPreview(){this.__reloadButton.click()}deletePreview(){this.__typeFrame.innerHTML=""}}(0,n.A)(".deviceWidthSelect",async e=>{let t=e.closest(".PreviewFrame-typeControlsContainer");if(!t)return;let o=t.querySelector("form");o&&e.addEventListener("change",e=>{document.querySelector("iframe[name='"+o.target+"']")&&(window.dispatchEvent(new Event("resize")),window.dispatchEvent(new Event("viewport-device-changed")))})}),(0,n.A)('select[name="_mainObjectId"]',e=>{const t=e.closest(".Page-content, .Popup");t&&e.addEventListener("change",()=>{t.classList.toggle("is-previewToEditDisabled",e.value)})})},77663(e,t,o){"use strict";o(84978),o(25809);var n=o(5292),i=o(95628),r=o(40627),a=o(32246),s=o(66556);const c=window.BRIGHTSPOT?.ui.tooltips;(0,a.A)('.Widget a[target="toolUserTfa"]',e=>{const t=e.closest(".Widget").querySelector(".Widget-controls");t&&(e.setAttribute("data-popup-mode","local"),t.insertBefore(e,t.firstChild))}),(0,a.A)(".Widget-controls",e=>{const t=e.closest(".Widget"),o=(0,r.A)(t,":scope > .widget-contentCreate li");if((0,i.A)(e,":scope > button:not(.FormFilter-icon)")&&e.closest(".Widget").querySelector("form").prepend(e),o.length<1)return;const a=(0,n.A)("ul",{className:"Widget-actionsList",role:"menu","aria-label":c.actions?.widget}),p=(0,n.A)("div",{className:"Widget-actions"}),b=(0,n.A)("button",{"aria-expanded":"false","aria-label":c.actions?.widget,"aria-haspopup":"menu",className:"Widget-actionsToggle",type:"button",title:c.actions?.actions,onclick:()=>{(0,s.AM)(a,b,p)}});for(const e of o)a.appendChild(e);const M=(0,i.A)(e,':scope > button[name="action-delete"]');M&&a.appendChild((0,n.A)("li",M)),p.appendChild(b),p.appendChild(a),p.setAttribute("data-tether-anchor",""),e.appendChild(p),(0,s.D1)(a,b)}),(0,a.A)("[data-widget-id]:not(.Guide-tabCluster)",e=>{e.addEventListener("focusin",()=>{if(document.body.classList.contains("is-guideOpen")){const t=[...document.querySelectorAll(".Guide")].pop().querySelector(`.Guide-tabCluster[data-widget-id="${e.dataset.widgetId}"]`);if(t){const e=t.closest(".Guide-content");e.querySelectorAll(".is-focus").forEach(e=>e.classList.remove("is-focus")),e.scrollTo({top:0}),t.scrollIntoView(!0),t.nextElementSibling.classList.add("is-focus")}}})})},89756(e,t,o){"use strict";(0,o(41044).A)(".AppetizeioPreviewPage",async()=>{await Promise.all([o.e(8897),o.e(4114),o.e(2963)]).then(o.bind(o,48874))})},47172(){const e=window.fetch;window.fetch=function(){const t=[...arguments],o=t.length>1?t[1]:{};return"object"!=typeof o||o.credentials||(o.credentials="same-origin"),t[1]=o,e.apply(this,t)}},62824(e,t,o){"use strict";var n=o(1439),i=o.n(n);window.$=i(),window.jQuery=i();const r=i().fn.load;i().fn.load=function(e){return"function"==typeof e?this.on("load",e):r.apply(this,arguments)};const a=i().parseJSON;i().parseJSON=function(e){return e?a.apply(this,arguments):e},i().fn.size=function(){return this.length}},41956(e,t,o){"use strict";var n=o(21194),i=o(1439);window.define=n.E8,window.require=n.Yp,window.requirejs=n.nw,(0,n.E8)("bsp-utils",[],()=>o(75288)),(0,n.E8)("iframeResizer",[],()=>o(98579)),(0,n.E8)("ColorRotator",[],()=>o(76342)),(0,n.E8)("jquery",[],()=>i),(0,n.E8)("v3/rtc",[],()=>o(52215).default)},9968(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(99022)},5292(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(38745)},89561(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(83394)},32246(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(56155)},36711(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(22274)},10013(e,t,o){"use strict";o.d(t,{A:()=>n.A});var n=o(33582)},52215(e,t,o){"use strict";o.r(t),o.d(t,{default:()=>n.A});var n=o(26791)},76342(e,t,o){"use strict";o.r(t),o.d(t,{default:()=>s});var n=o(49259),i=o.n(n);const r=(0,o(31605).A)(),a=[{v4:"red",v5:"darkorchid"},{v4:"orange",v5:"green"},{v4:"yellow",v5:"firebrick"},{v4:"green",v5:"blue"},{v4:"blue",v5:"purple"},{v4:"purple",v5:"brown"}];class s{constructor(){this._index=0}getNext(){const e=a[this._index%a.length],t=window.BRIGHTSPOT?.ui.cms.enableV5UI?i().keyword.hex(e.v5):r.getColor(e.v4,5),[o,n,s]=i().hex.hsl(t);return`#${i().hsl.hex([o+20*Math.floor(this._index++/a.length),n,s])}`}}},34980(e,t,o){"use strict";o.d(t,{A:()=>i});const n=window.localStorage,i={get:e=>n.getItem(e),set:(e,t)=>n.setItem(e,t),toggle:(e,t)=>(void 0===t&&(t=!n.getItem(e)),t?n.setItem(e,"1"):n.removeItem(e),t)}},7724(e,t,o){"use strict";var n=o(32246),i=o(52215);(0,n.A)('.Widget[data-internal-name="com.psddev.assign.widget.AssignmentContentWidget"]',e=>{const t=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",o=>{const n=(o.mainObjectValues||o.values)["assign.assignments"];if(n)for(var i of n)if(i._ref===t){let t=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(t)&&t.click();break}})})},33482(e,t,o){"use strict";o(67219),o(84978),o(25809);var n=o(32246),i=o(9968),r=o(52215),a=o(5292),s=o(66556);(0,n.A)(".AssignmentDeskDashboard-actionsToggle",e=>{const t=e.closest(".AssignmentDeskDashboard-actionsWrapper").querySelector(".AssignmentDeskDashboard-actions");(0,s.D1)(t,e),e.addEventListener("click",o=>{(0,s.AM)(t,e)})}),(0,n.A)('.AssignmentDeskDashboard .SearchWidget-type .ComboInput-option:not([data-value*="-"])',e=>{e.remove()}),(0,n.A)(".AssignmentDeskDashboard .toolbar .AssignmentDeskDashboard-title",e=>{const t=e.closest(".SearchWidget");t.querySelector(":scope > .AssignmentDeskDashboard-title")?e.remove():t.appendChild(e)}),(0,n.A)(".AssignmentDeskDashboard.SearchWidget",e=>{const t=Array.from(document.querySelectorAll('select[name="st"] option'),e=>{if(e.value)return e.value});new MutationObserver(t=>{e.classList.remove("has-refresh")}).observe(e.querySelector(".SearchWidget-result"),{attributes:!0,attributeFilter:["class"]}),r.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",o=>{let n,i,r;if(o.mainObjectId?(i=o.contentTypeId,r=o.contentId,n=o.values):(i=o.mainObjectIdTypeId,r=o.mainObjectId,n=o.mainObjectValues),t.includes(i)){const t=e.querySelectorAll(`.SearchWidget-result a[href$="${r}"]:not([data-rtc-updated]):not([target="SingleFieldUpdateTarget"])`);if(t.length>0){for(const e of t){const t=e.closest("tr");if(t&&t.classList.contains("has-updateAttempt"))return}e.classList.add("has-refresh"),t.forEach(e=>{e.setAttribute("data-rtc-updated",!0),e.parentElement.insertBefore((0,a.A)("span",{class:"Label is-updated",title:`${o.userName} - ${new Date(o.date).toLocaleString()}`},"Updated"),e)})}e.classList.contains("has-refresh")||n["cms.content.publishDate"]!==n["cms.content.updateDate"]||e.classList.add("has-refresh")}})});const c=function(e){e.addEventListener("click",t=>{if(e.classList.contains("is-open")){const e=document.getElementById("calendarPopup");e&&(t.preventDefault(),t.stopImmediatePropagation(),e.dispatchEvent(new CustomEvent("close",{bubbles:!0})))}else e.classList.toggle("is-open")})};(0,n.A)(".SingleFieldUpdate-date",e=>{c(e)}),(0,n.A)(".SingleFieldUpdate-content .DateTimeInput",e=>{const t=e.closest(".Popup");if(t&&"SingleFieldUpdateTarget"===t.getAttribute("name")){e.click();const o=document.getElementById("calendarPopup"),n=t.querySelector(".SingleFieldUpdate-form");if(!n)return;const r=n.dataset.objectid,a=document.querySelectorAll(".SingleFieldUpdate-date.is-open");let s=null;for(const e of a)e.href&&!e.href.includes(r)?e.classList.toggle("is-open"):s=e;const c=n.querySelector("button"),p=e.previousSibling;if(!(o&&s&&c&&p))return;o._tether=new i.A(s,o),o.onclose=()=>{s.classList.contains("is-open")&&s.classList.toggle("is-open"),t.classList.remove("is-visible","popup-show"),o.remove()},p.addEventListener("change",e=>{e.preventDefault();const t=s.closest("tr");t&&(t.classList.add("has-updateAttempt"),c.click(),o.dispatchEvent(new CustomEvent("close",{bubbles:!0})))})}}),(0,n.A)(".SingleFieldUpdate-success",e=>{e.parentNode.classList.remove("is-visible","popup-show");const t=document.querySelectorAll(`.SearchWidget-result a[href$="${e.dataset.objectid}"]:not([data-rtc-updated]):not([target="SingleFieldUpdateTarget"])`),o=e.content.firstElementChild;o&&(o.classList.add("is-updated"),t.length>0&&t.forEach(e=>{const t=e.closest("tr");if(t){const e=o.cloneNode(!0),n=e.querySelector(".SingleFieldUpdate-date");n&&c(n),t.replaceWith(e)}}),o.remove())}),(0,n.A)(".SingleFieldUpdate-error",e=>{window.alert(e.textContent),e.parentNode.classList.remove("is-visible","popup-show")})},57535(e,t,o){"use strict";(0,o(32246).A)(".AssociatedContent",e=>{const t=e.parentElement;t&&t.classList.add("is-associatedContentWidget")})},38387(e,t,o){"use strict";(0,o(32246).A)(".BulkUploadProcessor li[data-tab]",e=>{const t=e.getAttribute("data-tab"),o=e.closest(".objectInputs").querySelector('[data-tab="'+t+'"][data-upload-mime-type-count]');let n;if(o&&(n=o.getAttribute("data-upload-mime-type-count")),n){const t=document.createElement("SPAN");t.classList.add("MimeTypeCount"),t.innerText=n,e.append(t)}})},75850(e,t,o){"use strict";(0,o(32246).A)(document,".Calendar .calendarEvent",e=>{const t=e.dataset.color;t&&e.style.setProperty("--bg-color",t)})},70823(e,t,o){"use strict";(0,o(32246).A)(".ButtonForClosableWindow",e=>{e.addEventListener("click",t=>{const o=e.getAttribute("data-url");o&&(t.preventDefault(),window.open(o,"_blank"))})})},64660(e,t,o){"use strict";var n=o(32246),i=o(52215);(0,n.A)('.Widget[data-internal-name="com.psddev.assign.widget.PitchAssignmentsWidget"]',e=>{const t=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.assign.AssignmentRtcBroadcast",o=>{if(o.pitchId===t){let t=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(t)&&t.click()}})})},84977(e,t,o){"use strict";var n=o(32246),i=o(52215);(0,n.A)('.Widget[data-internal-name="com.psddev.assign.widget.PitchContentWidget"]',e=>{const t=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",o=>{const n=(o.mainObjectValues||o.values)["assign.pitches"];if(n)for(var i of n)if(i._ref===t){let t=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(t)&&t.click();break}})})},26912(e,t,o){"use strict";var n=o(32246),i=o(66556);(0,n.A)(".Revisions-more",e=>{const t=e.nextSibling;(0,i.D1)(t,e),e.addEventListener("click",()=>{(0,i.AM)(t,e)})}),(0,n.A)(".Revisions-listItem.is-parentRevision",e=>{const t=e.querySelector(".Revisions-listItem-collapseButton"),o=e.querySelector(".Revisions-listItem-children"),n=e.dataset.id;t.addEventListener("click",e=>{e.preventDefault(),e.stopImmediatePropagation(),t.classList.contains("is-active")?(localStorage.removeItem(`BSP.ContentEdit.suggestionCollapsible.${n}`),t.classList.remove("is-active"),o.style.display="none"):(localStorage.setItem(`BSP.ContentEdit.suggestionCollapsible.${n}`,1),t.classList.add("is-active"),o.style.display="block")}),localStorage.getItem(`BSP.ContentEdit.suggestionCollapsible.${n}`)&&(t.classList.add("is-active"),o.style.display="block")}),(0,n.A)(".Revisions-statusLabel",e=>{const t=e.dataset.statusColor,o=e.style;!t||e.closest(".Revisions-listItem-children")?o.setProperty("--workflow-color","var(--color-gray6)"):o.setProperty("--workflow-color",t)}),(0,n.A)(".message.is-revision",e=>{const t=e.querySelector(".Message-icon"),o=e.dataset.statusColor;if(!o)return;const n=t?.style;n.setProperty("--Revision-revisionColor",o)})},45891(e,t,o){"use strict";o.d(t,{WA:()=>r,cX:()=>n});const n=!("undefined"==typeof navigator)&&(/Mac/.test(navigator.platform)||/macOS/.test(navigator.userAgentData?.platform)),i=n?"Alt+Tab":"F6";function r(e){return e.replace(/Alt\+Tab/g,i)}},26791(e,t,o){"use strict";o.d(t,{A:()=>M}),o(67219),o(44764);var n=o(62165),i=o(8217),r=(o(50144),o(7095));class a{constructor(e){this._url=void 0,this._requests=void 0,this._sending=!1,this._sessionId=void 0,this._onConnect=()=>{},this._onReceive=()=>{},this._ensureConnectionInterval=void 0,this._receiver=void 0,this._lastMessageReceived=Date.now(),this._messageInterval=void 0,this._pingInterval=void 0,this._url=e,this._ensureConnection=(0,r.A)(5e3,this._ensureConnection.bind(this)),this._requests=[]}send(e,t,o){e&&(this._requests.push({message:e,callback:t,wait:o}),this._sending||(this._sending=!0,this._processRequests()))}async _processRequests(){if(!this._sessionId)return void setTimeout(()=>this._processRequests(),100);if(this._requests.length<=0)return void(this._sending=!1);const e=this._requests.shift();if(!e)return;const{message:t,callback:o,wait:n}=e,i=new URLSearchParams;i.append("sessionId",this._sessionId),i.append("message",JSON.stringify(t));const r=t.type;if(fetch(`${this._url}${r?`?${encodeURIComponent(r)}`:""}`,{method:"post",cache:"no-store",body:i,credentials:"include"}).then(e=>{if(!e.ok)throw"";return e.text()}).then(e=>{o&&o(e?JSON.parse(e):null)}).catch(()=>{this._requests.unshift(e),this.reconnect()}).finally(()=>{this._processRequests()}),n){const e=+Date.now();for(;Date.now()-e<500;);}}connect(e){this._onConnect=e.onConnect||(()=>{}),this._onReceive=e.onReceive||(()=>{}),this._ensureConnectionInterval||(this._ensureConnectionInterval=setInterval(this._ensureConnection,100),this._ensureConnection())}_ensureConnection(){if(this._receiver){const e=this._receiver.readyState;if(e===EventSource.CONNECTING)return;if(e===EventSource.OPEN&&this._sessionId)return}this._reset(),this._receiver=new EventSource(this._url),this._receiver.onmessage=e=>{this._lastMessageReceived=Date.now();const t=JSON.parse(e.data);t._first?("string"==typeof t.sessionId&&(this._sessionId=t.sessionId),this._receiver&&(this._receiver.onerror=()=>this.reconnect()),this._messageInterval=setInterval(()=>{Date.now()>this._lastMessageReceived+6e3&&this.reconnect()},1e3),this._pingInterval=setInterval(()=>this.send({type:"ping"}),55e3)):t._ping||this._onReceive(t)},this._onConnect()}disconnect(){this._ensureConnectionInterval&&(clearInterval(this._ensureConnectionInterval),this._ensureConnectionInterval=void 0),this._reset()}_reset(){this._sessionId=void 0,this._receiver&&(this._receiver.close(),this._receiver=void 0),this._messageInterval&&(clearInterval(this._messageInterval),this._messageInterval=void 0),this._pingInterval&&(clearInterval(this._pingInterval),this._pingInterval=void 0)}reconnect(){this._reset(),this._ensureConnection()}}const s=!0===window.BRIGHTSPOT?.ui?.cms?.enableV5UI,c=!0===window.BRIGHTSPOT?.ui?.cms?.enableAutomaticUpdates,p=["com.psddev.cms.tool.page.content.PublishBroadcast","com.psddev.assign.AssignmentRtcBroadcast","com.psddev.cms.conversation.PostBroadcast","brightspot.liveblog.LiveBlogPostRtcBroadcast"];let b;if(window.DISABLE_RTC||!document.documentElement.dataset.userId)b={initialize:function(){},restore:function(){},receive:function(){},receiveOnce:function(){},execute:function(){}};else{const e="broadcast",t="callback",o="connect",r="connect",M="execute",d="restore",l={},z=(e,t)=>{if(!s||c||!p.includes(e))for(const o of l[e]??[])o(t)},u=(e,t)=>{for(const{broadcast:e,data:o}of t??[])z(e,o);e&&e(t)},O=`${(0,i.A)()}-`;let A=0;const f=new n.X2("brightspot-rtc"),h=(e,o)=>{const n=O+ ++A,i=({type:e,callbackId:r,broadcasts:a})=>{e===t&&r===n&&(f.removeEventListener("message",i),u(o,a))};f.addEventListener("message",i),f.postMessage({type:d,message:e,callbackId:n})},m=[],q={};let _;f.addEventListener("message",({type:t,broadcast:n,data:i})=>{if(t===o)for(const{message:e,callback:t}of m)h(e,t);else t===e&&z(n,i)});const W=(e,t)=>{_.send(e,e=>{u(t,e)})};(0,n.XS)(f).awaitLeadership().then(()=>{_=new a(`${window.ROOT_PATH}/_rtc`),f.addEventListener("message",({type:e,message:o,callbackId:n})=>{e===r||e===M?_.send(o):e===d&&_.send(o,e=>{f.postMessage({type:t,callbackId:n,broadcasts:e})})}),_.connect({onConnect:()=>{f.postMessage({type:o});for(const{message:e,callback:t}of m)W(e,t)},onReceive:({broadcast:t,data:o})=>{if(t&&o&&(f.postMessage({type:e,broadcast:t,data:o}),z(t,o),!s||c||!p.includes(t)))for(const e of q[t]??[])e(o)}})}),b={initialize:function(e,t,o){b.restore(e,t,o),window.addEventListener("unload",()=>{const n={type:"disconnect",className:e,data:t};_?_.send(n,o,!0):f.postMessage({type:r,message:n})})},restore:function(e,t,o){const n={type:"restore",className:e,data:t};m.push({type:d,message:n,callback:o}),_?W(n,o):h(n,o)},receive:function(e,t){t&&(l[e]??=[]).push(t)},receiveOnce:function(e,t){t&&(q[e]??=[]).push(t)},execute:function(e,t){const o={type:"execute",className:e,data:t};_?_.send(o):f.postMessage({type:M,message:o})}}}const M=b},49989(e,t,o){"use strict";o.d(t,{A:()=>f}),o(44764),o(84978),o(25809),o(91672);var n=o(29171),i=o(17319),r=o(80133),a=o(79911);function s(){s=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!b(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?z(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=l(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:d(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=d(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function c(e){var t,o=l(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function p(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function b(e){return e.decorators&&e.decorators.length}function M(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function d(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function l(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function u(e,t,o,n){var i=O(A(1&n?e.prototype:e),t,o);return 2&n&&"function"==typeof i?function(e){return i.apply(o,e)}:i}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},O.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}let f=(h=[(0,i.EM)("btu-table")],m=(0,r.m)((0,a.s)(n.WF)),q=s(),_=function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,i.nJ)("table")],key:"_table",value:void 0},{kind:"method",key:"connectedCallback",value:function(){u(o,"connectedCallback",this,3)([]),this._table.then(e=>{const t=e.querySelector(':scope th > input[type="checkbox"]');t?.addEventListener("click",this._updateCheckAll),e.querySelectorAll(':scope > tbody input[type="checkbox"]').forEach(e=>{e.addEventListener("click",this._updateSelectAll)})})}},{kind:"method",key:"disconnectedCallback",value:function(){u(o,"disconnectedCallback",this,3)([]),this._table.then(e=>{const t=e.querySelector(':scope th > input[type="checkbox"]');t?.removeEventListener("click",this._updateCheckAll),e.querySelectorAll(':scope > tbody input[type="checkbox"]').forEach(e=>{e.removeEventListener("click",this._updateSelectAll)})})}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"field",key:"_updateSelectAll",value(){return e=>{this._table.then(e=>{const t=e.querySelector(':scope th > input[type="checkbox"]'),o=e.querySelectorAll(':scope > tbody input[type="checkbox"]'),n=e.querySelectorAll(':scope > tbody input[type="checkbox"]:checked');t&&(t.checked=o.length>0&&n.length===o.length,this.emit("btu-table-checked-all"))})}}},{kind:"field",key:"_updateCheckAll",value(){return e=>{this._table.then(t=>{const o=e.target;o instanceof HTMLInputElement&&(t.querySelectorAll(':scope > tbody input[type="checkbox"]').forEach(e=>{e.checked=o.checked}),this.emit("btu-table-checked-all"))})}}},{kind:"method",key:"render",value:function(){return n.s6}}]}}(function(e){q.initializeInstanceElements(e,W.elements)},m),W=q.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(M(r.descriptor)||M(i.descriptor)){if(b(r)||b(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(b(r)){if(b(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}p(r,i)}else t.push(r)}return t}(_.d.map(c)),h),q.initializeClassElements(_.F,W.elements),q.runClassFinishers(_.F,W.finishers));var h,m,q,_,W},31605(e,t,o){"use strict";o.d(t,{A:()=>d}),o(84978),o(25809),o(91672);var n=o(49259),i=o.n(n),r=o(38745),a=o(56155);const s=[90,81,72,38,14,8,4],c=[3,5,7,14,26,42,65],p={Bold:{luminances:s,darkLuminances:c,colors:{dominant:"#93a7c6",gray:"#7d7f88",red:"#ff1e3c",orange:"#f28d00",yellow:"#baa700",green:"#51bd00",blue:"#13315c",purple:"#af95ff"}},Calm:{luminances:s,darkLuminances:c,colors:{dominant:"#908f8b",gray:"#908f8b",red:"#c14234",orange:"#ff9505",yellow:"#e2c222",green:"#90b52d",blue:"#2aa3bf",purple:"#7700ff"}},Brightspot:{luminances:s,darkLuminances:c,colors:{dominant:"#4b4545",gray:"#958f8f",red:"#ee0120",orange:"#f98948",yellow:"#f9dc5c",green:"#15655b",blue:"#225b7d",purple:"#3a4697"}}};function b(e){const[t,o,n]=e.map(e=>e/255).map(e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return 100*(.2126*t+.7152*o+.0722*n)}const M=new class{constructor(e){this._element=void 0,this._dark=!1,this._theme=void 0,this.createTable=(e,t,o)=>{const n=(0,r.A)("table",{className:"Theme-colors"}),i=(0,r.A)("tr");n.appendChild(i),i.appendChild((0,r.A)("td",{colspan:2}));const a=this._dark?o:t,s=a?JSON.parse(a):this._theme[this._dark?"darkLuminances":"luminances"],c=e?JSON.parse(e):this._theme.colors;return s.forEach((e,t)=>{i.appendChild((0,r.A)("td",(0,r.A)("input",{type:"text",name:"luminance-"+t,value:e,oninput:e=>{e.target instanceof HTMLInputElement&&(s[t]=parseInt(e.target.value,10)),this._updateColorAccent(),this._updateUI()},onkeydown:e=>{if(!(e.target instanceof HTMLInputElement))return;let o=parseInt(e.target.value,10);switch(e.key){case"ArrowUp":o++,e.target.value=o.toString(),s[t]=o,this._updateColorAccent(),this._updateUI();break;case"ArrowDown":o--,e.target.value=o.toString(),s[t]=o,this._updateColorAccent(),this._updateUI()}}})))}),Object.keys(c).forEach(e=>{if("accent"===e)return;const t=(0,r.A)("tr",(0,r.A)("td",e.charAt(0).toUpperCase()+e.slice(1)));t.appendChild((0,r.A)("td",(0,r.A)("input",{className:"color",type:"text",name:"color-"+e,value:c[e],onchange:t=>{t.target instanceof HTMLInputElement&&(c[e]=t.target.value),this._updateColorAccent(),this._updateUI()}})));for(let o=0;o<s.length;o++)t.appendChild((0,r.A)("td",{style:`background:var(--color-${e}${o+1});`}));n.appendChild(t)}),n},this._element=e,(0,a.A)(this._element,".themeColorContainer",e=>{const t=e.dataset.colors,o=e.dataset.luminances,n=e.dataset.darkLuminances,i=e.querySelector("input.appearance");i&&(i.value=this._dark.toString());const r=this.createTable(t,o,n);e.appendChild(r)}),(0,a.A)(this._element,".headerBackgroundContainer .color",e=>{e.addEventListener("change",e=>{e.target instanceof HTMLInputElement&&(this._theme.headerBackground=e.target.value),this._updateColorAccent(),this._updateUI()})}),(0,a.A)(this._element,".CIG-row[data-field-name='cms.presetTheme'] .ComboInput-option[data-value='CUSTOM']",e=>{const t=e.closest(".CIG-row");if(!t)return;const o=t.nextElementSibling;o&&("true"==e.getAttribute("aria-selected")?o.classList.remove("is-hidden"):o.classList.add("is-hidden"),new MutationObserver(e=>{e.forEach(e=>{if("attributes"===e.type){const t=e.target;t instanceof Element&&"true"==t.getAttribute("aria-selected")?o.classList.remove("is-hidden"):o.classList.add("is-hidden")}})}).observe(e,{attributes:!0}))});const t=window.localStorage.getItem("BSP.Theme");let o=!1;const n=document.documentElement.dataset.theme??"";try{JSON.parse(n),o=!0}catch(e){o=!1}this._theme=o?JSON.parse(n):t?JSON.parse(t):function(){const e=p.Bold;return{...e,luminances:e.luminances,darkLuminances:e.darkLuminances,colors:{...e.colors}}}(),this._theme.luminances||(this._theme.luminances=s),this._theme.darkLuminances||(this._theme.darkLuminances=c),"loading"===document.readyState?window.addEventListener("DOMContentLoaded",()=>{this._updateUI()}):this._updateUI(),this._setAppearance(),window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{this._setAppearance(),this._updateUI()}),window.addEventListener("message",async({data:e})=>{"BSP.Theme.UpdateFrameUI"===e.type&&(this._dark=e.isDark,this._theme=e.theme,this._updateColorAccent(),this._updateUI())})}_setAppearance(){const e=this._theme.appearance;this._element.dataset.previewOverlay?(this._dark=!1,document.documentElement.style.colorScheme="light",this._updateUI()):(this._dark=e?"dark"===e:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,document.documentElement.style.colorScheme=this._dark?"dark":"light")}_updateUI(){const e=this._element===document.documentElement?[this._element,document.body]:[this._element];for(const t of e)t.classList.toggle("is-dark",this._dark),t.classList.toggle("is-boxedInput",!!this._theme.boxedInput),t.classList.toggle("is-compact",!!this._theme.compact),t.classList.toggle("is-compactRails",!!this._theme.compactRails),t.classList.toggle("is-highContrast",!!this._theme.highContrast),"more"===this._theme.contrastChoices?t.classList.add("is-moreContrast"):"normal"===this._theme.contrastChoices&&t.classList.add("is-normalContrast");const t=this._element.style,o=this._theme.headerBackground;if(o){t.setProperty("--Page-headerBackground",o);for(const t of e)t.classList.toggle("is-lightHeader",b(i().hex.rgb(o))>Math.sqrt(100)!=this._dark)}else if(this._dark){t.setProperty("--Page-headerBackground","var(--color-dominant1)");for(const t of e)t.classList.add("is-lightHeader")}else{t.setProperty("--Page-headerBackground","var(--color-dominant7)");for(const t of e)t.classList.remove("is-lightHeader")}const n=i().hex.hsl(this._theme.colors.gray),r=this._guessColor(n[0],n[1],1),a=this._guessColor(n[0],n[1],100);this._dark?(this._setColorProperty(t,"black",a),this._setColorProperty(t,"white",r),t.setProperty("--color-iconHoverBackground","rgba(255, 255, 255, 0.08)")):(this._setColorProperty(t,"black",r),this._setColorProperty(t,"white",a),t.setProperty("--color-iconHoverBackground","rgba(0, 0, 0, 0.08)"));const s=this._theme[this._dark?"darkLuminances":"luminances"];let c;for(c in this._theme.colors){if("accent"===c)continue;const[e,o]=i().hex.hsl(this._theme.colors[c]);s?.forEach((n,i)=>{this._setColorProperty(t,`${c}${i+1}`,this._guessColor(e,o,this._theme.highContrast&&3==i?this._dark?4.5*(n+5)-5:(n+5)/4.5-5:n))})}}_guessColor(e,t,o){let n=100,r=0;for(let a=0;a<=100;a+=.1){const s=Math.abs(o-b(i().hsl.rgb([e,t,a])));n>s&&(n=s,r=a)}return i().hsl.rgb([e,t,r])}_setColorProperty(e,t,o){e.setProperty(`--color-${t}`,"#"+i().rgb.hex(o)),e.setProperty(`--rgb-${t}`,o.join(" "))}_updateColorAccent(){this._theme.colors.accent=this._theme.colors.dominant}getColor(e,t){return this._element.style.getPropertyValue(`--color-${e}${t}`)}}(document.documentElement);function d(){return M}},27170(e,t,o){"use strict";function n(e,t){if(e<=0)return t;let o;return function(){clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,[...arguments])},e)}}o.d(t,{A:()=>n})},57317(e,t,o){"use strict";function n(e,t){const o=e.closest(".ContentEdit")||e.closest("btu-widget");if(!o)return null;let n,i;if(o.classList.contains("ContentEdit")){if(n=o.getAttribute("data-type-id"),i=e.getAttribute(t),!n||!i)return null}else if(o instanceof HTMLElement&&(n=o.getAttribute("widgetid"),i=o.getAttribute("internalname"),!n||!i))return null;return n&&i?`BSP.ContentEdit.widgetCollapsed.${n}.${i}`:null}o.d(t,{A:()=>n})},26594(e,t,o){"use strict";function n(e){let t;return function(){t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{t=void 0,e.apply(this,[...arguments])})}}o.d(t,{A:()=>n})},7095(e,t,o){"use strict";function n(e,t){if(e<=0)return t;let o,n=0;return function(){if(o)return;const i=Date.now(),r=e-i+n;r<=0?(n=i,t.apply(this,[...arguments])):o=setTimeout(()=>{n=i,o=void 0,t.apply(this,[...arguments])},r)}}o.d(t,{A:()=>n}),Object.defineProperty(n,"name",{value:"default",configurable:!0})},74051(e,t,o){"use strict";o.d(t,{A:()=>q}),o(44764),o(84978),o(25809),o(91672);var n=o(29171),i=o(17319),r=o(80133),a=o(57317),s=o(31400);function c(){c=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!M(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?u(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=z(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:l(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=l(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function p(e){var t,o=z(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function b(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function M(e){return e.decorators&&e.decorators.length}function d(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function l(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function z(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},O.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}const f=window.localStorage,h=window.BRIGHTSPOT?.ui.tooltips.collapse,m=window.BRIGHTSPOT?.ui.tooltips.expand;let q=(_=[(0,i.EM)("btu-widget")],W=(0,r.m)(n.WF),g=c(),y=function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",key:"_collapsed",value:()=>!1},{kind:"field",decorators:[(0,i.MZ)({type:Boolean})],key:"collapsible",value:()=>!1},{kind:"field",decorators:[(0,i.MZ)({type:String})],key:"heading",value:void 0},{kind:"field",decorators:[(0,i.MZ)({type:String})],key:"internalname",value:void 0},{kind:"field",decorators:[(0,i.wk)()],key:"invalid",value:()=>!1},{kind:"field",decorators:[(0,i.MZ)({type:String})],key:"widgetid",value:void 0},{kind:"field",decorators:[(0,i.MZ)({type:Boolean,attribute:"initial-closed"})],key:"initialClosed",value:()=>!1},{kind:"set",decorators:[(0,i.MZ)({type:Boolean})],key:"collapsed",value:function(e){this._collapsed=e;const t=(0,a.A)(this,"data-internal-name");t&&(e?f.setItem(t,"1"):f.removeItem(t)),this.requestUpdate(),this.emit("btu-widget-toggle")}},{kind:"get",key:"collapsed",value:function(){return this._collapsed}},{kind:"method",key:"connectedCallback",value:function(){var e,t,n,i,r;if((e=o,t="connectedCallback",n=this,r=O(A(1&(i=3)?e.prototype:e),t,n),2&i&&"function"==typeof r?function(e){return r.apply(n,e)}:r)([]),this.collapsible&&this.initialClosed)this._collapsed=!0;else if(this.collapsible){const e=(0,a.A)(this,"data-internal-name");this._collapsed=!(!e||!f.getItem(e))}}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"firstUpdated",value:function(){this.emit("btu-widget-ready"),this.invalid=null!=this.querySelector(".Message.is-error"),this.collapsible&&!this.invalid||(this.collapsed=!1);const e=this.querySelector(".Widget-title"),t=this.firstChild;t instanceof Element&&!t.classList.contains("Widget-title")&&e&&this.insertBefore(e,t),this.querySelectorAll(":scope > :not(.Widget-title, script, select)").forEach(e=>{e.toggleAttribute("hidden",this.collapsed&&!this.invalid)})}},{kind:"method",key:"render",value:function(){return this.classList.add("widget","Widget"),this.classList.toggle("is-collapsible",this.collapsible),this.classList.toggle("is-collapsed",this.collapsed),this.classList.toggle("is-error",this.invalid),this.querySelectorAll(":scope > :not(.Widget-title, script, select)").forEach(e=>{e.toggleAttribute("hidden",this.collapsed)}),this.collapsible?n.qy`<h2
73
73
  class="Widget-title"
74
74
  @click="${()=>this.collapsed=!this.collapsed}"
75
75
  >