@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 v5.8491d982a282935a3058.js.LICENSE.txt */
1
+ /*! For license information please see v5.060e8a546f81da35c4de.js.LICENSE.txt */
2
2
  (()=>{var __webpack_modules__={77854(e,n,t){var o={"./af":1277,"./af.js":1277,"./ar":56313,"./ar-dz":92160,"./ar-dz.js":92160,"./ar-kw":20080,"./ar-kw.js":20080,"./ar-ly":54031,"./ar-ly.js":54031,"./ar-ma":63056,"./ar-ma.js":63056,"./ar-ps":9213,"./ar-ps.js":9213,"./ar-sa":67490,"./ar-sa.js":67490,"./ar-tn":64484,"./ar-tn.js":64484,"./ar.js":56313,"./az":99745,"./az.js":99745,"./be":47811,"./be.js":47811,"./bg":14357,"./bg.js":14357,"./bm":11259,"./bm.js":11259,"./bn":98436,"./bn-bd":22879,"./bn-bd.js":22879,"./bn.js":98436,"./bo":58925,"./bo.js":58925,"./br":50808,"./br.js":50808,"./bs":80721,"./bs.js":80721,"./ca":29400,"./ca.js":29400,"./cs":17246,"./cs.js":17246,"./cv":67939,"./cv.js":67939,"./cy":80608,"./cy.js":80608,"./da":47697,"./da.js":47697,"./de":17829,"./de-at":30685,"./de-at.js":30685,"./de-ch":23335,"./de-ch.js":23335,"./de.js":17829,"./dv":67042,"./dv.js":67042,"./el":78327,"./el.js":78327,"./en-au":49776,"./en-au.js":49776,"./en-ca":85650,"./en-ca.js":85650,"./en-gb":44217,"./en-gb.js":44217,"./en-ie":17768,"./en-ie.js":17768,"./en-il":69305,"./en-il.js":69305,"./en-in":95031,"./en-in.js":95031,"./en-nz":54898,"./en-nz.js":54898,"./en-sg":42504,"./en-sg.js":42504,"./eo":97728,"./eo.js":97728,"./es":30876,"./es-do":94290,"./es-do.js":94290,"./es-mx":8022,"./es-mx.js":8022,"./es-us":58073,"./es-us.js":58073,"./es.js":30876,"./et":62671,"./et.js":62671,"./eu":48590,"./eu.js":48590,"./fa":53243,"./fa.js":53243,"./fi":17827,"./fi.js":17827,"./fil":33457,"./fil.js":33457,"./fo":17057,"./fo.js":17057,"./fr":25652,"./fr-ca":55873,"./fr-ca.js":55873,"./fr-ch":12544,"./fr-ch.js":12544,"./fr.js":25652,"./fy":60403,"./fy.js":60403,"./ga":72500,"./ga.js":72500,"./gd":57161,"./gd.js":57161,"./gl":60177,"./gl.js":60177,"./gom-deva":76290,"./gom-deva.js":76290,"./gom-latn":75307,"./gom-latn.js":75307,"./gu":55072,"./gu.js":55072,"./he":4009,"./he.js":4009,"./hi":6789,"./hi.js":6789,"./hr":35642,"./hr.js":35642,"./hu":40601,"./hu.js":40601,"./hy-am":85116,"./hy-am.js":85116,"./id":63731,"./id.js":63731,"./is":99144,"./is.js":99144,"./it":48003,"./it-ch":48213,"./it-ch.js":48213,"./it.js":48003,"./ja":32327,"./ja.js":32327,"./jv":2692,"./jv.js":2692,"./ka":65856,"./ka.js":65856,"./kk":2494,"./kk.js":2494,"./km":85644,"./km.js":85644,"./kn":53187,"./kn.js":53187,"./ko":95970,"./ko.js":95970,"./ku":99412,"./ku-kmr":93269,"./ku-kmr.js":93269,"./ku.js":99412,"./ky":14648,"./ky.js":14648,"./lb":91286,"./lb.js":91286,"./lo":35,"./lo.js":35,"./lt":72564,"./lt.js":72564,"./lv":80234,"./lv.js":80234,"./me":20486,"./me.js":20486,"./mi":4210,"./mi.js":4210,"./mk":96604,"./mk.js":96604,"./ml":57039,"./ml.js":57039,"./mn":37713,"./mn.js":37713,"./mr":33869,"./mr.js":33869,"./ms":70628,"./ms-my":71967,"./ms-my.js":71967,"./ms.js":70628,"./mt":72695,"./mt.js":72695,"./my":62946,"./my.js":62946,"./nb":38348,"./nb.js":38348,"./ne":53279,"./ne.js":53279,"./nl":98934,"./nl-be":45848,"./nl-be.js":45848,"./nl.js":98934,"./nn":23008,"./nn.js":23008,"./oc-lnc":18752,"./oc-lnc.js":18752,"./pa-in":43211,"./pa-in.js":43211,"./pl":37904,"./pl.js":37904,"./pt":69224,"./pt-br":68393,"./pt-br.js":68393,"./pt.js":69224,"./ro":18557,"./ro.js":18557,"./ru":60867,"./ru.js":60867,"./sd":48565,"./sd.js":48565,"./se":67564,"./se.js":67564,"./si":52224,"./si.js":52224,"./sk":28150,"./sk.js":28150,"./sl":34413,"./sl.js":34413,"./sq":96664,"./sq.js":96664,"./sr":2831,"./sr-cyrl":15358,"./sr-cyrl.js":15358,"./sr.js":2831,"./ss":41646,"./ss.js":41646,"./sv":93907,"./sv.js":93907,"./sw":9202,"./sw.js":9202,"./ta":64833,"./ta.js":64833,"./te":64725,"./te.js":64725,"./tet":6607,"./tet.js":6607,"./tg":81955,"./tg.js":81955,"./th":21504,"./th.js":21504,"./tk":2103,"./tk.js":2103,"./tl-ph":52597,"./tl-ph.js":52597,"./tlh":1256,"./tlh.js":1256,"./tr":84046,"./tr.js":84046,"./tzl":98229,"./tzl.js":98229,"./tzm":90051,"./tzm-latn":26723,"./tzm-latn.js":26723,"./tzm.js":90051,"./ug-cn":5910,"./ug-cn.js":5910,"./uk":36628,"./uk.js":36628,"./ur":15541,"./ur.js":15541,"./uz":1389,"./uz-latn":63085,"./uz-latn.js":63085,"./uz.js":1389,"./vi":61203,"./vi.js":61203,"./x-pseudo":57591,"./x-pseudo.js":57591,"./yo":67780,"./yo.js":67780,"./zh-cn":72248,"./zh-cn.js":72248,"./zh-hk":18124,"./zh-hk.js":18124,"./zh-mo":91391,"./zh-mo.js":91391,"./zh-tw":75716,"./zh-tw.js":75716};function i(e){var n=r(e);return t(n)}function r(e){if(!t.o(o,e)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return o[e]}i.keys=function(){return Object.keys(o)},i.resolve=r,e.exports=i,i.id=77854},31201(e,n,t){"use strict";var o=t(88630),i=t.n(o),r=t(91762);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 n=e.target;null!==n&&n instanceof HTMLSelectElement&&(this.currentPeriod=n.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 n=await fetch(`${this.analyticsUrl}?id=${this.contentId}&period=${e}`);if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);const t=await n.json();if("error"in t)throw new Error(t.error);this.cache[e]=t,this.displayData(t),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 n=document.createElement("div");n.className=`numbersPeriod numbersPeriod-${e.periodLabel}`,n.addEventListener("highchart-loaded",()=>{n.classList.add("chart-loaded")}),e.chartData&&(n.innerHTML=e.chartData),this.contentElement.appendChild(n)}}(0,r.A)(".AnalyticsWidget",e=>{new s(e)})},60655(e,n,t){"use strict";t(86634),t(57573);var o={},i="function"==typeof Map?new Map:null,r="swap",a="move",s="layoutStart",c="layoutEnd",d="layoutAbort",l="remove",p="hideStart",M="filter",u="sort",b="move",h="send",z="beforeSend",O="receive",f="beforeReceive",m="dragReleaseEnd",g="ontouchstart"in window,A=!!window.PointerEvent,w=!!window.navigator.msPointerEnabled;function v(){this._events={},this._queue=[],this._counter=0,this._clearOnEmit=!1}v.prototype.on=function(e,n){if(!this._events||!e||!n)return this;var t=this._events[e];return t||(t=this._events[e]=[]),t.push(n),this},v.prototype.off=function(e,n){if(!this._events||!e||!n)return this;var t,o=this._events[e];if(!o||!o.length)return this;for(;-1!==(t=o.indexOf(n));)o.splice(t,1);return this},v.prototype.clear=function(e){if(!this._events||!e)return this;var n=this._events[e];return n&&(n.length=0,delete this._events[e]),this},v.prototype.emit=function(e){if(!this._events||!e)return this._clearOnEmit=!1,this;var n=this._events[e];if(!n||!n.length)return this._clearOnEmit=!1,this;var t,o=this._queue,i=o.length,r=arguments.length-1;r>3&&((t=[]).push.apply(t,arguments),t.shift()),o.push.apply(o,n),this._clearOnEmit&&(n.length=0,this._clearOnEmit=!1),++this._counter;for(var a=i,s=o.length;a<s;a++)if(0===r?o[a]():1===r?o[a](arguments[1]):2===r?o[a](arguments[1],arguments[2]):3===r?o[a](arguments[1],arguments[2],arguments[3]):o[a].apply(null,t),!this._events)return this;return--this._counter,this._counter||(o.length=0),this},v.prototype.burst=function(){return this._events?(this._clearOnEmit=!0,this.emit.apply(this,arguments),this):this},v.prototype.countListeners=function(e){if(!this._events)return 0;var n=this._events[e];return n?n.length:0},v.prototype.destroy=function(){return this._events?(this._queue.length=this._counter=0,this._events=null,this):this};var q=A?"pointerout":w?"MSPointerOut":"";function k(e){q&&(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))}k.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(q,this._onOut))},k.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(q,this._onOut),this._resetData(),this._isActive=!1)},k.prototype._resetData=function(){window.clearTimeout(this._timeout),this._timeout=null,this._outEvent=null},k.prototype._onStart=function(e){"mouse"!==e.pointerType&&this._addBehaviour()},k.prototype._onOut=function(e){this._dragger._getTrackedTouch(e)&&(this._resetData(),this._outEvent=e,this._timeout=window.setTimeout(this._onTimeout,100))},k.prototype._onTimeout=function(){var e=this._outEvent;this._resetData(),this._dragger.isActive()&&this._dragger._onCancel(e)},k.prototype.destroy=function(){q&&(this._dragger.off("start",this._onStart),this._removeBehaviour())};var _=["","webkit","moz","ms","o","Webkit","Moz","MS","O"],y={};function W(e,n){var t=y[n]||"";if(t)return t;for(var o=n[0].toUpperCase()+n.slice(1),i=0;i<_.length;){if((t=_[i]?_[i]+o:n)in e)return y[n]=t,t;++i}return""}function x(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,n),window.removeEventListener("testPassive",null,n)}catch(e){}return e}var L=window.navigator.userAgent.toLowerCase(),C=L.indexOf("edge")>-1,R=L.indexOf("trident")>-1,N=L.indexOf("firefox")>-1,B=L.indexOf("android")>-1,S=!!x()&&{passive:!0},T="touchAction",E=W(document.documentElement.style,T);function D(e,n){this._element=e,this._emitter=new v,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,(C||R)&&(A||w)&&(this._edgeHack=new k(this)),this.setCssProps(n),this._touchAction||this.setTouchAction("auto"),e.addEventListener("dragstart",D._preventDefault,!1),e.addEventListener(D._inputEvents.start,this._onStart,S)}D._pointerEvents={start:"pointerdown",move:"pointermove",cancel:"pointercancel",end:"pointerup"},D._msPointerEvents={start:"MSPointerDown",move:"MSPointerMove",cancel:"MSPointerCancel",end:"MSPointerUp"},D._touchEvents={start:"touchstart",move:"touchmove",cancel:"touchcancel",end:"touchend"},D._mouseEvents={start:"mousedown",move:"mousemove",cancel:"",end:"mouseup"},D._inputEvents=g?D._touchEvents:A?D._pointerEvents:w?D._msPointerEvents:D._mouseEvents,D._emitter=new v,D._emitterEvents={start:"start",move:"move",end:"end",cancel:"cancel"},D._activeInstances=[],D._preventDefault=function(e){e.preventDefault&&!1!==e.cancelable&&e.preventDefault()},D._activateInstance=function(e){D._activeInstances.indexOf(e)>-1||(D._activeInstances.push(e),D._emitter.on(D._emitterEvents.move,e._onMove),D._emitter.on(D._emitterEvents.cancel,e._onCancel),D._emitter.on(D._emitterEvents.end,e._onEnd),1===D._activeInstances.length&&D._bindListeners())},D._deactivateInstance=function(e){var n=D._activeInstances.indexOf(e);-1!==n&&(D._activeInstances.splice(n,1),D._emitter.off(D._emitterEvents.move,e._onMove),D._emitter.off(D._emitterEvents.cancel,e._onCancel),D._emitter.off(D._emitterEvents.end,e._onEnd),D._activeInstances.length||D._unbindListeners())},D._bindListeners=function(){window.addEventListener(D._inputEvents.move,D._onMove,S),window.addEventListener(D._inputEvents.end,D._onEnd,S),D._inputEvents.cancel&&window.addEventListener(D._inputEvents.cancel,D._onCancel,S)},D._unbindListeners=function(){window.removeEventListener(D._inputEvents.move,D._onMove,S),window.removeEventListener(D._inputEvents.end,D._onEnd,S),D._inputEvents.cancel&&window.removeEventListener(D._inputEvents.cancel,D._onCancel,S)},D._getEventPointerId=function(e){return"number"==typeof e.pointerId?e.pointerId:e.changedTouches?e.changedTouches[0]?e.changedTouches[0].identifier:null:1},D._getTouchById=function(e,n){if("number"==typeof e.pointerId)return e.pointerId===n?e:null;if(e.changedTouches){for(var t=0;t<e.changedTouches.length;t++)if(e.changedTouches[t].identifier===n)return e.changedTouches[t];return null}return e},D._onMove=function(e){D._emitter.emit(D._emitterEvents.move,e)},D._onCancel=function(e){D._emitter.emit(D._emitterEvents.cancel,e)},D._onEnd=function(e){D._emitter.emit(D._emitterEvents.end,e)},D.prototype._reset=function(){this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._isActive=!1,D._deactivateInstance(this)},D.prototype._createEvent=function(e,n){var t=this._getTrackedTouch(n);return{type:e,srcEvent:n,distance:this.getDistance(),deltaX:this.getDeltaX(),deltaY:this.getDeltaY(),deltaTime:e===D._emitterEvents.start?0:this.getDeltaTime(),isFirst:e===D._emitterEvents.start,isFinal:e===D._emitterEvents.end||e===D._emitterEvents.cancel,pointerType:n.pointerType||(n.touches?"touch":"mouse"),identifier:this._pointerId,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,target:t.target}},D.prototype._emit=function(e,n){this._emitter.emit(e,this._createEvent(e,n))},D.prototype._getTrackedTouch=function(e){return null===this._pointerId?null:D._getTouchById(e,this._pointerId)},D.prototype._onStart=function(e){if(!this._isDestroyed&&null===this._pointerId&&(this._pointerId=D._getEventPointerId(e),null!==this._pointerId)){var n=this._getTrackedTouch(e);this._startX=this._currentX=n.clientX,this._startY=this._currentY=n.clientY,this._startTime=Date.now(),this._isActive=!0,this._emit(D._emitterEvents.start,e),this._isActive&&D._activateInstance(this)}},D.prototype._onMove=function(e){var n=this._getTrackedTouch(e);n&&(this._currentX=n.clientX,this._currentY=n.clientY,this._emit(D._emitterEvents.move,e))},D.prototype._onCancel=function(e){this._getTrackedTouch(e)&&(this._emit(D._emitterEvents.cancel,e),this._reset())},D.prototype._onEnd=function(e){this._getTrackedTouch(e)&&(this._emit(D._emitterEvents.end,e),this._reset())},D.prototype.isActive=function(){return this._isActive},D.prototype.setTouchAction=function(e){this._touchAction=e,E&&(this._cssProps[E]="",this._element.style[E]=e),g&&(this._element.removeEventListener(D._touchEvents.start,D._preventDefault,!0),(this._element.style[E]!==e||N&&B)&&this._element.addEventListener(D._touchEvents.start,D._preventDefault,!0))},D.prototype.setCssProps=function(e){if(e){var n,t,o=this._cssProps,i=this._element;for(n in o)i.style[n]=o[n],delete o[n];for(n in e)e[n]&&(n!==T?(t=W(i.style,n))&&(o[t]="",i.style[t]=e[n]):this.setTouchAction(e[n]))}},D.prototype.getDeltaX=function(){return this._currentX-this._startX},D.prototype.getDeltaY=function(){return this._currentY-this._startY},D.prototype.getDistance=function(){var e=this.getDeltaX(),n=this.getDeltaY();return Math.sqrt(e*e+n*n)},D.prototype.getDeltaTime=function(){return this._startTime?Date.now()-this._startTime:0},D.prototype.on=function(e,n){this._emitter.on(e,n)},D.prototype.off=function(e,n){this._emitter.off(e,n)},D.prototype.destroy=function(){if(!this._isDestroyed){var e=this._element;for(var n in this._edgeHack&&this._edgeHack.destroy(),this._reset(),this._emitter.destroy(),e.removeEventListener(D._inputEvents.start,this._onStart,S),e.removeEventListener("dragstart",D._preventDefault,!1),e.removeEventListener(D._touchEvents.start,D._preventDefault,!0),this._cssProps)e.style[n]=this._cssProps[n],delete this._cssProps[n];this._element=null,this._isDestroyed=!0}};var j=1e3/60,P=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return this.setTimeout(function(){e(Date.now())},j)}).bind(window);function X(e){this._nextStep=null,this._lanes=[],this._stepQueue=[],this._stepCallbacks={},this._step=this._step.bind(this);for(var n=0;n<e;n++)this._lanes.push(new H)}function H(){this.queue=[],this.indices={},this.callbacks={}}X.prototype._step=function(e){var n,t,o,i,r,a,s=this._lanes,c=this._stepQueue,d=this._stepCallbacks;for(this._nextStep=null,n=0;n<s.length;n++){for(i=s[n].queue,r=s[n].callbacks,a=s[n].indices,t=0;t<i.length;t++)(o=i[t])&&(c.push(o),d[o]=r[o],delete r[o],delete a[o]);i.length=0}for(n=0;n<c.length;n++)d[o=c[n]]&&d[o](e),delete d[o];c.length=0},X.prototype.add=function(e,n,t){this._lanes[e].add(n,t),this._nextStep||(this._nextStep=P(this._step))},X.prototype.remove=function(e,n){this._lanes[e].remove(n)},H.prototype.add=function(e,n){var t=this.indices[e];void 0!==t&&(this.queue[t]=void 0),this.queue.push(e),this.callbacks[e]=n,this.indices[e]=this.queue.length-1},H.prototype.remove=function(e){var n=this.indices[e];void 0!==n&&(this.queue[n]=void 0,delete this.callbacks[e],delete this.indices[e])};var Y="layoutRead",I="layoutWrite",F="visibilityRead",V="visibilityWrite",G="dragStartRead",U="dragStartWrite",$="dragMoveRead",J="dragMoveWrite",K="dragScrollRead",Z="dragScrollWrite",Q="dragSortRead",ee="placeholderLayoutRead",ne="placeholderLayoutWrite",te="placeholderResizeWrite",oe="autoScrollRead",ie="autoScrollWrite",re="debounceRead",ae=new X(3);function se(e){ae.remove(0,Y+e),ae.remove(2,I+e)}function ce(e){ae.remove(0,F+e),ae.remove(2,V+e)}function de(e){ae.remove(0,G+e),ae.remove(2,U+e)}function le(e){ae.remove(0,$+e),ae.remove(2,J+e)}function pe(e){ae.remove(0,K+e),ae.remove(2,Z+e)}function Me(e,n){ae.add(1,Q+e,n)}function ue(e){ae.remove(0,ee+e),ae.remove(2,ne+e)}function be(e,n){ae.add(0,oe,e),ae.add(2,ie,n)}function he(e){return"function"==typeof e}var ze="function"==typeof WeakMap?new WeakMap:null;function Oe(e,n){var t=ze&&ze.get(e);return t||(t=window.getComputedStyle(e,null),ze&&ze.set(e,t)),t.getPropertyValue(n)}function fe(e,n){return parseFloat(Oe(e,n))||0}var me,ge=document.documentElement,Ae=document.body,we={value:0,offset:0};function ve(e){return e===window||e===ge||e===Ae?window:e}function qe(e){return e===window?e.pageXOffset:e.scrollLeft}function ke(e){return e===window?e.pageYOffset:e.scrollTop}function _e(e){return e===window?ge.scrollWidth-ge.clientWidth:e.scrollWidth-e.clientWidth}function ye(e){return e===window?ge.scrollHeight-ge.clientHeight:e.scrollHeight-e.clientHeight}function We(e,n){if(n=n||{},e===window)n.width=ge.clientWidth,n.height=ge.clientHeight,n.left=0,n.right=n.width,n.top=0,n.bottom=n.height;else{var t=e.getBoundingClientRect(),o=e.clientLeft||fe(e,"border-left-width"),i=e.clientTop||fe(e,"border-top-width");n.width=e.clientWidth,n.height=e.clientHeight,n.left=t.left+o,n.right=n.left+n.width,n.top=t.top+i,n.bottom=n.top+n.height}return n}function xe(e){return e._drag._getGrid()._settings.dragAutoScroll}function Le(e){e._drag&&e._drag._prepareScroll()}function Ce(e){if(e._drag&&e._isActive){var n=e._drag;n._scrollDiffX=n._scrollDiffY=0,e._setTranslate(n._left,n._top)}}function Re(e,n,t,o){return we.value=Math.min(o/2,e),we.offset=Math.max(0,t+2*we.value+o*n-o)/2,we}function Ne(){this.reset()}function Be(){this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0}function Se(e,n){this.pool=[],this.createItem=e,this.releaseItem=n}function Te(e,n){var t=function(e,n){return function(e,n){return!(e.left+e.width<=n.left||n.left+n.width<=e.left||e.top+e.height<=n.top||n.top+n.height<=e.top)}(e,n)?(Math.min(e.left+e.width,n.left+n.width)-Math.max(e.left,n.left))*(Math.min(e.top+e.height,n.top+n.height)-Math.max(e.top,n.top)):0}(e,n);return t?t/(Math.min(e.width,n.width)*Math.min(e.height,n.height))*100:0}Ne.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},Ne.prototype.hasReachedEnd=function(){return 4&this.direction?this.value>=this.maxValue:this.value<=0},Ne.prototype.computeCurrentScrollValue=function(){return null===this.value?1&this.direction?qe(this.element):ke(this.element):Math.max(0,Math.min(this.value,this.maxValue))},Ne.prototype.computeNextScrollValue=function(e){var n=this.speed*(e/1e3),t=4&this.direction?this.value+n:this.value-n;return Math.max(0,Math.min(t,this.maxValue))},Ne.prototype.computeSpeed=(me={direction:null,threshold:0,distance:0,value:0,maxValue:0,deltaTime:0,duration:0,isEnding:!1},function(e){var n=this.item,t=xe(n).speed;return he(t)?(me.direction=this.direction,me.threshold=this.threshold,me.distance=this.distance,me.value=this.value,me.maxValue=this.maxValue,me.duration=this.duration,me.speed=this.speed,me.deltaTime=e,me.isEnding=this.isEnding,t(n,this.element,me)):t}),Ne.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},Ne.prototype.onStart=function(){var e=this.item,n=xe(e).onStart;he(n)&&n(e,this.element,this.direction)},Ne.prototype.onStop=function(){var e=this.item,n=xe(e).onStop;he(n)&&n(e,this.element,this.direction),e._drag&&e._drag.sort()},Be.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},Be.prototype.addRequest=function(e){1&e.direction?(this.removeRequest(this.requestX),this.requestX=e):(this.removeRequest(this.requestY),this.requestY=e),e.action=this},Be.prototype.removeRequest=function(e){e&&(this.requestX===e?(this.requestX=null,e.action=null):this.requestY===e&&(this.requestY=null,e.action=null))},Be.prototype.computeScrollValues=function(){this.scrollLeft=this.requestX?this.requestX.value:qe(this.element),this.scrollTop=this.requestY?this.requestY.value:ke(this.element)},Be.prototype.scroll=function(){var e=this.element;e&&(e.scrollTo?e.scrollTo(this.scrollLeft,this.scrollTop):(e.scrollLeft=this.scrollLeft,e.scrollTop=this.scrollTop))},Se.prototype.pick=function(){return this.pool.pop()||this.createItem()},Se.prototype.release=function(e){this.releaseItem(e),-1===this.pool.indexOf(e)&&this.pool.push(e)},Se.prototype.reset=function(){this.pool.length=0};var Ee={width:0,height:0,left:0,right:0,top:0,bottom:0},De={width:0,height:0,left:0,right:0,top:0,bottom:0};function je(){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 Se(function(){return new Ne},function(e){e.reset()}),this._actionPool=new Se(function(){return new Be},function(e){e.reset()}),this._readTick=this._readTick.bind(this),this._writeTick=this._writeTick.bind(this)}je.AXIS_X=1,je.AXIS_Y=2,je.FORWARD=4,je.BACKWARD=8,je.LEFT=9,je.RIGHT=5,je.UP=10,je.DOWN=6,je.smoothSpeed=function(e,n,t){return function(o,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,d=a;return c===a?d:c<a?(d=c+n*(r.deltaTime/1e3),Math.min(a,d)):(d=c-t*(r.deltaTime/1e3),Math.max(a,d))}},je.pointerHandle=function(e){var n={left:0,top:0,width:0,height:0},t=e||1;return function(e,o,i,r,a,s,c){return n.left=s-.5*t,n.top=c-.5*t,n.width=t,n.height=t,n}},je.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))},je.prototype._writeTick=function(){this._isDestroyed||(this._applyActions(),be(this._readTick,this._writeTick))},je.prototype._startTicking=function(){this._isTicking=!0,be(this._readTick,this._writeTick)},je.prototype._stopTicking=function(){this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,ae.remove(0,oe),ae.remove(2,ie)},je.prototype._getItemHandleRect=function(e,n,t){var o=e._drag;if(n){var i=o._dragMoveEvent||o._dragStartEvent,r=n(e,o._clientX,o._clientY,e._width,e._height,i.clientX,i.clientY);t.left=r.left,t.top=r.top,t.width=r.width,t.height=r.height}else t.left=o._clientX,t.top=o._clientY,t.width=e._width,t.height=e._height;return t.right=t.left+t.width,t.bottom=t.top+t.height,t},je.prototype._requestItemScroll=function(e,n,t,o,i,r,a){var s=this._requests[n],c=s[e._id];c?c.element===t&&c.direction===o||c.reset():c=this._requestPool.pick(),c.item=e,c.element=t,c.direction=o,c.threshold=i,c.distance=r,c.maxValue=a,s[e._id]=c},je.prototype._cancelItemScroll=function(e,n){var t=this._requests[n],o=t[e._id];o&&(o.action&&o.action.removeRequest(o),this._requestPool.release(o),delete t[e._id])},je.prototype._checkItemOverlap=function(e,n,t){var o=xe(e),i=he(o.targets)?o.targets(e):o.targets,r=o.threshold,a=o.safeZone;if(!i||!i.length)return n&&this._cancelItemScroll(e,1),void(t&&this._cancelItemScroll(e,2));var s=this._dragDirections[e._id],c=s[0],d=s[1];if(!c&&!d)return n&&this._cancelItemScroll(e,1),void(t&&this._cancelItemScroll(e,2));for(var l=this._getItemHandleRect(e,o.handle,Ee),p=De,M=null,u=null,b=!0,h=!0,z=0,O=0,f=null,m=null,g=0,A=0,w=0,v=null,q=-1/0,k=0,_=0,y=null,W=0,x=0,L=null,C=-1/0,R=0,N=0,B=null,S=0,T=0,E=0;E<i.length;E++)M=i[E],b=n&&c&&2!==M.axis,h=t&&d&&1!==M.axis,O=M.priority||0,(!b||O<q)&&(!h||O<C)||(u=ve(M.element||M),A=b?_e(u):-1,w=h?ye(u):-1,(A||w)&&((z=Te(l,p=We(u,p)))<=0||(b&&O>=q&&A>0&&(O>q||z>_)&&(m=null,f=Re("number"==typeof M.threshold?M.threshold:r,a,l.width,p.width),5===c?(g=p.right+f.offset-l.right)<=f.value&&qe(u)<A&&(m=5):9===c&&(g=l.left-(p.left-f.offset))<=f.value&&qe(u)>0&&(m=9),null!==m&&(v=u,q=O,k=f.value,_=z,y=m,W=g,x=A)),h&&O>=C&&w>0&&(O>C||z>N)&&(m=null,f=Re("number"==typeof M.threshold?M.threshold:r,a,l.height,p.height),6===d?(g=p.bottom+f.offset-l.bottom)<=f.value&&ke(u)<w&&(m=6):10===d&&(g=l.top-(p.top-f.offset))<=f.value&&ke(u)>0&&(m=10),null!==m&&(L=u,C=O,R=f.value,N=z,B=m,S=g,T=w)))));n&&(v?this._requestItemScroll(e,1,v,y,k,W,x):this._cancelItemScroll(e,1)),t&&(L?this._requestItemScroll(e,2,L,B,R,S,T):this._cancelItemScroll(e,2))},je.prototype._updateScrollRequest=function(e){for(var n=e.item,t=xe(n),o=he(t.targets)?t.targets(n):t.targets,i=o&&o.length||0,r=t.threshold,a=t.safeZone,s=this._getItemHandleRect(n,t.handle,Ee),c=De,d=null,l=null,p=!1,M=null,u=null,b=null,h=null,z=null,O=0;O<i;O++)if((l=ve((d=o[O]).element||d))===e.element){if(p=!!(1&e.direction)){if(2===d.axis)continue}else if(1===d.axis)continue;if((h=p?_e(l):ye(l))<=0)break;if(Te(s,c=We(l,c))<=0)break;if(M=Re("number"==typeof d.threshold?d.threshold:r,a,p?s.width:s.height,p?c.width:c.height),(u=9===e.direction?s.left-(c.left-M.offset):5===e.direction?c.right+M.offset-s.right:10===e.direction?s.top-(c.top-M.offset):c.bottom+M.offset-s.bottom)>M.value)break;if(b=p?qe(l):ke(l),z=4&e.direction?b>=h:b<=0)break;return e.maxValue=h,e.threshold=M.value,e.distance=u,e.isEnding=!1,!0}return!0===t.smoothStop&&e.speed>0?(null===z&&(z=e.hasReachedEnd()),e.isEnding=!z):e.isEnding=!1,e.isEnding},je.prototype._updateRequests=function(){for(var e,n,t,o,i,r,a,s=this._items,c=this._requests[1],d=this._requests[2],l=0;l<s.length;l++)e=s[l],i=(o=this._requestOverlapCheck[e._id])>0&&this._tickTime-o>this._overlapCheckInterval,r=!0,(n=c[e._id])&&n.isActive&&(r=!this._updateScrollRequest(n))&&(i=!0,this._cancelItemScroll(e,1)),a=!0,(t=d[e._id])&&t.isActive&&(a=!this._updateScrollRequest(t))&&(i=!0,this._cancelItemScroll(e,2)),i&&(this._requestOverlapCheck[e._id]=0,this._checkItemOverlap(e,r,a))},je.prototype._requestAction=function(e,n){for(var t=this._actions,o=1===n,i=null,r=0;r<t.length;r++){if(i=t[r],e.element===i.element){if(o?i.requestX:i.requestY)return void this._cancelItemScroll(e.item,n);break}i=null}i||(i=this._actionPool.pick()),i.element=e.element,i.addRequest(e),e.tick(this._tickDeltaTime),t.push(i)},je.prototype._updateActions=function(){var e,n,t,o,i=this._items,r=this._requests,a=this._actions;for(o=0;o<i.length;o++)e=i[o]._id,n=r[1][e],t=r[2][e],n&&this._requestAction(n,1),t&&this._requestAction(t,2);for(o=0;o<a.length;o++)a[o].computeScrollValues()},je.prototype._applyActions=function(){var e,n=this._actions,t=this._items;if(n.length){for(e=0;e<n.length;e++)n[e].scroll(),this._actionPool.release(n[e]);for(n.length=0,e=0;e<t.length;e++)Le(t[e]);for(e=0;e<t.length;e++)Ce(t[e])}},je.prototype._updateDragDirection=function(e){var n=this._dragPositions[e._id],t=this._dragDirections[e._id],o=e._drag._left,i=e._drag._top;if(n.length){var r=n[0],a=n[1];t[0]=o>r?5:o<r?9:t[0]||0,t[1]=i>a?6:i<a?10:t[1]||0}n[0]=o,n[1]=i},je.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())},je.prototype.updateItem=function(e){this._isDestroyed||this._dragDirections[e._id]&&(this._updateDragDirection(e),this._requestOverlapCheck[e._id]||(this._requestOverlapCheck[e._id]=this._tickTime))},je.prototype.removeItem=function(e){if(!this._isDestroyed){var n=this._items.indexOf(e);if(-1!==n){var t=e._id;this._requests[1][t]&&(this._cancelItemScroll(e,1),delete this._requests[1][t]),this._requests[2][t]&&(this._cancelItemScroll(e,2),delete this._requests[2][t]),delete this._requestOverlapCheck[t],delete this._dragPositions[t],delete this._dragDirections[t],this._items.splice(n,1),this._isTicking&&!this._items.length&&this._stopTicking()}}},je.prototype.isItemScrollingX=function(e){var n=this._requests[1][e._id];return!(!n||!n.isActive)},je.prototype.isItemScrollingY=function(e){var n=this._requests[2][e._id];return!(!n||!n.isActive)},je.prototype.isItemScrolling=function(e){return this.isItemScrollingX(e)||this.isItemScrollingY(e)},je.prototype.destroy=function(){if(!this._isDestroyed){for(var e=this._items.slice(0),n=0;n<e.length;n++)this.removeItem(e[n]);this._actions.length=0,this._requestPool.reset(),this._actionPool.reset(),this._isDestroyed=!0}};var Pe=window.Element.prototype,Xe=Pe.matches||Pe.matchesSelector||Pe.webkitMatchesSelector||Pe.mozMatchesSelector||Pe.msMatchesSelector||Pe.oMatchesSelector||function(){return!1};function He(e,n){return Xe.call(e,n)}function Ye(e,n){n&&(e.classList?e.classList.add(n):He(e,"."+n)||(e.className+=" "+n))}var Ie=[];function Fe(e,n,t){var o="number"==typeof t?t:-1;o<0&&(o=e.length-o+1),e.splice.apply(e,Ie.concat(o,0,n)),Ie.length=0}function Ve(e,n,t){var o=Math.max(0,e.length-1+(t||0));return n>o?o:n<0?Math.max(o+n+1,0):n}function Ge(e,n,t){if(!(e.length<2)){var o=Ve(e,n),i=Ve(e,t);o!==i&&e.splice(i,0,e.splice(o,1)[0])}}function Ue(e,n,t){if(!(e.length<2)){var o,i=Ve(e,n),r=Ve(e,t);i!==r&&(o=e[i],e[i]=e[r],e[r]=o)}}var $e=W(document.documentElement.style,"transform")||"transform",Je=/([A-Z])/g,Ke=/^(webkit-|moz-|ms-|o-)/,Ze=/^(-m-s-)/;function Qe(e){var n=e.replace(Je,"-$1").toLowerCase();return(n=n.replace(Ke,"-$1")).replace(Ze,"-ms-")}var en=Qe($e);function nn(e){var n=Oe(e,en);if(!n||"none"===n)return!1;var t=Oe(e,"display");return"inline"!==t&&"none"!==t}function tn(e){for(var n=document,t=e||n;t&&t!==n&&"static"===Oe(t,"position")&&!nn(t);)t=t.parentElement||n;return t}var on={},rn={},an={};function sn(e,n){var t,o=n||{};return o.left=0,o.top=0,e===document||(o.left=window.pageXOffset||0,o.top=window.pageYOffset||0,e.self===window.self||(t=e.getBoundingClientRect(),o.left+=t.left,o.top+=t.top,o.left+=fe(e,"border-left-width"),o.top+=fe(e,"border-top-width"))),o}function cn(e,n,t){return an.left=0,an.top=0,e===n||t&&(e=tn(e))===(n=tn(n))||(sn(e,on),sn(n,rn),an.left=rn.left-on.left,an.top=rn.top-on.top),an}function dn(e){return"auto"===e||"scroll"===e||"overlay"===e}function ln(e){return dn(Oe(e,"overflow"))||dn(Oe(e,"overflow-x"))||dn(Oe(e,"overflow-y"))}function pn(e,n){for(n=n||[];e&&e!==document;)e.getRootNode&&e instanceof DocumentFragment?e=e.getRootNode().host:(ln(e)&&n.push(e),e=e.parentNode);return n.push(window),n}var Mn={},un=/^matrix3d/,bn=/([^,]*,){4}/,hn=/([^,]*,){12}/,zn=/[^,]*,/;function On(e){Mn.x=0,Mn.y=0;var n=Oe(e,en);if(!n||"none"===n)return Mn;var t=un.test(n),o=n.replace(t?hn:bn,""),i=o.replace(zn,"");return Mn.x=parseFloat(o)||0,Mn.y=parseFloat(i)||0,Mn}function fn(e,n){n&&(e.classList?e.classList.remove(n):He(e,"."+n)&&(e.className=(" "+e.className+" ").replace(" "+n+" "," ").trim()))}var mn,gn,An,wn,vn=/^(iPad|iPhone|iPod)/.test(window.navigator.platform)||/^Mac/.test(window.navigator.platform)&&window.navigator.maxTouchPoints>1,qn=!!x()&&{passive:!0};function kn(e){var n=e._element,t=e.getGrid(),o=t._settings;this._item=e,this._gridId=t._id,this._isDestroyed=!1,this._isMigrating=!1,this._startPredicate=he(o.dragStartPredicate)?o.dragStartPredicate:kn.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=o.dragHandle&&n.querySelector(o.dragHandle)||n,this._dragger=new D(this._handle,o.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 _n(e,n){var t,o,i={};if(Array.isArray(n))for(o=0;o<n.length;o++)i[t=n[o]]=Oe(e,Qe(t));else for(t in n)i[t]=Oe(e,Qe(t));return i}kn.autoScroller=new je,kn.defaultStartPredicate=function(e,n,t){var o=e._drag;if(n.isFirst&&n.srcEvent.button)return!1;if(!vn&&n.isFirst&&!0===n.srcEvent.isTrusted&&!1===n.srcEvent.defaultPrevented&&!1===n.srcEvent.cancelable)return!1;if(!n.isFinal){var i=o._startPredicateData;if(!i){var r=t||o._getGrid()._settings.dragStartPredicate||{};o._startPredicateData=i={distance:Math.max(r.distance,0)||0,delay:Math.max(r.delay,0)||0}}return i.delay&&(i.event=n,i.delayTimer||(i.delayTimer=window.setTimeout(function(){i.delay=0,o._resolveStartPredicate(i.event)&&(o._forceResolveStartPredicate(i.event),o._resetStartPredicate())},i.delay))),o._resolveStartPredicate(n)}o._finishStartPredicate(n)},kn.defaultSortPredicate=(mn={},gn={},An={},wn=[],function(e,n){var t=e._drag,o=t._getGrid(),i=n&&"number"==typeof n.threshold?n.threshold:50,s=n&&n.action===r?r:a,c=n&&n.migrateAction===r?r:a;i=Math.min(Math.max(i,1),100),mn.width=e._width,mn.height=e._height,mn.left=t._clientX,mn.top=t._clientY;var d=function(e,n,t){var o,i,r,a,s,c,d,l,p,M,u=null,b=n._settings.dragSort,h=-1;if(!0===b?(wn[0]=n,i=wn):he(b)&&(i=b.call(n,e)),!i||!Array.isArray(i)||!i.length)return u;for(M=0;M<i.length;M++)if(!(r=i[M])._isDestroyed){for(r._updateBoundingRect(),c=Math.max(0,r._left),d=Math.max(0,r._top),l=Math.min(window.innerWidth,r._right),p=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"!==Oe(a,"overflow")&&(s=a.getBoundingClientRect(),c=Math.max(c,s.left),d=Math.max(d,s.top),l=Math.min(l,s.right),p=Math.min(p,s.bottom)),"fixed"===Oe(a,"position"))break;a=a.parentNode}c>=l||d>=p||(gn.left=c,gn.top=d,gn.width=l-c,gn.height=p-d,(o=Te(mn,gn))>t&&o>h&&(h=o,u=r))}return wn.length=0,u}(e,o,i);if(!d)return null;var l,p,M,u=e.getGrid()!==d,b=0,h=0,z=0,O=-1,f=!1;for(d===o?(mn.left=t._gridX+e._marginLeft,mn.top=t._gridY+e._marginTop):(d._updateBorders(1,0,1,0),b=d._left+d._borderLeft,h=d._top+d._borderTop),M=0;M<d._items.length;M++)(l=d._items[M])._isActive&&l!==e&&(f=!0,gn.width=l._width,gn.height=l._height,gn.left=l._left+l._marginLeft+b,gn.top=l._top+l._marginTop+h,(p=Te(mn,gn))>z&&(O=M,z=p));return u&&z<i&&(O=f?O:0,z=i),z>=i?(An.grid=d,An.index=O,An.action=u?c:s,An):null}),kn.prototype.stop=function(){if(this._isActive)if(this._isMigrating)this._finishMigration();else{var e=this._item,n=e._id;if(kn.autoScroller.removeItem(e),de(n),le(n),pe(n),this._cancelSort(),this._isStarted){this._unbindScrollListeners();var t=e._element,o=this._getGrid(),i=o._settings.itemDraggingClass;t.parentNode!==o._element&&(o._element.appendChild(t),e._setTranslate(this._gridX,this._gridY),i&&t.clientWidth),fn(t,i)}this._reset()}},kn.prototype.sort=function(e){var n=this._item;this._isActive&&n._isActive&&this._dragMoveEvent&&(!0===e?this._handleSort():Me(n._id,this._handleSort))},kn.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._dragger.destroy(),kn.autoScroller.removeItem(this._item),this._isDestroyed=!0)},kn.prototype._getGrid=function(){return o[this._gridId]||null},kn.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},kn.prototype._bindScrollListeners=function(){var e,n,t=this._getGrid()._element,o=this._container,i=this._scrollers;if(i.length=0,pn(this._item._element.parentNode,i),o!==t)for(pn(t,e=[]),n=0;n<e.length;n++)i.indexOf(e[n])<0&&i.push(e[n]);for(n=0;n<i.length;n++)i[n].addEventListener("scroll",this._onScroll,qn)},kn.prototype._unbindScrollListeners=function(){var e,n=this._scrollers;for(e=0;e<n.length;e++)n[e].removeEventListener("scroll",this._onScroll,qn);n.length=0},kn.prototype._resolveStartPredicate=function(e){var n=this._startPredicateData;if(!(e.distance<n.distance||n.delay))return this._resetStartPredicate(),!0},kn.prototype._forceResolveStartPredicate=function(e){this._isDestroyed||1!==this._startPredicateState||(this._startPredicateState=2,this._onStart(e))},kn.prototype._finishStartPredicate=function(e){var n=this._item._element,t=Math.abs(e.deltaX)<2&&Math.abs(e.deltaY)<2&&e.deltaTime<200;this._resetStartPredicate(),t&&function(e){if("a"===e.tagName.toLowerCase()){var n=e.getAttribute("href");if(n){var t=e.getAttribute("target");t&&"_self"!==t?window.open(n,t):window.location.href=n}}}(n)},kn.prototype._resetHeuristics=function(e,n){this._blockedSortIndex=null,this._sortX1=this._sortX2=e,this._sortY1=this._sortY2=n},kn.prototype._checkHeuristics=function(e,n){var t=this._getGrid()._settings.dragSortHeuristics,o=t.minDragDistance;if(o<=0)return this._blockedSortIndex=null,!0;var i=e-this._sortX2,r=n-this._sortY2,a=o>3&&t.minBounceBackAngle>0;if(a||(this._blockedSortIndex=null),Math.abs(i)>o||Math.abs(r)>o){if(a){var s=Math.atan2(i,r),c=Math.atan2(this._sortX2-this._sortX1,this._sortY2-this._sortY1),d=Math.atan2(Math.sin(s-c),Math.cos(s-c));Math.abs(d)>t.minBounceBackAngle&&(this._blockedSortIndex=null)}return this._sortX1=this._sortX2,this._sortY1=this._sortY2,this._sortX2=e,this._sortY2=n,!0}return!1},kn.prototype._resetStartPredicate=function(){var e=this._startPredicateData;e&&(e.delayTimer&&(e.delayTimer=window.clearTimeout(e.delayTimer)),this._startPredicateData=null)},kn.prototype._handleSort=function(){if(this._isActive){var e=this._getGrid()._settings;if(!e.dragSort||!e.dragAutoScroll.sortDuringScroll&&kn.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 n=this._checkHeuristics(this._gridX,this._gridY);if(this._isSortNeeded||n){var t=e.dragSortHeuristics.sortInterval;t<=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,t))}}},kn.prototype._handleSortDelayed=function(){this._isSortNeeded=!0,this._sortTimer=void 0,Me(this._item._id,this._handleSort)},kn.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,Q+e)},kn.prototype._finishSort=function(){var e=this._getGrid()._settings.dragSort&&(this._isSortNeeded||void 0!==this._sortTimer);this._cancelSort(),e&&this._checkOverlap()},kn.prototype._checkOverlap=function(){if(this._isActive){var e,n,t,o,i,s,c,d,l=this._item,p=this._getGrid()._settings;(e=he(p.dragSortPredicate)?p.dragSortPredicate(l,this._dragMoveEvent):kn.defaultSortPredicate(l,p.dragSortPredicate))&&"number"==typeof e.index&&(c=e.action===r?r:a,d=(n=l.getGrid())!==(o=e.grid||n),t=n._items.indexOf(l),i=Ve(o._items,e.index,d&&c===a?1:0),(d||i!==this._blockedSortIndex)&&(d?(this._blockedSortIndex=null,s=o._items[i],n._hasListeners(z)&&n._emit(z,{item:l,fromGrid:n,fromIndex:t,toGrid:o,toIndex:i}),o._hasListeners(f)&&o._emit(f,{item:l,fromGrid:n,fromIndex:t,toGrid:o,toIndex:i}),l._gridId=o._id,this._isMigrating=l._gridId!==this._gridId,n._items.splice(t,1),Fe(o._items,l,i),l._sortData=null,n._hasListeners(h)&&n._emit(h,{item:l,fromGrid:n,fromIndex:t,toGrid:o,toIndex:i}),o._hasListeners(O)&&o._emit(O,{item:l,fromGrid:n,fromIndex:t,toGrid:o,toIndex:i}),c===r&&s&&s.isActive()&&o._items.indexOf(s)>-1&&o.send(s,n,t,{appendTo:this._container||document.body,layoutSender:!1,layoutReceiver:!1}),n.layout(),o.layout()):t!==i&&(this._blockedSortIndex=t,(c===r?Ue:Ge)(n._items,t,i),n._hasListeners(b)&&n._emit(b,{item:l,fromIndex:t,toIndex:i,action:c}),n.layout())))}},kn.prototype._finishMigration=function(){var e,n,t=this._item,o=t._dragRelease,i=t._element,r=t._isActive,a=t.getGrid(),s=a._element,c=a._settings,d=c.dragContainer||s,l=this._getGrid()._settings,p=i.parentNode,M=r?l.itemVisibleClass:l.itemHiddenClass,u=r?c.itemVisibleClass:c.itemHiddenClass;this._isMigrating=!1,this.destroy(),l.itemClass!==c.itemClass&&(fn(i,l.itemClass),Ye(i,c.itemClass)),M!==u&&(fn(i,M),Ye(i,u)),d!==p&&(d.appendChild(i),n=cn(p,d,!0),(e=On(i)).x-=n.left,e.y-=n.top),t._refreshDimensions(),n=cn(d,s,!0),o._containerDiffX=n.left,o._containerDiffY=n.top,t._drag=c.dragEnabled?new kn(t):null,d!==p&&t._setTranslate(e.x,e.y),t._visibility.setStyles(r?c.visibleStyles:c.hiddenStyles),o.start()},kn.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)},kn.prototype._preEndCheck=function(e){var n=2===this._startPredicateState;this._startPredicate(this._item,e),this._startPredicateState=0,n&&this._isActive&&(this._isStarted?this._onEnd(e):this.stop())},kn.prototype._onStart=function(e){var n,t,o,i=this._item;i._isActive&&(this._isActive=!0,this._dragStartEvent=e,kn.autoScroller.addItem(i),n=i._id,t=this._prepareStart,o=this._applyStart,ae.add(0,G+n,t),ae.add(2,U+n,o))},kn.prototype._prepareStart=function(){if(this._isActive){var e=this._item;if(e._isActive){var n=e._element,t=this._getGrid(),o=t._settings,i=t._element,r=o.dragContainer||i,a=tn(r),s=On(n),c=n.getBoundingClientRect(),d=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),d){var l=cn(a,i);this._containerDiffX=l.left,this._containerDiffY=l.top}}}},kn.prototype._applyStart=function(){if(this._isActive){var e=this._item;if(e._isActive){var n=this._getGrid(),t=e._element,o=e._dragRelease,i=e._migrate,r=this._container!==n._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()&&o._reset(),n._settings.dragPlaceholder.enabled&&e._dragPlaceholder.create(),this._isStarted=!0,n._emit("dragInit",e,this._dragStartEvent),r&&(t.parentNode===this._container?(this._gridX-=this._containerDiffX,this._gridY-=this._containerDiffY):(this._left+=this._containerDiffX,this._top+=this._containerDiffY,this._container.appendChild(t),e._setTranslate(this._left,this._top))),Ye(t,n._settings.itemDraggingClass),this._bindScrollListeners(),n._emit("dragStart",e,this._dragStartEvent)}}},kn.prototype._onMove=function(e){var n,t,o,i=this._item;i._isActive?(this._dragMoveEvent=e,n=i._id,t=this._prepareMove,o=this._applyMove,ae.add(0,$+n,t),ae.add(2,J+n,o),Me(i._id,this._handleSort)):this.stop()},kn.prototype._prepareMove=function(){if(this._isActive&&this._item._isActive){var e=this._getGrid()._settings.dragAxis,n=this._dragMoveEvent,t=this._dragPrevMoveEvent||this._dragStartEvent||n;if("y"!==e){var o=n.clientX-t.clientX;this._left=this._left-this._moveDiffX+o,this._gridX=this._gridX-this._moveDiffX+o,this._clientX=this._clientX-this._moveDiffX+o,this._moveDiffX=o}if("x"!==e){var i=n.clientY-t.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=n}},kn.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),kn.autoScroller.updateItem(e))}},kn.prototype._onScroll=function(e){var n,t,o,i=this._item;i._isActive?(this._scrollEvent=e,n=i._id,t=this._prepareScroll,o=this._applyScroll,ae.add(0,K+n,t),ae.add(2,Z+n,o),Me(i._id,this._handleSort)):this.stop()},kn.prototype._prepareScroll=function(){if(this._isActive){var e=this._item;if(e._isActive){var n=e._element,t=this._getGrid()._element,o=n.getBoundingClientRect();if(this._container!==t){var i=cn(this._containingBlock,t);this._containerDiffX=i.left,this._containerDiffY=i.top}var r=this._clientX-this._moveDiffX-o.left;this._left=this._left-this._scrollDiffX+r,this._scrollDiffX=r;var a=this._clientY-this._moveDiffY-o.top;this._top=this._top-this._scrollDiffY+a,this._scrollDiffY=a,this._gridX=this._left-this._containerDiffX,this._gridY=this._top-this._containerDiffY}}},kn.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))}},kn.prototype._onEnd=function(e){var n=this._item,t=n._element,o=this._getGrid(),i=o._settings,r=n._dragRelease;n._isActive?(de(n._id),le(n._id),pe(n._id),this._finishSort(),this._unbindScrollListeners(),r._containerDiffX=this._containerDiffX,r._containerDiffY=this._containerDiffY,this._reset(),fn(t,i.itemDraggingClass),kn.autoScroller.removeItem(n),o._emit("dragEnd",n,e),this._isMigrating?this._finishMigration():r.start()):this.stop()};var yn=/^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/,Wn={};function xn(e){var n=Wn[e];return n||((n=e.replace(yn,""))!==e&&(n=n[0].toLowerCase()+n.slice(1)),Wn[e]=n,n)}function Ln(e,n){for(var t in n)e.style[t]=n[t]}var Cn,Rn,Nn=!(!Element||!he(Element.prototype.animate)),Bn=!!(Element&&(Cn=Element.prototype.animate,Rn=window.Symbol,Cn&&he(Rn)&&he(Rn.toString)&&Rn(Cn).toString().indexOf("[native code]")>-1));function Sn(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 Tn(e,n){var t={};for(var o in e)t[n?o:xn(o)]=e[o];return t}function En(e,n){return"translateX("+e+"px) translateY("+n+"px)"}function Dn(e){this._item=e,this._animation=new Sn,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 jn(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}function Pn(e){var n=e._element,t=n.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},t.left="0px",t.top="0px",e._setTranslate(0,0),this._animation=new Sn(n),this._queue="layout-"+e._id,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}function Xn(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._container=!1,this._containerDiffX=0,this._containerDiffY=0}function Hn(e){var n=e._isActive,t=e._element,o=t.children[0],i=e.getGrid()._settings;if(!o)throw new Error("No valid child element found within item element.");this._item=e,this._isDestroyed=!1,this._isHidden=!n,this._isHiding=!1,this._isShowing=!1,this._childElement=o,this._currentStyleProps=[],this._animation=new Sn(o),this._queue="visibility-"+e._id,this._finishShow=this._finishShow.bind(this),this._finishHide=this._finishHide.bind(this),t.style.display=n?"":"none",Ye(t,n?i.itemVisibleClass:i.itemHiddenClass),this.setStyles(n?i.visibleStyles:i.hiddenStyles)}Sn.prototype.start=function(e,n,t){if(!this._isDestroyed){var o=this._element,i=t||{};if(!Nn)return Ln(o,n),this._callback=he(i.onFinish)?i.onFinish:null,void this._onFinish();var r,a,s,c=this._animation,d=this._props,l=this._values,p=i.duration||300,M=i.easing||"ease",u=!1;if(c&&(a=0,p===this._duration&&M===this._easing||(u=!0),!u)){for(r in n)if(++a,-1===(s=d.indexOf(r))||n[r]!==l[s]){u=!0;break}a!==d.length&&(u=!0)}if(u&&c.cancel(),this._callback=he(i.onFinish)?i.onFinish:null,!c||u){for(r in d.length=l.length=0,n)d.push(r),l.push(n[r]);this._duration=p,this._easing=M,this._animation=o.animate([Tn(e,Bn),Tn(n,Bn)],{duration:p,easing:M}),this._animation.onfinish=this._onFinish,Ln(o,n)}}},Sn.prototype.stop=function(){!this._isDestroyed&&this._animation&&(this._animation.cancel(),this._animation=this._callback=null,this._props.length=this._values.length=0)},Sn.prototype.getCurrentStyles=function(){return _n(element,currentProps)},Sn.prototype.isAnimating=function(){return!!this._animation},Sn.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=null,this._isDestroyed=!0)},Sn.prototype._onFinish=function(){var e=this._callback;this._animation=this._callback=null,this._props.length=this._values.length=0,e&&e()},Dn.prototype._updateDimensions=function(){this.isActive()&&Ln(this._element,{width:this._item._width+"px",height:this._item._height+"px"})},Dn.prototype._onLayoutStart=function(e,n){var t=this._item;if(-1!==e.indexOf(t)){var o=t._left,i=t._top,r=this._left,a=this._top;if(this._left=o,this._top=i,n||this._didMigrate||r!==o||a!==i){var s,c,d,l=o+t._marginLeft,p=i+t._marginTop,M=t.getGrid();if(n||!(M._settings.layoutDuration>0)||this._didMigrate)return ue(t._id),this._element.style[$e]=En(l,p),this._animation.stop(),void(this._didMigrate&&(M.getElement().appendChild(this._element),this._didMigrate=!1));this._nextTransX=l,this._nextTransY=p,s=t._id,c=this._setupAnimation,d=this._startAnimation,ae.add(0,ee+s,c),ae.add(2,ne+s,d)}}else this.reset()},Dn.prototype._setupAnimation=function(){if(this.isActive()){var e=On(this._element);this._transX=e.x,this._transY=e.y}},Dn.prototype._startAnimation=function(){if(this.isActive()){var e=this._animation,n=this._transX,t=this._transY,o=this._nextTransX,i=this._nextTransY;if(n!==o||t!==i){var r=this._item.getGrid()._settings,a={},s={};a[$e]=En(n,t),s[$e]=En(o,i),e.start(a,s,{duration:r.layoutDuration,easing:r.layoutEasing,onFinish:this._onLayoutEnd})}else e.isAnimating()&&(this._element.style[$e]=En(o,i),e.stop())}},Dn.prototype._onLayoutEnd=function(){this._resetAfterLayout&&this.reset()},Dn.prototype._onReleaseEnd=function(e){if(e._id===this._item._id){if(!this._animation.isAnimating())return void this.reset();this._resetAfterLayout=!0}},Dn.prototype._onMigrate=function(e){if(e.item===this._item){var n=this._item.getGrid(),t=e.toGrid;n.off(m,this._onReleaseEnd),n.off(s,this._onLayoutStart),n.off(z,this._onMigrate),n.off(p,this._onHide),t.on(m,this._onReleaseEnd),t.on(s,this._onLayoutStart),t.on(z,this._onMigrate),t.on(p,this._onHide),this._didMigrate=!0}},Dn.prototype._onHide=function(e){e.indexOf(this._item)>-1&&this.reset()},Dn.prototype.create=function(){if(this.isActive())this._resetAfterLayout=!1;else{var e,n=this._item,t=n.getGrid(),o=t._settings,i=this._animation;this._left=n._left,this._top=n._top,e=he(o.dragPlaceholder.createElement)?o.dragPlaceholder.createElement(n):document.createElement("div"),this._element=e,i._element=e,this._className=o.itemPlaceholderClass||"",this._className&&Ye(e,this._className),Ln(e,{position:"absolute",left:"0px",top:"0px",width:n._width+"px",height:n._height+"px"}),e.style[$e]=En(n._left+n._marginLeft,n._top+n._marginTop),t.on(s,this._onLayoutStart),t.on(m,this._onReleaseEnd),t.on(z,this._onMigrate),t.on(p,this._onHide),he(o.dragPlaceholder.onCreate)&&o.dragPlaceholder.onCreate(n,e),t.getElement().appendChild(e)}},Dn.prototype.reset=function(){if(this.isActive()){var e,n=this._element,t=this._item,o=t.getGrid(),i=o._settings,r=this._animation;this._resetAfterLayout=!1,ue(t._id),e=t._id,ae.remove(2,te+e),r.stop(),r._element=null,o.off(m,this._onReleaseEnd),o.off(s,this._onLayoutStart),o.off(z,this._onMigrate),o.off(p,this._onHide),this._className&&(fn(n,this._className),this._className=""),n.parentNode.removeChild(n),this._element=null,he(i.dragPlaceholder.onRemove)&&i.dragPlaceholder.onRemove(t,n)}},Dn.prototype.isActive=function(){return!!this._element},Dn.prototype.getElement=function(){return this._element},Dn.prototype.updateDimensions=function(){var e,n;this.isActive()&&(e=this._item._id,n=this._updateDimensions,ae.add(2,te+e,n))},Dn.prototype.destroy=function(){this.reset(),this._animation.destroy(),this._item=this._animation=null},jn.prototype.start=function(){if(!this._isDestroyed&&!this._isActive){var e=this._item,n=e.getGrid(),t=n._settings;this._isActive=!0,Ye(e._element,t.itemReleasingClass),t.dragRelease.useDragContainer||this._placeToGrid(),n._emit("dragReleaseStart",e),n._nextLayoutData||e._layout.start(!1)}},jn.prototype.stop=function(e,n,t){if(!this._isDestroyed&&this._isActive){var o=this._item,i=o.getGrid();e||void 0!==n&&void 0!==t||(n=o._left,t=o._top);var r=this._placeToGrid(n,t);this._reset(r),e||i._emit(m,o)}},jn.prototype.isJustReleased=function(){return this._isActive&&!1===this._isPositioningStarted},jn.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},jn.prototype._placeToGrid=function(e,n){if(!this._isDestroyed){var t=this._item,o=t._element,i=t.getGrid()._element,r=!1;if(o.parentNode!==i){if(void 0===e||void 0===n){var a=On(o);e=a.x-this._containerDiffX,n=a.y-this._containerDiffY}i.appendChild(o),t._setTranslate(e,n),r=!0}return this._containerDiffX=0,this._containerDiffY=0,r}},jn.prototype._reset=function(e){if(!this._isDestroyed){var n=this._item,t=n.getGrid()._settings.itemReleasingClass;this._isActive=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0,t&&(e&&n._element.clientWidth,fn(n._element,t))}},Pn.prototype.start=function(e,n){if(!this._isDestroyed){var t,o,i,r=this._item,a=r._dragRelease,s=r.getGrid()._settings,c=this._isActive,d=a.isJustReleased(),l=d?s.dragRelease.duration:s.layoutDuration,p=d?s.dragRelease.easing:s.layoutEasing,M=!e&&!this._skipNextAnimation&&l>0;if(c&&(se(r._id),r._emitter.burst(this._queue,!0,r)),d&&(a._isPositioningStarted=!0),he(n)&&r._emitter.on(this._queue,n),this._skipNextAnimation=!1,!M)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=p,this._animOptions.duration=l,this._isInterrupted=c,t=r._id,o=this._setupAnimation,i=this._startAnimation,ae.add(0,Y+t,o),ae.add(2,I+t,i)}},Pn.prototype.stop=function(e,n,t){if(!this._isDestroyed&&this._isActive){var o=this._item;if(se(o._id),this._animation.isAnimating()){if(void 0===n||void 0===t){var i=On(o._element);n=i.x,t=i.y}o._setTranslate(n,t),this._animation.stop()}fn(o._element,o.getGrid()._settings.itemPositioningClass),this._isActive=!1,e&&o._emitter.burst(this._queue,!0,o)}},Pn.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[$e]="",e.left="",e.top="",this._item=null,this._currentStyles=null,this._targetStyles=null,this._animOptions=null,this._isDestroyed=!0}},Pn.prototype._updateOffsets=function(){if(!this._isDestroyed){var e=this._item,n=e._migrate,t=e._dragRelease;this._offsetLeft=t._isActive?t._containerDiffX:n._isActive?n._containerDiffX:0,this._offsetTop=t._isActive?t._containerDiffY:n._isActive?n._containerDiffY:0,this._nextLeft=this._item._left+this._offsetLeft,this._nextTop=this._item._top+this._offsetTop}},Pn.prototype._finish=function(){if(!this._isDestroyed){var e=this._item,n=e._migrate,t=e._dragRelease;e._tX=this._nextLeft,e._tY=this._nextTop,this._isActive&&(this._isActive=!1,fn(e._element,e.getGrid()._settings.itemPositioningClass)),t._isActive&&t.stop(),n._isActive&&n.stop(),e._emitter.burst(this._queue,!1,e)}},Pn.prototype._setupAnimation=function(){var e=this._item;if(void 0===e._tX||void 0===e._tY){var n=On(e._element);e._tX=n.x,e._tY=n.y}},Pn.prototype._startAnimation=function(){var e=this._item,n=e.getGrid()._settings,t=this._animOptions.duration<=0;this._updateOffsets();var o=Math.abs(e._left-(e._tX-this._offsetLeft)),i=Math.abs(e._top-(e._tY-this._offsetTop));if(t||o<2&&i<2)return(o||i||this._isInterrupted)&&e._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._isInterrupted||Ye(e._element,n.itemPositioningClass),this._currentStyles[$e]=En(e._tX,e._tY),this._targetStyles[$e]=En(this._nextLeft,this._nextTop),e._tX=e._tY=void 0,this._animation.start(this._currentStyles,this._targetStyles,this._animOptions)},Xn.prototype.start=function(e,n,t){if(!this._isDestroyed){var o,i,r,a,s,c,d,l,p,M,u=this._item,b=u._element,m=u.isActive(),g=u.isVisible(),A=u.getGrid(),w=A._settings,v=e._settings,q=e._element,k=e._items,_=A._items.indexOf(u),y=t||document.body;if("number"==typeof n)o=Ve(k,n,1);else{if(!(i=e.getItem(n)))return;o=k.indexOf(i)}(u.isPositioning()||this._isActive||u.isReleasing())&&(d=(c=On(b)).x,l=c.y),u.isPositioning()&&u._layout.stop(!0,d,l),this._isActive&&(d-=this._containerDiffX,l-=this._containerDiffY,this.stop(!0,d,l)),u.isReleasing()&&(d-=u._dragRelease._containerDiffX,l-=u._dragRelease._containerDiffY,u._dragRelease.stop(!0,d,l)),u._visibility.stop(!0),u._drag&&u._drag.destroy(),A._hasListeners(z)&&A._emit(z,{item:u,fromGrid:A,fromIndex:_,toGrid:e,toIndex:o}),e._hasListeners(f)&&e._emit(f,{item:u,fromGrid:A,fromIndex:_,toGrid:e,toIndex:o}),w.itemClass!==v.itemClass&&(fn(b,w.itemClass),Ye(b,v.itemClass)),(p=g?w.itemVisibleClass:w.itemHiddenClass)!==(M=g?v.itemVisibleClass:v.itemHiddenClass)&&(fn(b,p),Ye(b,M)),A._items.splice(_,1),Fe(k,u,o),u._gridId=e._id,m?y!==(r=b.parentNode)&&(y.appendChild(b),a=cn(y,r,!0),c||(d=(c=On(b)).x,l=c.y),u._setTranslate(d+a.left,l+a.top)):q.appendChild(b),u._visibility.setStyles(g?v.visibleStyles:v.hiddenStyles),m&&(s=cn(y,q,!0)),u._refreshDimensions(),u._sortData=null,u._drag=v.dragEnabled?new kn(u):null,m?(this._isActive=!0,this._container=y,this._containerDiffX=s.left,this._containerDiffY=s.top):(this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0),A._hasListeners(h)&&A._emit(h,{item:u,fromGrid:A,fromIndex:_,toGrid:e,toIndex:o}),e._hasListeners(O)&&e._emit(O,{item:u,fromGrid:A,fromIndex:_,toGrid:e,toIndex:o})}},Xn.prototype.stop=function(e,n,t){if(!this._isDestroyed&&this._isActive){var o,i=this._item,r=i._element,a=i.getGrid()._element;this._container!==a&&(void 0!==n&&void 0!==t||(e?(n=(o=On(r)).x-this._containerDiffX,t=o.y-this._containerDiffY):(n=i._left,t=i._top)),a.appendChild(r),i._setTranslate(n,t)),this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0}},Xn.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},Hn.prototype.show=function(e,n){if(!this._isDestroyed){var t=this._item,o=t._element,i=he(n)?n:null,r=t.getGrid()._settings;this._isShowing||this._isHidden?!this._isShowing||e?(this._isShowing||(t._emitter.burst(this._queue,!0,t),fn(o,r.itemHiddenClass),Ye(o,r.itemVisibleClass),this._isHiding||(o.style.display="")),i&&t._emitter.on(this._queue,i),this._isShowing=!0,this._isHiding=this._isHidden=!1,this._startAnimation(!0,e,this._finishShow)):i&&t._emitter.on(this._queue,i):i&&i(!1,t)}},Hn.prototype.hide=function(e,n){if(!this._isDestroyed){var t=this._item,o=t._element,i=he(n)?n:null,r=t.getGrid()._settings;this._isHiding||!this._isHidden?!this._isHiding||e?(this._isHiding||(t._emitter.burst(this._queue,!0,t),Ye(o,r.itemHiddenClass),fn(o,r.itemVisibleClass)),i&&t._emitter.on(this._queue,i),this._isHidden=this._isHiding=!0,this._isShowing=!1,this._startAnimation(!1,e,this._finishHide)):i&&t._emitter.on(this._queue,i):i&&i(!1,t)}},Hn.prototype.stop=function(e){if(!this._isDestroyed&&(this._isHiding||this._isShowing)){var n=this._item;ce(n._id),this._animation.stop(),e&&n._emitter.burst(this._queue,!0,n)}},Hn.prototype.setStyles=function(e){var n=this._childElement,t=this._currentStyleProps;for(var o in this._removeCurrentStyles(),e)t.push(o),n.style[o]=e[o]},Hn.prototype.destroy=function(){if(!this._isDestroyed){var e=this._item,n=e._element,t=e.getGrid()._settings;this.stop(!0),e._emitter.clear(this._queue),this._animation.destroy(),this._removeCurrentStyles(),fn(n,t.itemVisibleClass),fn(n,t.itemHiddenClass),n.style.display="",this._isHiding=this._isShowing=!1,this._isDestroyed=this._isHidden=!0}},Hn.prototype._startAnimation=function(e,n,t){if(!this._isDestroyed){var o,i=this._item,r=this._animation,a=this._childElement,s=i.getGrid()._settings,c=e?s.visibleStyles:s.hiddenStyles,d=e?s.showDuration:s.hideDuration,l=e?s.showEasing:s.hideEasing,p=n||d<=0;if(c){if(ce(i._id),p)return Ln(a,c),r.stop(),void(t&&t());var M,u,b;r.isAnimating()&&(r._animation.onfinish=null),M=i._id,u=function(){o=_n(a,c)},b=function(){r.start(o,c,{duration:d,easing:l,onFinish:t})},ae.add(0,F+M,u),ae.add(2,V+M,b)}else t&&t()}},Hn.prototype._finishShow=function(){this._isHidden||(this._isShowing=!1,this._item._emitter.burst(this._queue,!1,this._item))},Hn.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)}},Hn.prototype._removeCurrentStyles=function(){for(var e=this._childElement,n=this._currentStyleProps,t=0;t<n.length;t++)e.style[n[t]]="";n.length=0};var Yn=0;function In(){return++Yn}function Fn(e,n,t){var o=e._settings;if(i){if(i.has(n))throw new Error("You can only create one Muuri Item per element!");i.set(n,this)}this._id=In(),this._gridId=e._id,this._element=n,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 v,n.parentNode!==e._element&&e._element.appendChild(n),Ye(n,o.itemClass),"boolean"!=typeof t&&(t="none"!==Oe(n,"display")),this._isActive=t,this._visibility=new Hn(this),this._layout=new Pn(this),this._migrate=new Xn(this),this._drag=o.dragEnabled?new kn(this):null,this._dragRelease=new jn(this),this._dragPlaceholder=new Dn(this)}function Vn(e){var n,t,o,i,r,a=.001,s=.5;function c(e){return((1e3*e+.5|0)/10|0)/100}function d(){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(d.prototype.computeLayout=function(e,n){var t,o,i,r,a,s,d=e.items,l=e.slots,p=!!(1&n),M=!!(2&n),u=!!(4&n),b=!!(8&n),h=!!(16&n),z="number"==typeof d[0];if(!d.length)return e;for(o=z?2:1,t=0;t<d.length;t+=o)z?(r=d[t],a=d[t+1]):(r=(i=d[t])._width+i._marginLeft+i._marginRight,a=i._height+i._marginTop+i._marginBottom),h&&(r=c(r),a=c(a)),s=this.computeNextSlot(e,r,a,p,M),M?s.left+s.width>e.width&&(e.width=s.left+s.width):s.top+s.height>e.height&&(e.height=s.top+s.height),l[++this.slotIndex]=s.left,l[++this.slotIndex]=s.top,(u||b)&&this.slotSizes.push(s.width,s.height);if(u)for(t=0;t<l.length;t+=2)l[t]=e.width-(l[t]+this.slotSizes[t]);if(b)for(t=1;t<l.length;t+=2)l[t]=e.height-(l[t]+this.slotSizes[t]);return this.slotSizes.length=0,this.currentRects.length=0,this.nextRects.length=0,this.rectStore.length=0,this.rectId=0,this.slotIndex=-1,e},d.prototype.computeNextSlot=function(e,n,t,o,i){var r,c,d,l,p,M=this.slotData,u=this.currentRects,b=this.nextRects,h=!1;for(b.length=0,M.left=null,M.top=null,M.width=n,M.height=t,l=0;l<u.length;l++)if((c=u[l])&&(r=this.getRect(c),M.width<=r.width+a&&M.height<=r.height+a)){M.left=r.left,M.top=r.top;break}if(null===M.left&&(i?(M.left=e.width,M.top=0):(M.left=0,M.top=e.height),o||(h=!0)),!i&&M.top+M.height>e.height+a&&(M.left>s&&b.push(this.addRect(0,e.height,M.left,1/0)),M.left+M.width<e.width-s&&b.push(this.addRect(M.left+M.width,e.height,e.width-M.left-M.width,1/0)),e.height=M.top+M.height),i&&M.left+M.width>e.width+a&&(M.top>s&&b.push(this.addRect(e.width,0,1/0,M.top)),M.top+M.height<e.height-s&&b.push(this.addRect(e.width,M.top+M.height,1/0,e.height-M.top-M.height)),e.width=M.left+M.width),!h)for(o&&(l=0);l<u.length;l++)if(c=u[l])for(r=this.getRect(c),d=this.splitRect(r,M),p=0;p<d.length;p++)c=d[p],r=this.getRect(c),(i?r.left+a<e.width-a:r.top+a<e.height-a)&&b.push(c);return b.length>1&&this.purgeRects(b).sort(i?this.sortRectsLeftTop:this.sortRectsTopLeft),this.currentRects=b,this.nextRects=u,M},d.prototype.addRect=function(e,n,t,o){var i=++this.rectId;return this.rectStore[i]=e||0,this.rectStore[++this.rectId]=n||0,this.rectStore[++this.rectId]=t||0,this.rectStore[++this.rectId]=o||0,i},d.prototype.getRect=function(e,n){return n||(n=this.rectTarget),n.left=this.rectStore[e]||0,n.top=this.rectStore[++e]||0,n.width=this.rectStore[++e]||0,n.height=this.rectStore[++e]||0,n},d.prototype.splitRect=(n=[],t=0,o=0,function(e,i){return n.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?(n.push(this.addRect(e.left,e.top,e.width,e.height)),n):((t=i.left-e.left)>=s&&n.push(this.addRect(e.left,e.top,t,e.height)),(t=e.left+e.width-(i.left+i.width))>=s&&n.push(this.addRect(i.left+i.width,e.top,t,e.height)),(o=i.top-e.top)>=s&&n.push(this.addRect(e.left,e.top,e.width,o)),(o=e.top+e.height-(i.top+i.height))>=s&&n.push(this.addRect(e.left,i.top+i.height,e.width,o)),n)}),d.prototype.isRectAWithinRectB=function(e,n){return e.left+a>=n.left&&e.top+a>=n.top&&e.left+e.width-a<=n.left+n.width&&e.top+e.height-a<=n.top+n.height},d.prototype.purgeRects=(i={},r={},function(e){for(var n,t=e.length;t--;)if(n=e.length,e[t])for(this.getRect(e[t],i);n--;)if(e[n]&&t!==n&&(this.getRect(e[n],r),this.isRectAWithinRectB(i,r))){e[t]=0;break}return e}),d.prototype.sortRectsTopLeft=function(){var e={},n={};return function(t,o){return this.getRect(t,e),this.getRect(o,n),e.top<n.top&&e.top+a<n.top?-1:e.top>n.top&&e.top-a>n.top?1:e.left<n.left&&e.left+a<n.left?-1:e.left>n.left&&e.left-a>n.left?1:0}}(),d.prototype.sortRectsLeftTop=function(){var e={},n={};return function(t,o){return this.getRect(t,e),this.getRect(o,n),e.left<n.left&&e.left+a<n.left?-1:e.left>n.left&&e.left-a<n.left?1:e.top<n.top&&e.top+a<n.top?-1:e.top>n.top&&e.top-a>n.top?1:0}}(),e){var l=new d;self.onmessage=function(e){var n=new Float32Array(e.data),t=n.subarray(4,n.length),o=new Float32Array(t.length),i=n[3],r={items:t,slots:o,width:n[1],height:n[2]};l.computeLayout(r,i),n[1]=r.width,n[2]=r.height,n.set(r.slots,4),postMessage(n.buffer,[n.buffer])}}return d}Fn.prototype.getGrid=function(){return o[this._gridId]},Fn.prototype.getElement=function(){return this._element},Fn.prototype.getWidth=function(){return this._width},Fn.prototype.getHeight=function(){return this._height},Fn.prototype.getMargin=function(){return{left:this._marginLeft,right:this._marginRight,top:this._marginTop,bottom:this._marginBottom}},Fn.prototype.getPosition=function(){return{left:this._left,top:this._top}},Fn.prototype.isActive=function(){return this._isActive},Fn.prototype.isVisible=function(){return!!this._visibility&&!this._visibility._isHidden},Fn.prototype.isShowing=function(){return!(!this._visibility||!this._visibility._isShowing)},Fn.prototype.isHiding=function(){return!(!this._visibility||!this._visibility._isHiding)},Fn.prototype.isPositioning=function(){return!(!this._layout||!this._layout._isActive)},Fn.prototype.isDragging=function(){return!(!this._drag||!this._drag._isActive)},Fn.prototype.isReleasing=function(){return!(!this._dragRelease||!this._dragRelease._isActive)},Fn.prototype.isDestroyed=function(){return this._isDestroyed},Fn.prototype._refreshDimensions=function(e){if(!(this._isDestroyed||!0!==e&&this._visibility._isHidden)){var n=this._element,t=this._dragPlaceholder,o=n.getBoundingClientRect();this._width=o.width,this._height=o.height,this._marginLeft=Math.max(0,fe(n,"margin-left")),this._marginRight=Math.max(0,fe(n,"margin-right")),this._marginTop=Math.max(0,fe(n,"margin-top")),this._marginBottom=Math.max(0,fe(n,"margin-bottom")),t&&t.updateDimensions()}},Fn.prototype._refreshSortData=function(){if(!this._isDestroyed){var e,n=this._sortData={},t=this.getGrid()._settings.sortData;for(e in t)n[e]=t[e](this,this._element)}},Fn.prototype._addToLayout=function(e,n){!0!==this._isActive&&(this._isActive=!0,this._left=e||0,this._top=n||0)},Fn.prototype._removeFromLayout=function(){!1!==this._isActive&&(this._isActive=!1,this._left=0,this._top=0)},Fn.prototype._canSkipLayout=function(e,n){return this._left===e&&this._top===n&&!this._migrate._isActive&&!this._layout._skipNextAnimation&&!this._dragRelease.isJustReleased()},Fn.prototype._setTranslate=function(e,n){return(this._tX!==e||this._tY!==n)&&(this._tX=e,this._tY=n,this._element.style[$e]=En(e,n),!0)},Fn.prototype._destroy=function(e){if(!this._isDestroyed){var n=this._element,t=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(),fn(n,t.itemClass),e&&n.parentNode.removeChild(n),i&&i.delete(n),this._isActive=!1,this._isDestroyed=!0}};var Gn=Vn(),Un=null,$n=[];function Jn(e,n){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(n),(e="number"==typeof e?Math.max(0,e):0)&&window.Worker&&window.URL&&window.Blob)try{this._workers=function(e,n){var t=[];if(e>0){Un||(Un=URL.createObjectURL(new Blob(["("+Vn.toString()+")(true)"],{type:"application/javascript"})));for(var o,i=0;i<e;i++)o=new Worker(Un),n&&(o.onmessage=n),t.push(o),$n.push(o)}return t}(e,this._onWorkerMessage)}catch(e){this._processor=new Gn}else this._processor=new Gn}Jn.prototype._sendToWorker=function(){if(this._layoutQueue.length&&this._workers.length){var e=this._layoutQueue.shift(),n=this._workers.pop(),t=this._layoutWorkerData[e];delete this._layoutWorkerData[e],this._layoutWorkers[e]=n,n.postMessage(t.buffer,[t.buffer])}},Jn.prototype._onWorkerMessage=function(e){var n=new Float32Array(e.data),t=n[0],o=this._layouts[t],i=this._layoutCallbacks[t],r=this._layoutWorkers[t];o&&delete this._layouts[t],i&&delete this._layoutCallbacks[t],r&&delete this._layoutWorkers[t],o&&i&&(o.width=n[1],o.height=n[2],o.slots=n.subarray(4,n.length),this._finalizeLayout(o),i(o)),r&&(this._workers.push(r),this._sendToWorker())},Jn.prototype._finalizeLayout=function(e){var n=e._grid,t=2&e._settings,o="border-box"===n._boxSizing;return delete e._grid,delete e._settings,e.styles={},t?e.styles.width=(o?e.width+n._borderLeft+n._borderRight:e.width)+"px":e.styles.height=(o?e.height+n._borderTop+n._borderBottom:e.height)+"px",e},Jn.prototype.setOptions=function(e){var n,t,o,i,r;e&&(n="boolean"==typeof e.fillGaps?e.fillGaps?1:0:1&this._options,t="boolean"==typeof e.horizontal?e.horizontal?2:0:2&this._options,o="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=n|t|o|i|r)},Jn.prototype.createLayout=function(e,n,t,o,i,r){if(this._layouts[n])throw new Error("A layout with the provided id is currently being processed.");var a=2&this._options,s={id:n,items:t,slots:null,width:a?0:o,height:a?i:0,_grid:e,_settings:this._options};if(!t.length)return s.slots=[],this._finalizeLayout(s),void r(s);if(this._processor)return s.slots=window.Float32Array?new Float32Array(2*t.length):new Array(2*t.length),this._processor.computeLayout(s,s._settings),this._finalizeLayout(s),void r(s);var c,d,l,p=new Float32Array(4+2*t.length);for(p[0]=n,p[1]=s.width,p[2]=s.height,p[3]=s._settings,c=0,d=3;c<t.length;c++)l=t[c],p[++d]=l._width+l._marginLeft+l._marginRight,p[++d]=l._height+l._marginTop+l._marginBottom;return this._layoutQueue.push(n),this._layouts[n]=s,this._layoutCallbacks[n]=r,this._layoutWorkerData[n]=p,this._sendToWorker(),this.cancelLayout.bind(this,n)},Jn.prototype.cancelLayout=function(e){if(this._layouts[e]&&(delete this._layouts[e],delete this._layoutCallbacks[e],this._layoutWorkerData[e])){delete this._layoutWorkerData[e];var n=this._layoutQueue.indexOf(e);n>-1&&this._layoutQueue.splice(n,1)}},Jn.prototype.destroy=function(){for(var e in this._layoutWorkers)this._workers.push(this._layoutWorkers[e]);!function(e){for(var n,t,o=0;o<e.length;o++)(n=e[o]).onmessage=null,n.onerror=null,n.onmessageerror=null,n.terminate(),(t=$n.indexOf(n))>-1&&$n.splice(t,1);Un&&!$n.length&&(URL.revokeObjectURL(Un),Un=null)}(this._workers),this._workers.length=0,this._layoutQueue.length=0,this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={}};var Kn=0;function Zn(e){var n=Object.prototype.toString.call(e);return"[object HTMLCollection]"===n||"[object NodeList]"===n}var Qn=Object.prototype.toString;function et(e){return"object"==typeof e&&"[object Object]"===Qn.call(e)}function nt(){}var tt,ot="number",it="string",rt="instant",at=0;function st(e,n){if(typeof e===it&&(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 t,i,r=function(e,n){var t=ct({},e);return n&&(t=ct(t,n)),n&&n.visibleStyles?t.visibleStyles=n.visibleStyles:e&&e.visibleStyles&&(t.visibleStyles=e.visibleStyles),n&&n.hiddenStyles?t.hiddenStyles=n.hiddenStyles:e&&e.hiddenStyles&&(t.hiddenStyles=e.hiddenStyles),t}(st.defaultOptions,n);r.visibleStyles=dt(r.visibleStyles),r.hiddenStyles=dt(r.hiddenStyles),he(r.dragSort)||(r.dragSort=!!r.dragSort),this._id=In(),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 v,this._onLayoutDataReceived=this._onLayoutDataReceived.bind(this),o[this._id]=this,Ye(e,r.containerClass),t=this,typeof(i=r.layoutOnResize)!==ot&&(i=!0===i?0:-1),i>=0&&(t._resizeHandler=function(e,n){var t=++Kn,o=0,i=0,r=!1,a=function(n){r||(i&&(o-=n-i),i=n,o>0?function(e,n){ae.add(0,re+e,n)}(t,a):(o=i=0,e()))};return function(s){if(!r){if(!(n<=0))return!0===s?(r=!0,o=i=0,a=void 0,void function(e){ae.remove(0,re+e)}(t)):void(o<=0?(o=n,a(0)):o=n);!0!==s&&e()}}}(function(){t.refreshItems().layout()},i),window.addEventListener("resize",t._resizeHandler)),this.add(function(e,n){if("*"===n)return e.children;if(typeof n===it){for(var t=[],o=e.children,i=0;i<o.length;i++)He(o[i],n)&&t.push(o[i]);return t}return Array.isArray(n)||Zn(n)?n:[]}(e,r.items),{layout:!1}),r.layoutOnInit&&this.layout(!0)}function ct(e,n){var t,o,i,r=Object.keys(n),a=r.length;for(i=0;i<a;i++)t=et(n[o=r[i]]),et(e[o])&&t?e[o]=ct(ct({},e[o]),n[o]):t?e[o]=ct({},n[o]):Array.isArray(n[o])?e[o]=n[o].slice(0):e[o]=n[o];return e}function dt(e){var n,t,o={},i=document.documentElement.style;for(n in e)e[n]&&(t=W(i,n))&&(o[t]=e[n]);return o}function lt(e){for(var n={},t=0;t<e.length;t++)n[e[t]._id]=t;return n}function pt(e,n,t){return e[n._id]-e[t._id]}st.Item=Fn,st.ItemLayout=Pn,st.ItemVisibility=Hn,st.ItemMigrate=Xn,st.ItemDrag=kn,st.ItemDragRelease=jn,st.ItemDragPlaceholder=Dn,st.Emitter=v,st.Animator=Sn,st.Dragger=D,st.Packer=Jn,st.AutoScroller=je,st.defaultPacker=new Jn(2),st.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:je.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"},st.prototype.on=function(e,n){return this._emitter.on(e,n),this},st.prototype.off=function(e,n){return this._emitter.off(e,n),this},st.prototype.getElement=function(){return this._element},st.prototype.getItem=function(e){if(this._isDestroyed||!e&&0!==e)return null;if(typeof e===ot)return this._items[e>-1?e:this._items.length+e]||null;if(e instanceof Fn)return e._gridId===this._id?e:null;if(i){var n=i.get(e);return n&&n._gridId===this._id?n:null}for(var t=0;t<this._items.length;t++)if(this._items[t]._element===e)return this._items[t];return null},st.prototype.getItems=function(e){if(this._isDestroyed||void 0===e)return this._items.slice(0);var n,t,o=[];if(Array.isArray(e)||Zn(e))for(n=0;n<e.length;n++)(t=this.getItem(e[n]))&&o.push(t);else(t=this.getItem(e))&&o.push(t);return o},st.prototype.refreshItems=function(e,n){if(this._isDestroyed)return this;var t,o,i,r,a=e||this._items;if(!0===n)for(r=[],t=0;t<a.length;t++)(o=a[t]).isVisible()||o.isHiding()||((i=o.getElement().style).visibility="hidden",i.display="",r.push(i));for(t=0;t<a.length;t++)a[t]._refreshDimensions(n);if(!0===n){for(t=0;t<r.length;t++)(i=r[t]).visibility="",i.display="none";r.length=0}return this},st.prototype.refreshSortData=function(e){if(this._isDestroyed)return this;for(var n=e||this._items,t=0;t<n.length;t++)n[t]._refreshSortData();return this},st.prototype.synchronize=function(){if(this._isDestroyed)return this;var e,n,t=this._items;if(!t.length)return this;for(var o=0;o<t.length;o++)(n=t[o]._element).parentNode===this._element&&(e=e||document.createDocumentFragment()).appendChild(n);return e?(this._element.appendChild(e),this._emit("synchronize"),this):this},st.prototype.layout=function(e,n){if(this._isDestroyed)return this;var t=this._nextLayoutData;t&&he(t.cancel)&&t.cancel();var o=at=at%16777216+1;this._nextLayoutData={id:o,instant:e,onFinish:n,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,d=this._height-this._borderTop-this._borderBottom,l=this._settings.layout;return he(l)?s=l(this,o,r,c,d,this._onLayoutDataReceived):(st.defaultPacker.setOptions(l),s=st.defaultPacker.createLayout(this,o,r,c,d,this._onLayoutDataReceived)),he(s)&&this._nextLayoutData&&this._nextLayoutData.id===o&&(this._nextLayoutData.cancel=s),this},st.prototype.add=function(e,n){if(this._isDestroyed||!e)return[];var t,o=Zn(t=e)?Array.prototype.slice.call(t):Array.prototype.concat(t);if(!o.length)return o;var i,r,a,s,c=n||{},d=c.layout?c.layout:void 0===c.layout,l=this._items,p=!1;for(s=0;s<o.length;s++)(r=o[s]).parentNode!==this._element&&(i=i||document.createDocumentFragment()).appendChild(r);for(i&&this._element.appendChild(i),s=0;s<o.length;s++)r=o[s],(a=o[s]=new Fn(this,r,c.active))._isActive&&(p=!0,a._layout._skipNextAnimation=!0);for(s=0;s<o.length;s++)(a=o[s])._refreshDimensions(),a._refreshSortData();return Fe(l,o,c.index),this._hasListeners("add")&&this._emit("add",o.slice(0)),p&&d&&this.layout(d===rt,he(d)?d:void 0),o},st.prototype.remove=function(e,n){if(this._isDestroyed||!e.length)return[];var t,o,i,r=n||{},a=r.layout?r.layout:void 0===r.layout,s=!1,c=this.getItems(),d=[],p=[];for(i=0;i<e.length;i++)(o=e[i])._isDestroyed||-1!==(t=this._items.indexOf(o))&&(o._isActive&&(s=!0),d.push(o),p.push(c.indexOf(o)),o._destroy(r.removeElements),this._items.splice(t,1));return this._hasListeners(l)&&this._emit(l,d.slice(0),p),s&&a&&this.layout(a===rt,he(a)?a:void 0),d},st.prototype.show=function(e,n){return!this._isDestroyed&&e.length&&this._setItemsVisibility(e,!0,n),this},st.prototype.hide=function(e,n){return!this._isDestroyed&&e.length&&this._setItemsVisibility(e,!1,n),this},st.prototype.filter=function(e,n){if(this._isDestroyed||!this._items.length)return this;var t,o,i=[],r=[],a=typeof e===it,s=he(e),c=n||{},d=!0===c.instant,l=c.syncWithLayout,p=c.layout?c.layout:void 0===c.layout,u=he(c.onFinish)?c.onFinish:null,b=-1,h=nt;if(u&&(h=function(){++b&&u(i.slice(0),r.slice(0))}),s||a)for(o=0;o<this._items.length;o++)t=this._items[o],(s?e(t):He(t._element,e))?i.push(t):r.push(t);return i.length?this.show(i,{instant:d,syncWithLayout:l,onFinish:h,layout:!1}):h(),r.length?this.hide(r,{instant:d,syncWithLayout:l,onFinish:h,layout:!1}):h(),(i.length||r.length)&&(this._hasListeners(M)&&this._emit(M,i.slice(0),r.slice(0)),p&&this.layout(p===rt,he(p)?p:void 0)),this},st.prototype.sort=function(){var e,n,t,o;function i(i,r){for(var a,s,c,d,l=0,p=0;p<e.length;p++)if(a=e[p][0],s=e[p][1],c=(i._sortData?i:i._refreshSortData())._sortData[a],d=(r._sortData?r:r._refreshSortData())._sortData[a],l="desc"===s||!s&&n?d<c?-1:d>c?1:0:c<d?-1:c>d?1:0)return l;return l||(o||(o=lt(t)),l=n?pt(o,r,i):pt(o,i,r)),l}function r(i,r){var a=n?-e(i,r):e(i,r);return a||(o||(o=lt(t)),a=n?pt(o,r,i):pt(o,i,r)),a}return function(a,s){if(this._isDestroyed||this._items.length<2)return this;var c=this._items,d=s||{},l=d.layout?d.layout:void 0===d.layout;if(n=!!d.descending,t=c.slice(0),o=null,he(a))e=a,c.sort(r);else if(typeof a===it)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=n=t=o=null,new Error("Invalid comparer argument provided.");c.length=0,c.push.apply(c,a)}return this._hasListeners(u)&&this._emit(u,c.slice(0),t),l&&this.layout(l===rt,he(l)?l:void 0),e=n=t=o=null,this}}(),st.prototype.move=function(e,n,t){if(this._isDestroyed||this._items.length<2)return this;var o,i,s=this._items,c=t||{},d=c.layout?c.layout:void 0===c.layout,l=c.action===r,p=l?r:a,M=this.getItem(e),u=this.getItem(n);return M&&u&&M!==u&&(o=s.indexOf(M),i=s.indexOf(u),l?Ue(s,o,i):Ge(s,o,i),this._hasListeners(b)&&this._emit(b,{item:M,fromIndex:o,toIndex:i,action:p}),d&&this.layout(d===rt,he(d)?d:void 0)),this},st.prototype.send=function(e,n,t,o){if(this._isDestroyed||n._isDestroyed||this===n)return this;if(!(e=this.getItem(e)))return this;var i=o||{},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(n,t,r),e._migrate._isActive&&e._isActive&&(a&&this.layout(a===rt,he(a)?a:void 0),s&&n.layout(s===rt,he(s)?s:void 0)),this},st.prototype.destroy=function(e){if(this._isDestroyed)return this;var n,t,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),n=0;n<a.length;n++)a[n]._destroy(e);for(t in this._items.length=0,fn(r,this._settings.containerClass),s)r.style[t]="";return this._emit("destroy"),this._emitter.destroy(),delete o[this._id],this._isDestroyed=!0,this},st.prototype._emit=function(){this._isDestroyed||this._emitter.emit.apply(this._emitter,arguments)},st.prototype._hasListeners=function(e){return!this._isDestroyed&&this._emitter.countListeners(e)>0},st.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},st.prototype._updateBorders=function(e,n,t,o){var i=this._element;e&&(this._borderLeft=fe(i,"border-left-width")),n&&(this._borderRight=fe(i,"border-right-width")),t&&(this._borderTop=fe(i,"border-top-width")),o&&(this._borderBottom=fe(i,"border-bottom-width"))},st.prototype._refreshDimensions=function(){this._updateBoundingRect(),this._updateBorders(1,1,1,1),this._boxSizing=Oe(this._element,"box-sizing")},st.prototype._onLayoutDataReceived=(tt=[],function(e){if(!this._isDestroyed&&this._nextLayoutData&&this._nextLayoutData.id===e.id){var n,t,o,i,r=this,a=this._nextLayoutData.instant,l=this._nextLayoutData.onFinish,p=e.items.length,M=p;for(this._nextLayoutData=null,!this._isLayoutFinished&&this._hasListeners(d)&&this._emit(d,this._layout.items.slice(0)),this._layout=e,tt.length=0,i=0;i<p;i++)(n=e.items[i])?(t=e.slots[2*i],o=e.slots[2*i+1],n._canSkipLayout(t,o)?--M:(n._left=t,n._top=o,n.isActive()&&!n.isDragging()?tt.push(n):--M)):--M;if(e.styles&&Ln(this._element,e.styles),!this._hasListeners(s)||(this._emit(s,e.items.slice(0),!0===a),this._layout.id===e.id)){var u=function(){if(!(--M>0)){var n=r._layout.id!==e.id,t=he(a)?a:l;n||(r._isLayoutFinished=!0),he(t)&&t(e.items.slice(0),n),!n&&r._hasListeners(c)&&r._emit(c,e.items.slice(0))}};if(!tt.length)return u(),this;for(this._isLayoutFinished=!1,i=0;i<tt.length&&this._layout.id===e.id;i++)tt[i]._layout.start(!0===a,u);return this._layout.id===e.id&&(tt.length=0),this}}}),st.prototype._setItemsVisibility=function(e,n,t){var o,i,r=this,a=e.slice(0),c=t||{},d=!0===c.instant,l=c.onFinish,M=c.layout?c.layout:void 0===c.layout,u=a.length,b=n?"showStart":p,h=n?"showEnd":"hideEnd",z=n?"show":"hide",O=!1,f=[],m=[];if(u){for(i=0;i<a.length;i++)o=a[i],(n&&!o._isActive||!n&&o._isActive)&&(O=!0),o._layout._skipNextAnimation=!(!n||o._isActive),n&&o._visibility._isHidden&&m.push(o),n?o._addToLayout():o._removeFromLayout();m.length&&(this.refreshItems(m,!0),m.length=0),O&&!1!==c.syncWithLayout?this.on(s,g):g(),O&&M&&this.layout(M===rt,he(M)?M:void 0)}else he(l)&&l(a);function g(){for(O&&!1!==c.syncWithLayout&&r.off(s,g),r._hasListeners(b)&&r._emit(b,a.slice(0)),i=0;i<a.length;i++)a[i]._gridId===r._id?a[i]._visibility[z](d,function(e,n){e||f.push(n),--u<1&&(he(l)&&l(f.slice(0)),r._hasListeners(h)&&r._emit(h,f.slice(0)))}):--u<1&&(he(l)&&l(f.slice(0)),r._hasListeners(h)&&r._emit(h,f.slice(0)))}};const Mt=st;var ut=t(24510),bt=t(25936),ht=t(91762);const zt=[];let Ot,ft;const mt=()=>{let e=document.querySelector(".SearchResult-dragContainer");return e||(e=(0,bt.A)("div",{className:"SearchResult-dragContainer"}),document.body.appendChild(e)),e},gt=()=>{const e=ft.querySelector(":scope .SearchResult-board"),n=()=>{if(e){const o=e.lastChild;if(o instanceof Element){const i=o.classList.contains("frame")?e.querySelector(".SearchResult-board-column:nth-last-child(-n+2)"):e.lastChild;i instanceof Element&&t.observe(i),Ot.off("layoutEnd",n);const r=e.closest(".Popup");r instanceof HTMLDivElement&&document.body.style.setProperty("--BoardContainer-zIndex",(parseInt(r.style.zIndex)+1).toString())}}},t=new IntersectionObserver(e=>{for(const n of e){const{isIntersecting:e,target:o}=n;if(e&&!o.classList.contains("frame")){t.unobserve(o);const e=ft.querySelector(":scope button.moreColumns-button");e&&e.click()}}},{root:ft,rootMargin:"25px",threshold:.75});Ot.on("layoutEnd",n)},At=(e,n)=>{const t=n.parentNode;if(t instanceof HTMLDivElement){const o=new IntersectionObserver(e=>{for(const n of e){const{isIntersecting:e,target:i}=n;if(e){o.unobserve(i);const e=t?.querySelector(":scope button.moreCards-button");e&&e.click()}}},{root:t,rootMargin:"25px",threshold:.75}),i=()=>{const t=n.lastChild;t instanceof Element&&(o.observe(t),e.off("layoutEnd",i))};e.on("layoutEnd",i)}};let wt,vt,qt;(0,ht.A)(".is-muuri .SearchResult-boardContainer",e=>{ft=e;const n=e.querySelector(":scope div.SearchResult-board");if(!n)return;Ot=new Mt(n,{items:".SearchResult-board-column",layoutDuration:300,layoutEasing:"cubic-bezier(0.625, 0.225, 0.100, 0.890)",layout:(e,n,t,o,i,r)=>(Mt.defaultPacker.setOptions({horizontal:!0}),Mt.defaultPacker.createLayout(e,n,t,o,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:ft,axis:Mt.AutoScroller.AXIS_X}]}});const t=ft.querySelector(".SearchResult-board-errors");(0,ht.A)(".SearchResult-board-errors-close",e=>{e.onclick=()=>{t&&(t.innerHTML="")}}),gt()}),(0,ht.A)(".SearchResult-items .SearchResult-boardContainer",e=>{const n=e.closest(".SearchResult-items");n?.classList.add("is-muuri")}),(0,ht.A)("ol.BoardView-list",e=>{const n=e.closest(".SearchResult-board"),t=!!n?.hasAttribute("data-dragEnabled"),o=new Mt(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:t,dragSort:()=>zt.filter(e=>n?.contains(e.getElement())),dragContainer:mt(),dragRelease:{duration:300,easing:"cubic-bezier(0.625, 0.225, 0.100, 0.890)",useDragContainer:!0},dragStartPredicate:(e,n)=>{const t=n.target,o=e.getElement();return!("A"===t.tagName||t.className.includes("ContentSummary-info")||o&&o.hasAttribute("data-archived"))},dragPlaceholder:{enabled:!0,createElement:e=>{const n=e.getElement();return n?.cloneNode(!0)}},dragAutoScroll:{targets:e=>[window,{element:ft,priority:1,axis:Mt.AutoScroller.AXIS_X},{element:e.getGrid()?.getElement().parentNode,priority:1,axis:Mt.AutoScroller.AXIS_Y}],sortDuringScroll:!1}});let i;new MutationObserver(e=>{for(const n of e){const e=n.target;if("childList"===n.type&&e instanceof HTMLElement){new ResizeObserver((n,t)=>{o.refreshItems().layout(),t.unobserve(e)}).observe(e)}}}).observe(e,{childList:!0,subtree:!0}),o.on("dragReleaseEnd",e=>{if(i===e){const n=e.getElement();n instanceof HTMLElement&&n.classList.add("is-saving"),r(e);let t=null,i=null;if(wt){const e=wt.getElement().closest(".SearchResult-board-column");t=e?.querySelector(".BoardView-title")}if(o){const e=o.getElement().closest(".SearchResult-board-column");i=e?.querySelector(".BoardView-title")}if(t instanceof HTMLElement){const e=t.dataset.count;e&&(t.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,vt=0}),o.on("dragStart",e=>{const n=e.getGrid();if(n instanceof Mt){wt=n,vt=o.getItems().indexOf(e);const t=o.getElement();if(t){const e=t.closest(".SearchResult-board-column"),n=e?.getAttribute("data-boardFieldValue");n&&(qt=n)}const i=e.getElement();i&&(i.style.width=e.getWidth()+"px",i.style.height=e.getHeight()+"px")}}),o.on("dragMove",e=>{o===wt&&null!==vt&&o.move(e,vt,{layout:"instant"})}),o.on("layoutStart",()=>{Ot&&Ot.refreshItems().layout()}),o.on("receive",e=>{i=e.item});const r=async e=>{const n=e.getElement(),t=n?.getAttribute("data-objectId"),i=document.querySelector('li[data-objectId="'+t+'"]');let r,a,s;if(i){const e=i.closest(".SearchResult-board");e&&(r=e.getAttribute("data-boardField"),s=e.getAttribute("data-search"))}if(n){const e=n.closest(".SearchResult-board-column");a=e?.getAttribute("data-boardFieldValue")}const c=new Headers,d=ut.A.get("bsp.csrf");d&&c.append("Brightspot-CSRF",d);const l=new FormData;t&&l.append("objectId",t),r&&l.append("boardField",r),a&&l.append("boardFieldValue",a),s&&l.append("search",s),l.append("previousBoardFieldValue",qt);const p=await fetch(window.CONTEXT_PATH+"board/fieldUpdate",{method:"post",credentials:"include",headers:c,body:l}),M=await p.text();if(p.ok){const n=o.getItems().indexOf(e);o.remove([e],{removeElements:!0});const t=document.createElement("template");t.innerHTML=M;const i=t.content.firstChild;i instanceof HTMLElement&&o.add(i,{index:n})}else if(M){o.send(e,wt,vt);const n=document.querySelector(".SearchResult-board-errors");n&&(n.innerHTML=M)}};At(o,e),zt.push(o)}),window.addEventListener("brightspot-frame-load",e=>{const n=e.target;if(n instanceof HTMLElement)if(n.classList.contains("BoardResults")){const e=[...n.querySelectorAll("li.BoardView-card")],t=n.closest(".BoardView-listContainer"),o=t?.querySelector("ol.BoardView-list");zt.forEach(n=>{n instanceof Object&&n.getElement()===o&&(At(n,o),n.add(e))})}else n.classList.contains("BoardResults-Horiz")&&(gt(),Ot.add([...n.querySelectorAll("div.SearchResult-board-column")]))})},81664(e,n,t){"use strict";(0,t(91762).A)(".Page .Page-broadcastAlert",e=>{const n=e.querySelector(".pagination");if(!n)return;const t=n.querySelector(".pagination-count");if(!t)return;const o=e.querySelectorAll(".Page-broadcastAlert-messages > *");if(!o)return;const i=n.querySelector(".previous");if(!i)return;const r=i.querySelector(":scope > a");if(!r)return;const a=n.querySelector(".next");if(!a)return;const s=a.querySelector(":scope > a");if(!s)return;const c=o.length;for(let e=1;e<c;e++)o[e].hidden=!0;let d=0;const l=()=>{t.textContent=`${d+1} / ${c}`};l();const p=e=>{o[d].hidden=!0,d+=e?1:-1,o[d].hidden=!1,l();const n=0===d;i.classList.toggle("is-disabled",n),r.tabIndex=n?-1:0;const t=d===c-1;a.classList.toggle("is-disabled",t),s.tabIndex=t?-1:0};i.addEventListener("click",e=>{e.preventDefault(),d>0&&p(!1)}),a.addEventListener("click",e=>{e.preventDefault(),d<c-1&&p(!0)})})},53664(e,n,t){"use strict";var o=t(91762),i=t(25936),r=t(24510),a=t(55408),s=t(17664);(0,o.A)(".BulkWorkflow-button",e=>{let n=null;e.addEventListener("keydown",n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),e.click())}),e.addEventListener("click",async t=>{t.preventDefault(),t.stopPropagation();const o=t.target;let c;if(o instanceof HTMLElement&&(c=o.getAttribute("action-url")),!c)return;if(!n){const e=new Headers,t=r.A.get("bsp.csrf");t&&e.append("Brightspot-CSRF",t);const o=await fetch(c,{headers:e}),a=await o.text();n=(0,i.A)("div",{className:"BulkWorkflow",innerHTML:a,role:"dialog","aria-modal":"true"}),document.body.appendChild(n),n.addEventListener("keydown",e=>{if("Escape"===e.key){e.stopPropagation();const t=n?.querySelector(".closeButton");t&&t.click()}})}e.closest(".Popup")&&(n.style.zIndex=(0,s.default)().toString()),a.A.toggle(e,n,()=>{const t=e.classList.toggle("is-open");return n?.classList.toggle("is-open"),t&&requestAnimationFrame(()=>{const e=n?.querySelector(".closeButton");e&&e.focus()}),t});const d=n.querySelector(".closeButton");d?.addEventListener("click",()=>{const t=a.A.toggles.get(e);t&&t.closeListener&&window.removeEventListener("click",t.closeListener,!0),e.classList.remove("is-open"),n?.classList.remove("is-open"),n?.remove(),n=null;const o=e.closest(".SearchResult")?.querySelector(".SearchResult-actions-toggle");o&&o.focus()})})})},35053(e,n,t){"use strict";t.d(n,{A:()=>A}),t(57573),t(49371),t(42723),t(96648),t(56065);var o=t(71224),i=t(98474),r=t(89713),a=t(67324),s=t(44209);function c(){c=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,n){["method","field"].forEach(function(t){n.forEach(function(n){n.kind===t&&"own"===n.placement&&this.defineClassElement(e,n)},this)},this)},initializeClassElements:function(e,n){var t=e.prototype;["method","field"].forEach(function(o){n.forEach(function(n){var i=n.placement;if(n.kind===o&&("static"===i||"prototype"===i)){var r="static"===i?e:t;this.defineClassElement(r,n)}},this)},this)},defineClassElement:function(e,n){var t=n.descriptor;if("field"===n.kind){var o=n.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===o?void 0:o.call(e)}}Object.defineProperty(e,n.key,t)},decorateClass:function(e,n){var t=[],o=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!p(e))return t.push(e);var n=this.decorateElement(e,i);t.push(n.element),t.push.apply(t,n.extras),o.push.apply(o,n.finishers)},this),!n)return{elements:t,finishers:o};var r=this.decorateConstructor(t,n);return o.push.apply(o,r.finishers),r.finishers=o,r},addElementPlacement:function(e,n,t){var o=n[e.placement];if(!t&&-1!==o.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");o.push(e.key)},decorateElement:function(e,n){for(var t=[],o=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=n[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,n),c.finisher&&o.push(c.finisher);var d=c.extras;if(d){for(var l=0;l<d.length;l++)this.addElementPlacement(d[l],n);t.push.apply(t,d)}}return{element:e,finishers:o,extras:t}},decorateConstructor:function(e,n){for(var t=[],o=n.length-1;o>=0;o--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,n[o])(i)||i);if(void 0!==r.finisher&&t.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:t}},fromElementDescriptor:function(e){var n={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(n.initializer=e.initializer),n},toElementDescriptors:function(e){if(void 0!==e)return(n=e,function(e){if(Array.isArray(e))return e}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return h(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,n):void 0}}(n)||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 n=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),n},this);var n},toElementDescriptor:function(e){var n=e.kind+"";if("method"!==n&&"field"!==n)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+n+'"');var t=b(e.key),o=e.placement+"";if("static"!==o&&"prototype"!==o&&"own"!==o)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 "'+o+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:n,key:t,placement:o,descriptor:Object.assign({},i)};return"field"!==n?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 n={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),n},toClassDescriptor:function(e){var n=e.kind+"";if("class"!==n)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+n+'"');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 t=u(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,n){for(var t=0;t<n.length;t++){var o=(0,n[t])(e);if(void 0!==o){if("function"!=typeof o)throw new TypeError("Finishers must return a constructor.");e=o}}return e},disallowProperty:function(e,n,t){if(void 0!==e[n])throw new TypeError(t+" can't have a ."+n+" property.")}};return e}function d(e){var n,t=b(e.key);"method"===e.kind?n={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?n={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?n={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(n={configurable:!0,writable:!0,enumerable:!0});var o={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:n};return e.decorators&&(o.decorators=e.decorators),"field"===e.kind&&(o.initializer=e.value),o}function l(e,n){void 0!==e.descriptor.get?n.descriptor.get=e.descriptor.get:n.descriptor.set=e.descriptor.set}function p(e){return e.decorators&&e.decorators.length}function M(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function u(e,n){var t=e[n];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+n+"' to be a function");return t}function b(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function h(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function z(){return z="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,n,t){var o=function(e,n){for(;!{}.hasOwnProperty.call(e,n)&&null!==(e=O(e)););return e}(e,n);if(o){var i=Object.getOwnPropertyDescriptor(o,n);return i.get?i.get.call(arguments.length<3?e:t):i.value}},z.apply(null,arguments)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}const f=window.localStorage,m=window.BRIGHTSPOT?.ui.tooltips.collapse,g=window.BRIGHTSPOT?.ui.tooltips.expand;let A=(w=[(0,i.EM)("btu-cig-cluster")],v=(0,r.j)((0,a.m)(o.WF)),q=c(),k=function(e,n){class t extends n{constructor(...n){super(...n),e(this)}}return{F:t,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 n=this.closest(".CIG"),t=n?.dataset.type,o=this.clusterTitle?.trim(),i=`BSP.ContentEdit.clusterExpanded.${t}.${o}`;t&&o&&(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(n=>{n.childNodes.length&&(n.toggleAttribute("hidden",e),n.classList.toggle("TC-unselected",e))})}},{kind:"method",key:"connectedCallback",value:function(){var e,n,o,i,r;(e=t,n="connectedCallback",o=this,r=z(O(1&(i=3)?e.prototype:e),n,o),2&i&&"function"==typeof r?function(e){return r.apply(o,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"),n=this.firstChild;n instanceof Element&&!n.classList.contains("CIG-title")&&e&&this.insertBefore(e,n),this.dataset.tab=this.tab;const t=Array.from(this.querySelectorAll(".CIG-row")).filter(e=>e.childNodes.length);this.toggleAttribute("hidden",!t.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),o.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>`}}]},w=g.decorateClass(function(e){for(var n=[],t=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},o=0;o<e.length;o++){var i,r=e[o];if("method"===r.kind&&(i=n.find(t)))if(p(r.descriptor)||p(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}d(r,i)}else n.push(r)}return n}(A.d.map(c)),z),g.initializeClassElements(A.F,w.elements),g.runClassFinishers(A.F,w.finishers));var z,O,f,m,g,A,w},4143(e,n,t){"use strict";t.a(e,async(e,o)=>{try{t.d(n,{A:()=>W}),t(57573),t(49371),t(96648),t(56065);var i=t(71224),r=t(98474),a=t(67102),s=t(19985);function c(e,n,t,o){var i=d();if(o)for(var r=0;r<o.length;r++)i=o[r](i);var a=n(function(e){i.initializeInstanceElements(e,s.elements)},t),s=i.decorateClass(M(a.d.map(l)),e);return i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}function d(){d=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,n){["method","field"].forEach(function(t){n.forEach(function(n){n.kind===t&&"own"===n.placement&&this.defineClassElement(e,n)},this)},this)},initializeClassElements:function(e,n){var t=e.prototype;["method","field"].forEach(function(o){n.forEach(function(n){var i=n.placement;if(n.kind===o&&("static"===i||"prototype"===i)){var r="static"===i?e:t;this.defineClassElement(r,n)}},this)},this)},defineClassElement:function(e,n){var t=n.descriptor;if("field"===n.kind){var o=n.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===o?void 0:o.call(e)}}Object.defineProperty(e,n.key,t)},decorateClass:function(e,n){var t=[],o=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!u(e))return t.push(e);var n=this.decorateElement(e,i);t.push(n.element),t.push.apply(t,n.extras),o.push.apply(o,n.finishers)},this),!n)return{elements:t,finishers:o};var r=this.decorateConstructor(t,n);return o.push.apply(o,r.finishers),r.finishers=o,r},addElementPlacement:function(e,n,t){var o=n[e.placement];if(!t&&-1!==o.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");o.push(e.key)},decorateElement:function(e,n){for(var t=[],o=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=n[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,n),c.finisher&&o.push(c.finisher);var d=c.extras;if(d){for(var l=0;l<d.length;l++)this.addElementPlacement(d[l],n);t.push.apply(t,d)}}return{element:e,finishers:o,extras:t}},decorateConstructor:function(e,n){for(var t=[],o=n.length-1;o>=0;o--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,n[o])(i)||i);if(void 0!==r.finisher&&t.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:t}},fromElementDescriptor:function(e){var n={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(n.initializer=e.initializer),n},toElementDescriptors:function(e){if(void 0!==e)return(n=e,g(n)||m(n)||O(n)||z()).map(function(e){var n=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),n},this);var n},toElementDescriptor:function(e){var n=e.kind+"";if("method"!==n&&"field"!==n)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+n+'"');var t=q(e.key),o=e.placement+"";if("static"!==o&&"prototype"!==o&&"own"!==o)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 "'+o+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:n,key:t,placement:o,descriptor:Object.assign({},i)};return"field"!==n?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:h(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var n={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),n},toClassDescriptor:function(e){var n=e.kind+"";if("class"!==n)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+n+'"');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 t=h(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,n){for(var t=0;t<n.length;t++){var o=(0,n[t])(e);if(void 0!==o){if("function"!=typeof o)throw new TypeError("Finishers must return a constructor.");e=o}}return e},disallowProperty:function(e,n,t){if(void 0!==e[n])throw new TypeError(t+" can't have a ."+n+" property.")}};return e}function l(e){var n,t=q(e.key);"method"===e.kind?n={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?n={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?n={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(n={configurable:!0,writable:!0,enumerable:!0});var o={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:n};return e.decorators&&(o.decorators=e.decorators),"field"===e.kind&&(o.initializer=e.value),o}function p(e,n){void 0!==e.descriptor.get?n.descriptor.get=e.descriptor.get:n.descriptor.set=e.descriptor.set}function M(e){for(var n=[],t=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},o=0;o<e.length;o++){var i,r=e[o];if("method"===r.kind&&(i=n.find(t)))if(b(r.descriptor)||b(i.descriptor)){if(u(r)||u(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(u(r)){if(u(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 n.push(r)}return n}function u(e){return e.decorators&&e.decorators.length}function b(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function h(e,n){var t=e[n];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+n+"' to be a function");return t}function z(){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 O(e,n){if(e){if("string"==typeof e)return f(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,n):void 0}}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function m(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e){if(Array.isArray(e))return e}function A(e,n,t,o){return A="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(e,n,t,o){var i,r=_(e,n);if(r){if((i=Object.getOwnPropertyDescriptor(r,n)).set)return i.set.call(o,t),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(o,n)){if(!i.writable)return!1;i.value=t,Object.defineProperty(o,n,i)}else v(o,n,t);return!0},A(e,n,t,o)}function w(e,n,t,o,i){if(!A(e,n,t,o||e)&&i)throw new TypeError("failed to set property");return t}function v(e,n,t){return(n=q(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function q(e){var n=k(e,"string");return"symbol"==typeof n?n:n+""}function k(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function _(e,n){for(;!{}.hasOwnProperty.call(e,n)&&null!==(e=y(e)););return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}window.BRIGHTSPOT?.ui.cms.enableV5UI||await t.e(1946).then(t.bind(t,51946));let W=c([(0,r.EM)("btu-textarea-input")],function(e,n){class t extends n{constructor(...n){super(...n),e(this)}}return{F:t,d:[{kind:"method",key:"find",value:function(){return this.querySelector(":scope > textarea")}},{kind:"set",key:"child",value:function(e){var n;n=e,w(y(t.prototype),"_child",n,this,1),this.input=e}},{kind:"method",key:"createRenderRoot",value:function(){return this}}]}},(0,s.r)((0,a.s)(i.WF)));o()}catch(x){o(x)}},1)},20008(e,n,t){"use strict";var o=t(91762),i=t(55408);(0,o.A)(".GraphQL",e=>{e.addEventListener("onegraph-click",()=>{e.dispatchEvent(new Event("mousedown",{bubbles:!0})),e.dispatchEvent(new Event("click",{bubbles:!0}))})}),(0,o.A)(".GraphQL-controls-toggle",e=>{const n=e.closest(".GraphQL-controls-menu"),t=n?.querySelector(".GraphQL-controls-list");t&&n&&e.addEventListener("click",o=>{i.A.toggle(e,t,()=>n.classList.toggle("is-open"))})}),(0,o.A)(".GraphQL-copy",e=>{e.addEventListener("click",n=>{n.stopPropagation(),n.preventDefault();const t=e.getAttribute("data-code");t&&window.navigator.clipboard.writeText(t),e.setAttribute("data-copied","");const o=e.nextElementSibling;o&&(o.removeAttribute("hidden"),setTimeout(()=>{o.setAttribute("hidden",""),e.removeAttribute("data-copied")},1500))})})},96580(e,n,t){"use strict";(0,t(91762).A)("div.GraphQL-previewControls",e=>{const n=e.querySelector("form[id]");if(!n)return;const t=n.querySelector(".deviceWidthSelect");t&&t.addEventListener("change",e=>{const t=document.querySelector("iframe[name='"+n.target+"']");t&&e?.currentTarget instanceof HTMLSelectElement&&(t.style.width=e?.currentTarget?.selectedOptions[0].value+"px"),window.dispatchEvent(new Event("resize")),n.submit()})})},45383(e,n,t){"use strict";var o=t(60021);(0,t(45055).A)(".Admin-main.is-miller .Widget",e=>{setTimeout(()=>{e.scrollIntoView({block:"end"})},0);const n=(0,o.A)(e,".is-selected");n&&setTimeout(()=>{n.scrollIntoView({block:"center"})},0)})},90871(e,n,t){"use strict";var o=t(18101),i=t(39242),r=t(97204);const a=CSS.supports("field-sizing: content");(0,r.A)("textarea",e=>{const n=e.parentNode;if(a)return void(n.classList.contains("AutoExpand")&&n.classList.add("is-noShim"));const t=()=>`${e.value||e.placeholder} `;let r;if(n.classList.contains("AutoExpand"))r=()=>{n.dataset.value=t();const o=e.style.opacity;e.style.opacity=.99999999,e.style.opacity=o};else{e.rows=1;const n=(0,o.A)("div",{className:"AutoExpand"}),a=(0,o.A)("div",{className:"AutoExpand-shim"});r=()=>a.innerText=t();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)(n,e),n.appendChild(a),n.appendChild(e)}const s=()=>e.parentNode.classList.toggle("is-noShim",0===e.getClientRects().length);r(),s(),new MutationObserver(e=>{for(const{attributeName:n}of e)"class"===n||"style"===n?s():r()}).observe(e,{attributes:!0,attributeFilter:["class","placeholder","style"]}),e.addEventListener("change",r),e.addEventListener("input",r)})},70175(e,n,t){"use strict";t.d(n,{A:()=>a}),t(62953),t(49371),t(26780);var o=t(88630),i=t.n(o),r=t(39979);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 n of e===this._form?e.querySelectorAll("input, select, textarea"):[e])n.autocomplete="off";const n=this._form.target;n&&document.querySelector(`.frame[name="${n}"]:not(.loading):not(.loaded)`)&&this._form.requestSubmit()}submit({target:e}){const n=this._form;if(n&&e.name)if(n instanceof HTMLFormElement){const t=new FormData(n);this._lastData&&JSON.stringify([...this._lastData.entries()])===JSON.stringify([...t.entries()])||(window.BRIGHTSPOT.ajaxInitiator={action:n.action,id:e.name,nodeName:e.nodeName.toLowerCase(),shadowField:e.shadowField},n.requestSubmit()),this._lastData=t}else{const e=i()(n),t=e.find(":input").serialize();this._lastData!==t&&(this._lastData=t,e.trigger("submit"))}}}},85945(e,n,t){"use strict";t(49371),t(96648);var o=t(23707),i=t.n(o),r=t(45055),a=t(88630);const s=document.createElement("style");s.className="Bridge",document.head.appendChild(s);const c=s.sheet,d={};function l(e,n){"function"==typeof n||n.startsWith("RichTextEditor-")||(Array.isArray(e)?e:[e]).forEach(e=>{e.indexOf(",")<0&&c.insertRule(`${e}:not(.${n}) { display: none; }`)}),(0,r.A)(e,e=>{"function"==typeof n?n(e):e.classList.contains(n)||(d[n]||(d[n]=!0,i().debug(`Bridged to ${n}`,e)),e.classList.add(n))})}l([".actions",".buttons"],"ActionBar"),l(".withLeftNav","Admin"),l(".withLeftNav > .leftNav","Admin-nav"),l(".withLeftNav > .main","Admin-main"),l(".ToolUserAvatar","Avatar"),l(".MimeTypeCount","Badge"),l(".button","Button"),l(".contentForm","ContentEdit"),l(".ContentFormCreate","ContentForm-create"),l('.ContentEdit[data-content-locked-out="true"]',"is-locked"),l(".contentForm-aside > .widget-publishing","ContentEdit-bar"),l(".OverlayProviderSelect","ContentEdit-overlayList"),l(".widget-publishingWorkflow","ContentEdit-workflow"),l(".widget-publishingPublish","ContentEdit-publish"),l(".widget-publishingWorkflowLog","ContentEdit-workflowLog"),l('.widget-publishing > .widget-publishingPublish > button[name="action-publish"]',"ContentEdit-publishButton"),l(".contentForm-main","ContentEdit-left"),l(".contentForm-main > .widget-content","ContentEdit-main"),l(".contentForm-main > .widget-content > h1","ContentEdit-title"),l(".contentForm-aside > .contentWidgets","ContentEdit-right"),l(".contentForm-main > .contentWidgets","ContentEdit-bottom"),l(['.ContentEdit-bar > button[name="action-draft"]','.ContentEdit-bar > button[name="action-newDraft"]'],"ContentEdit-saveButton"),l(['.ContentEdit-controls button[name="action-restore"]','.ContentEdit-controls button[name="action-restore-draft"]'],"ContentEdit-restoreButton"),l([".objectInputs:not(.BulkUploadProcessor)",".SocialPublishContentEditWidget-inputs"],"CIG"),l("form > .inputContainer","CIG-row"),l("form > .inputContainer > .inputSmall","CIG-small"),l("form > .inputContainer > .inputLabel","CIG-label"),l(".cms-contentTools","ContentTools"),l(".CIG .inputContainer","CIG-row"),l([".objectInputs-readOnly",".CIG .inputContainer-readOnly"],"is-readOnly"),l(".CIG .inputContainer-unlabeled","is-unlabeled"),l(".CIG .inputLabel","CIG-label"),l(".CIG .inputLabel > .icon-object-guide","CIG-help"),l(".CIG .inputPending","CIG-pending"),l(".CIG .inputUpdated","CIG-updated"),l(".CIG .inputNote","CIG-note"),l(".CIG .inputSmall","CIG-small"),l(".CIG .inputLarge","CIG-large"),l(".objectId-select","ContentSelector-search"),l(".objectId-edit","ContentSelector-edit"),l(".objectId-clear","ContentSelector-clear"),l(".objectId-placeholder","ContentSelector-placeholder"),l(".dashboard-columns","DashboardRow"),l(".dashboard-column","DashboardRow-column"),l(".dashboard-widget","DashboardRow-cell"),l(".dashboard-widget > .widget","DashboardWidget"),l(".DashboardWidget > h1","DashboardWidget-title"),l([".DashboardWidget > .scheduledEvents-controls",".DashboardWidget > .widget-controls",".DashboardWidget > .widgetControls"],"DashboardWidget-controls"),l([".DashboardWidget > .pagination",".DashboardWidget .scheduledEvents-datePagination",".PR > .pagination"],"DashboardWidget-pagination"),l([".DashboardWidget > .widget-filters",".DashboardWidget > div > .widget-filters",".DashboardWidget .scheduledEvents-dateDisplay"],"DashboardWidget-filters"),l(".table-striped:not(.links)","DT"),l(".calendarButton","DateTimeInput"),l(".UploadChooser","FileInput"),l(".imageEditor","ImageEditor"),l(".imageEditor-image","ImageEditor-main"),l(".imageEditor-aside","ImageEditor-aside"),l(".imageEditor-focus","ImageEditor-focus"),l(".imageEditor-edit","ImageEditor-edit"),l(".imageEditor-adjustment","ImageEditor-adjustment"),l(".imageEditor-sizes","ImageEditor-sizes"),l(".imageEditor-sizeButton","ImageEditor-size"),l(".imageEditor-sizePreview","ImageEditor-sizePreview"),l(".imageEditor-sizeLabel","ImageEditor-sizeLabel"),l(".imageEditor-resetCrop","ImageEditor-sizeReset"),l('.objectInputs[data-type="com.psddev.theme.Theme"]',"ThemeBundle"),l('.objectInputs[data-type="com.psddev.theme.Theme"] .TabBar-item[data-tab="Overrides"]',"ThemeBundle-tabOverrides"),l('[data-field="bundle"] .objectId-edit',"ThemeBundle-edit"),l('.Tab[data-tab-class="com.psddev.theme.ThemeFieldsTab"]',"ThemeBundle-inputs"),l([".ContentEditSites-owner",".ContentEditSites-access",".widget-urlsItem"],"InputRow"),l(".visibilityLabel","Label"),l(".link","Link"),l([".link.icon-action-delete",".link.icon-action-trash",".link.icon-action-cancel"],"is-red"),l(".links:not(.LinkList)","LinkTable"),l([".message",".message-info",".embargo-warning"],"Message"),l([".message.error",".message-error",".embargo-warning"],"is-error"),l([".message.warning",".message-warning"],"is-warning"),l([".message.success",".message-success"],"is-success"),l(".uploadable .message","is-upload"),l(".embargo-emphasis","is-emphasis"),l("body","Page"),l(".hasToolBroadcast","is-broadcasting"),l(".noToolUser","is-unauthenticated"),l(".toolBroadcast","Page-broadcast"),l(".toolHeader","Page-header"),l(".toolHeader-hasEnvironment","is-env"),l(".toolNav","Page-nav"),l(".toolTitle","Page-title"),l(".toolSearch","Page-search"),l(".toolUserSiteDisplay","Page-site"),l(".toolUserAvatarProfile","Page-avatar"),l(".toolUserWelcome","Page-user"),l(".toolEnv","Page-env"),l(".toolContent","Page-content"),l(".toolBackground","Page-background"),l(".widget-logIn","Page-login"),l(['[target="miscSearch"]','[target="profilePanel"]'],e=>e.setAttribute("data-popup-mode","noGap fromTop")),l([".objectId-select","rte2-enhancement-toolbar-change"],e=>e.setAttribute("data-popup-mode","fromRight")),l([".ContentSelector-create",".ContentSelector-edit",".rte2-enhancement-toolbar-edit",'form[target^="objectId-create-"]'],e=>e.setAttribute("data-popup-mode","noGap fromBottom")),l(".popup-objectId-edit-heading","Popup-heading"),l(".repeatableInputs","Repeatable"),l(".Repeatable > ul > li","Repeatable-item"),l(".Repeatable-item > .repeatableLabel","Repeatable-title"),l(".Repeatable > .addButtonContainer","Repeatable-controls"),l(".Repeatable-controls > .addButton","Repeatable-add"),l(".repeatableForm","RCIG"),l(".repeatableForm.addToTop","is-addToTop"),l(".repeatableForm-previewable","is-previewable"),l([".repeatableForm > ol",".repeatableForm > ul"],"RCIG-list"),l(".RCIG-list > li","RCIG-item"),l(".RCIG-item > .repeatableLabel","RCIG-title"),l(".RCIG-item > .removeButton","RCIG-remove"),l(".RCIG > .addButtonContainer","RCIG-controls"),l(".RCIG-controls > .addButton","RCIG-add"),l(".RCIG-controls > .addButtonSelectContainer","RCIG-addSelect"),l(".repeatableForm-weighted","is-weighted"),l(".repeatableForm-weightResetButton","RCIG-resetWeights"),l(".repeatableForm-itemWeights","RCIG-weightBar"),l(".repeatableForm-itemWeight","RCIG-weightBarItem"),l(".repeatableForm-itemWeight-marker","RCIG-weightBarMarker"),l(".repeatableForm-itemWeightHandle","RCIG-weightBarHandle"),l(".repeatableLabel-weightLabel","RCIG-weightLabel"),l(".repeatableLabel-color","RCIG-weightColor"),l([".repeatableObjectId",".repeatableDropdown"],"RCS"),l(".repeatableObjectId.addToTop","is-addToTop"),l([".repeatableObjectId > ol",".repeatableObjectId > ul",".repeatableDropdown > ol",".repeatableDropdown > ul"],"RCS-list"),l(".RCS-list > li","RCS-item"),l(".RCS-item > .removeButton","RCS-remove"),l([".repeatableObjectId > .addButtonContainer",".repeatableDropdown > .addButtonContainer"],"RCS-controls"),l(".RCS-controls > .addButton","RCS-add"),l(".repeatableText","RTI"),l([".repeatableText > ol",".repeatableText > ul"],"RTI-list"),l(".RTI-list > li > .removeButton","RTI-remove"),l(".repeatableText > .addButtonContainer","RTI-add"),l(".searchInput","SearchInput"),l([".Admin-nav .SearchInput",'.Popup[name="siteSwitch"] .SearchInput'],"is-filter"),l(".searchResult-container","SearchResult"),l(".searchResult-view","SearchResult-view"),l(".searchResult-views","SearchResult-views"),l(".searchResult-items","SearchResult-items"),l(".searchResult-pagination","SearchResult-pagination"),l(".searchResult-fields","SearchResult-fields"),l(".searchResult-sorts","SearchResult-sorts"),l(".searchResult-list","SearchResult-list"),l(".searchResult-mixed","SearchResult-mixed"),l(".searchResult-images","SearchResult-images"),l(".searchResult-selectionReset","SearchResult-selectionReset"),l(".searchResult-actions","SearchResult-actions"),l(".searchResult-actions-body","SearchResult-actions-body"),l(".searchResult-action-simple","SearchResult-action"),l(".searchPagination","SearchResult-pagination"),l(".searchSorter","SearchResult-sorts"),l(".searchResultImages","SearchResult-images"),l(".searchResultList","SearchResult-items"),l(".queryRestrictions","SearchResult-query"),l('.Popup[name="siteSearchTermAnalyticsPage"]',"SiteSearchTermAnalytics"),l('.Popup[name="siteSearchTermAnalyticsPage"] .Widget-controls',"SiteSearchTermAnalytics-controls"),l('.Popup[name="siteSearchTermAnalyticsPage"] .pagination',"SiteSearchTermAnalytics-results"),l(".queryField","QueryField"),l(".queryField_frame","QueryField-frame"),l(".queryField_frame .searchControls","QueryField-searchControls"),l(".queryField_frame .searchForm","QueryField-searchForm"),l(['.widget[name="searchAdvancedFull"]','.Widget[name="searchAdvancedFull"]'],"SearchWidget"),l('.SearchWidget[name="miscSearch"]',"is-global"),l(".SearchWidget > h1","SearchWidget-title"),l(".widget-queryField > h1","SearchWidget-title"),l(".searchForm","SearchWidget-form"),l(".searchHistory","SearchWidget-history"),l(".searchRecent","SearchWidget-recent"),l(".searchSaved","SearchWidget-saved"),l(".searchFilters","SearchWidget-controls"),l(".searchFilters .searchInput","SearchWidget-query"),l(".searchFiltersType","SearchWidget-type"),l([".searchFilters > .search-reset",".searchFilters > .action-cancel"],"SearchWidget-reset"),l(".searchFilter","SearchWidget-filter"),l(".searchFilterItem","SearchWidget-filterItem"),l(".searchFilter-advancedQuery","is-advanced"),l(".searchFilter-date","is-date"),l(".searchFilter-record","is-record"),l(".searchCreate","SearchWidget-create"),l(".searchResult","SearchWidget-result"),l(".searchResultTable","SearchResult-table"),l(".WidgetSearchAdvancedQuery","SearchWidgetAdvanced"),l(".WidgetSearchAdvancedQuery .fixedScrollable","SearchWidgetAdvanced-scrollpane"),l(".standardForm","StandardForm"),l([".DashboardTabSelect > ul",".tabs"],"TabBar"),l(".TabBar > li:not(.TabBar-menu)","TabBar-item"),l([".objectInputs",".tabbed"],"TC"),l(".tabbed > [data-tab]","TC-panel"),l(".searchResultTaxonomy","Taxonomy"),l(".searchResultTaxonomyColumn","Taxonomy-column"),l(".searchResultTaxonomyChildren","Taxonomy-children"),l(".searchResultTaxonomyExpand","Taxonomy-expand"),l("input.secret","is-secret"),l(".widget-urlsRepeatable","UrlsWidget"),l(".widget-urlsItemLabel","UrlsWidget-itemLabel"),l(".EditFieldUpdateViewers","Viewers"),l(".EditFieldUpdateViewers-some","Viewers-some"),l(".EditFieldUpdateViewers-none","Viewers-none"),l(".EditFieldUpdateViewers-viewer","Viewers-viewer"),l(".calendar-week","Week"),l(".Week > .calendarRow","Week-row"),l(".Week-row > .calendarDay","Week-day"),l(".Week-day > .calendarDayOfWeek","Week-dow"),l(".Week-day > .calendarDayOfMonth","Week-dom"),l(".Week-row > .calendarCell","Week-content"),l(".calendar-month","Month"),l(".Month > .calendarRow","Month-row"),l(".Month-row > .calendarDay","Month-day"),l(".Month-day > .calendarDayOfWeek","Month-dow"),l(".Month-day > .calendarDayOfMonth","Month-dom"),l(".Popup-content > .frame.loaded",e=>{for(const n of e.children){if(n.classList.contains("Widget"))return;if(n.classList.contains("widget"))return void n.classList.add("Widget")}const n=e.getAttribute("name");e.classList.add("miscSearch"===n||n.startsWith("objectId-")&&n.endsWith("-select")?"SearchWidget":"Widget")}),window.DISABLE_VIDEO_EDITOR_UI||(l('[data-type="brightspot.elemental.AwsElementalVideoProvider"]',"VideoEditor"),l('[data-type="brightspot.elemental.AwsElementalVideoInputWrapper"]',"VideoEditor-fileContainer"),l('[data-type="brightspot.elemental.AwsElementalImageOverlayWrapper"]',"VideoEditor-InputOverlay"),l(".VideoEditor-fileContainer .filePreview > div:first-child","FilePreview-actions"),l('.CIG-row[data-field-name="colorCorrector"]',"VideoEditor-InputColors"),l('[data-type="brightspot.elemental.AwsElementalColorCorrector"]',"VideoEditor-InputColors-group")),l([".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"),l([".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"),l([".Widget > .widget-controls",".Widget > .widgetControls"],"Widget-controls"),l(".CommunityWidget .widget-filters","CommunityWidget-filters"),l(".PR > .widget-filters","PR-filters"),l(".PR > .pagination","PR-pagination"),l(".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}})},25351(e,n,t){"use strict";(0,t(45055).A)(['.ContentEdit-left input[type="checkbox"]','.SearchWidget-filter input[type="checkbox"]'],e=>{const n=()=>{e.setAttribute("title",e.checked?window.BRIGHTSPOT?.ui.tooltips.toggleOff:window.BRIGHTSPOT?.ui.tooltips.toggleOn)};n(),e.addEventListener("change",n)})},50401(e,n,t){"use strict";(0,t(53853).A)("input.color",async()=>{await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(1950),t.e(2882)]).then(t.bind(t,2784))})},82224(e,n,t){"use strict";t.d(n,{A:()=>M}),t(86634),t(57573),t(49371),t(42723),t(26780),t(96648),t(56065),t(56673);var o=t(18101),i=t(60021),r=t(76394),a=t(76752),s=t(22777),c=t(24510);let d,l=0;const p=window.BRIGHTSPOT?.ui?.tooltips;class M{constructor(e,n){this.handleIntersect=(e,n)=>{for(let n of e)!1===n.isIntersecting?this._list.style.display="none":this._list.style.display="block"},this._select=e,this._reorderSelectOptions(),this._getOptionsIndex=0,this._getOptionsUrl="function"==typeof n.getOptionsUrl&&n.getOptionsUrl,this._modifier=n.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,o.A)("ul",{id:"_cb"+l++,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 n=e.target.classList.contains("ComboInput-check")?e.target.parentElement:e.target;n.classList.contains("ComboInput-option")&&this.updateValue(n.getAttribute("data-value"),n.getAttribute("data-missing-option"))}},onmouseover:e=>{const n=e.target.getAttribute("data-create")?e.target.closest(".ComboInput-option"):e.target;n.classList.contains("ComboInput-option")&&this._highlightOption(n,0)}}),this._label=(0,o.A)("div",{className:"ComboInput-label",dataset:{placeholder:e.getAttribute("data-placeholder")||e.getAttribute("placeholder")||""}});let t=e.closest(".SearchWidget-filter");if(t){let e=(0,i.A)(t,'input[type="checkbox"]');e&&e.closest(".SearchWidget-filter")===t&&(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,o.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,o.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 n=this._getActiveOption(),t="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(!t)return this.showList(),void e.preventDefault();if(n){if(n.classList.contains("nested"))return e.preventDefault(),void this.toggleCreateNewList();if(n.dataset.sublist||n.dataset.create){const e=n.querySelector("a.objectId-create");e&&(e.click(),this.hideList())}else this.updateValue(n.getAttribute("data-value"),n.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(n||this._list.firstChild,-1),this.scrollList(),e.preventDefault(),void e.stopPropagation();case"ArrowDown":return this.showList(),this._highlightOption(n||this._list.lastChild,1),this.scrollList(),e.preventDefault(),void e.stopPropagation();case"ArrowRight":return void this.focusFavorite();case"Tab":return void this.hideList()}this===d||e.shiftKey||this.showList()}},this._label,this._filter,this._list,(0,o.A)("span",{class:"ComboInput-icon","aria-hidden":!0})),!this._container.getAttribute("aria-label")||"type"===this._container.getAttribute("aria-label").toLowerCase()){const n=e.closest(".CIG-small")||e.closest(".CIG-large");if(n){let e=n.previousElementSibling;if(e&&!e.classList.contains("CIG-label")&&e.classList.contains("CIG-note")&&(e=e.previousElementSibling),e&&e.classList.contains("CIG-label")){const n=e.querySelector("label");if(n){const e=n.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(n=>{let t;for(const o of n){for(const n of o.removedNodes)if(n===e)return void s.disconnect();"data-placeholder"!==o.attributeName&&"placeholder"!==o.attributeName||(t=!0)}t&&(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 n=e.closest("optgroup")||this._select;n.insertBefore(e,n.firstChild)}}scrollList(){const e=this._getActiveOption();if(!e)return;const n=this._list.getBoundingClientRect(),t=e.getBoundingClientRect();t.bottom>n.bottom?e.scrollIntoView(!1):t.top<n.top&&e.scrollIntoView(!0)}toggleSelection(e,n){e.classList.toggle("is-checked");const t=n.getAttribute("data-value"),o=(0,r.A)(this._list,`.ComboInput-option[data-source="${CSS.escape(t)}"]`);for(let n=0;n<o.length;n++)o[n].setAttribute("aria-selected",e.classList.contains("is-checked"));this.updateLabel()}updateSelection(e){if(e){const n=e.getAttribute("data-value"),t=CSS.escape(n);let o=(0,r.A)(this._list,`.ComboInput-option[data-source="${t}"]:not([data-is-hidden])`);if(0===o.length)return void e.setAttribute("data-hidden",!0);const a=(0,r.A)(this._list,`.ComboInput-option[data-source="${t}"][aria-selected="true"]`);(0,i.A)(e,".ComboInput-selectOption").classList.toggle("is-checked",o.length>0&&o.length===a.length)}}updateList(){if(this._select.dataset.collapseDuplicateOptions)if(this._select.hasAttribute("multiple")){const e=Array.from(this._select.childNodes);for(const n of e){if(this._duplicates.has(n.value))continue;const t=e.filter(e=>e.textContent===n.textContent);t.length>1&&t.forEach((e,n)=>{0===n?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,n,t,a){a||(a=0);for(const i of e.childNodes)switch(i.tagName){case"OPTGROUP":{const e=`${this._list.id}-g${a++}`,t=(0,o.A)("ul",{className:"ComboInput-optionGroup",role:"group","aria-labelledby":e}),r=(0,o.A)("div",{id:e,className:"ComboInput-heading"},i.label),s=(0,o.A)("li",r,t);i.getAttribute("data-select-option")&&(t.dataset.selectOption=i.dataset.selectOption,r.dataset.value=i.getAttribute("value"),r.appendChild((0,o.A)("span",{className:"ComboInput-selectOption",onclick:e=>{this.toggleSelection(e.target,r)}}))),this._list.appendChild(s),n=this._createOptions(i,n,t,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,o.A)("ul",{role:"listbox",hidden:"true"},e.map(e=>(0,o.A)("li",{className:"ComboInput-option","data-sublist":!0,role:"none",id:`${this._list.id}-o${n++}`},(0,o.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,o.A)("li",{className:"ComboInput-option nested","data-create":!0,role:"button","aria-expanded":!1,"aria-label":i.label,id:`${this._list.id}-o${n++}`,onclick:e=>{"A"!==e.target.tagName&&(e.preventDefault(),e.stopPropagation(),this.toggleCreateNewList(),this._filter.focus())}},(0,o.A)("span",{innerHTML:i.label||"",className:"ComboInput-option-nestedLabel","data-create":!0},(0,o.A)("span",{className:"ComboInput-option-arrow"},(0,o.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,o.A)("li",{id:`${this._list.id}-o${n++}`,className:"ComboInput-option",role:"option","aria-selected":!1,"data-create":!0},(0,o.A)("span",{class:"ComboInput-check","aria-hidden":!0}),(0,o.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,o.A)("li",{id:`${this._list.id}-o${n++}`,className:"ComboInput-option",role:"option","aria-selected":!(this._missing&&this._missing.checked)&&(i.selected||i.value===e.value),"data-value":i.value},(0,o.A)("span",{class:"ComboInput-check","aria-hidden":!0}),r?(0,o.A)("div",{className:"ComboInput-option-iframe",innerHTML:r}):i.label||"");if(a.textContent||!e.dataset.placeholder&&!e.getAttribute("placeholder")||a.appendChild((0,o.A)("div",{className:"ComboInput-option-iframe"},(0,o.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",p?.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",n=p?.action?.unfavorite;if(!i.parentElement.getAttribute("data-favorites")){const t=this._select.querySelector("optgroup[data-favorites]");t&&t.querySelector(`option[value="${CSS.escape(i.value)}"]`)||(e+=" is-unstarred",n=p?.action?.favorite)}const t=(0,o.A)("button",{className:e,type:"button","data-id":i.value,title:n,"aria-label":n,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 n;this._list.querySelectorAll(`\n .ComboInput-option-favorite[data-id="${CSS.escape(i.value)}"]`).forEach(e=>{const n=e.classList.contains("is-unstarred")?p?.action?.unfavorite:p?.action?.favorite;e.title=n,e.nextElementSibling.textContent=n,e.classList.toggle("is-unstarred"),e.setAttribute("aria-label",n)});let t=i.getAttribute("data-typeids");if(t){let e=t.split(",").join("&typeIds=");n=CONTEXT_PATH+"update-dropdown-favorites?action=update&typeIds="+e+"&id="+i.value}else n=CONTEXT_PATH+"update-dropdown-favorites?action=update&typeIds="+i.value;const o=new Headers;o.append("Brightspot-CSRF",c.A.get("bsp.csrf"));try{const e=await fetch(n,{method:"POST",headers:o});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,o.A)("span",{class:"ComboInput-option-favorite-icon","aria-hidden":!0}));a.appendChild(t),a.appendChild((0,o.A)("span",{"aria-live":"polite",class:"screen-reader-only"}))}i.getAttribute("data-source")&&a.setAttribute("data-source",i.getAttribute("data-source")),t?t.appendChild(a):this._list.appendChild(a)}break}}if(this._missing&&!(0,i.A)(this._list,"[data-missing-option=true]")){const e=(0,o.A)("li",{id:`${this._list.id}-o${n++}`,className:"ComboInput-option",role:"option","data-missing-option":!0,"aria-selected":this._missing.checked},(0,o.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,o.A)("li",{id:`${this._list.id}-o${n++}`,className:"ComboInput-option",role:"option","data-select-all":!0,"aria-selected":(0,r.A)(this._list,"[aria-selected=true]").length===this._getOptions().length},(0,o.A)("span",{class:"ComboInput-check","aria-hidden":!0}),this._select.getAttribute("data-select-all-label"));this._list.insertBefore(e,this._list.firstElementChild)}return n}_getOptions(){return(0,r.A)(this._list,".ComboInput-option")}_highlightOption(e,n){if(!e)return;const t=[];for(const e of this._getOptions())e.classList.remove("is-active"),e.hidden||e.parentElement.hidden||t.push(e);const o=t.length;let i;for(let n=0;n<o;++n)if(e===t[n]){i=n;break}for(i=(i+n)%o;i<0;)i+=o;const r=t[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 n=this._getOptions();for(;e<n.length&&n[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,o.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")),n=[];for(const t of e){const e=t.cloneNode(!0),o=this._select.closest(".SearchWidget-filterItem");let r;if(o&&this._select.classList.toggle("is-readOnly",o.parentNode.classList.contains("is-multiple")&&e.getAttribute("data-value")),e.querySelector("[data-id]")?.remove(),e.getAttribute("data-missing-option")){let n=(0,i.A)(this._list,'.ComboInput-option[data-value=""]');n||(n=(0,i.A)(this._list,".ComboInput-placeholder-option")),r=e.textContent+": "+n?.innerHTML}else r=e.innerHTML;r&&!n.some(e=>e===r)&&n.push(r)}let t;const r=n.length;r>0&&(this._select.closest(".CIG-row")?t=n.join(", "):(t=n[0],r>1&&(t+=" +"+(r-1)))),t&&(this._label.appendChild((0,o.A)("div",{className:"ComboInput-selected",innerHTML:t})),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 n=this._select.parentNode.querySelector("input[data-typeids]"),t=this._select.getAttribute("data-typeIds");var e=this._select.options;const o=Array.from(e).map(e=>e.value),i=Array.from(e).some(e=>e.hasAttribute("data-typeids"));let r,a=new FormData;if(n&&i){const e=n.getAttribute("data-typeIds").split(",");r=CONTEXT_PATH+"update-dropdown-favorites?action=getExisting&isFavoritedType=false",e.forEach(e=>{a.append("validTypeIds",e)})}else t||o?(r=CONTEXT_PATH+"update-dropdown-favorites?action=getExisting&isFavoritedType=true",(t?t.split(","):o).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 n=await e.text(),t=(new DOMParser).parseFromString(n,"text/html").body.querySelector("optgroup"),o=this._select.querySelector("optgroup[data-favorites]");if(o){const e=Array.from(this._list.querySelectorAll('li[aria-selected="true"]')),n=new Set(e.map(e=>e.dataset.value));for(const e of this._select.querySelectorAll("option"))n.has(e.value)&&(e.selected=!0);o.remove()}if(t&&t.hasChildNodes()){const e=this._select.querySelector("option[data-all-types]"),n=this._select.querySelector("option[data-mirror]");e?e.after(t):n?n.after(t):this._select.prepend(t)}}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;d&&d.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);d=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})),d=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 n of this._getOptions())"true"!==n.getAttribute("aria-selected")||n.getAttribute("data-select-all")||e.add(n.getAttribute("data-value"));let n=!1;for(const t of(0,r.A)(this._select,"option")){const o=e.has(t.value);t.selected!==o&&(n=!0),t.selected=o}this._reorderSelectOptions(),n&&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,n=this._getOptionsUrl?this._getOptionsUrl(this._filter.value):null;if(!n||this._fetchOnce&&this._optionsLoaded)if(e&&!this._select.getAttribute("data-dynamic-value-generator")){const n=new RegExp(e.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");let t;for(const e of this._getOptions())n.test(e.textContent)?(e.hidden=!1,t||(t=!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,t=this._fetchOnce?this._getOptionsUrl(""):n,o=await fetch(t,{credentials:"include"});if(o.redirected&&o.url.includes(window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.auth.LogInPage"]))throw new Error("ComboInput: Redirected response received for options update.");const i=await o.text();if(this._getOptionsIndex===e){const e=[],n=new Set;!this._select.value&&this._select.firstChild&&(this._select.firstChild.selected=!0);for(const t of(0,r.A)(this._select,"option"))t.selected&&(e.push(t),n.add(t.value));this._select.innerHTML=i;for(const e of(0,r.A)(this._select,"option"))n.has(e.value)&&e.remove();const t=this._select.firstChild;for(const n of e)this._select.insertBefore(n,t);this._fetchOnce&&(this._optionsLoaded=!0)}}catch(e){console.error(e)}e&&0!==e.trim().length||this.populateFavorites()}}updateValue(e,n){const t=(0,i.A)(this._list,"[data-select-all=true]");if(this._select.multiple){if(t&&e===t.getAttribute("data-value"))t.setAttribute("aria-selected","true"!==t.getAttribute("aria-selected")),(0,r.A)(this._list,".ComboInput-option:not([data-select-all])").forEach(e=>{e.setAttribute("aria-selected",t.getAttribute("aria-selected"))});else{const n=CSS.escape(e),o=(0,i.A)(this._list,`.ComboInput-option[data-value="${n}"]`);if(!o)return;if(this._duplicates.has(e)){for(const e of this._duplicates.keys())if(this._duplicates.get(e).text===o.textContent){const n=(0,i.A)(this._list,`.ComboInput-option[data-value="${CSS.escape(e)}"]`);n.setAttribute("aria-selected","true"!==n.getAttribute("aria-selected"))}}else o.setAttribute("aria-selected","true"!==o.getAttribute("aria-selected"));t&&t.setAttribute("aria-selected",(0,r.A)(this._list,"[aria-selected=true]").length===this._getOptions().length);const a=o.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(n){(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 n of this._getOptions())"option"===n.getAttribute("role")&&(e===n.getAttribute("data-value")?n.setAttribute("aria-selected","true"):n.setAttribute("aria-selected","false"));this.hideList(),n?(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=>{d&&!d._container.contains(e.target)&&d.hideList()}))},13473(e,n,t){"use strict";t(49371),t(96648);var o=t(45055),i=t(22777);(0,o.A)(".CommunityWidget",e=>{const n=e.querySelectorAll(".LinkTable td form");n.length&&n.forEach(e=>{const n=e.querySelector(".CommunityWidget-actionsToggle"),t=e.querySelector(".CommunityWidget-actionsList");n.addEventListener("click",o=>{i.A.toggle(n,t,()=>e.classList.toggle("is-actionsMenuOpen"))}),t.querySelectorAll("li button").forEach(e=>{e.addEventListener("click",n=>{n.preventDefault();const t=e.closest("form");t.querySelector('input[name^="community.widget.workflow-transition"').value=e.getAttribute("value"),t.submit()})})})})},97139(e,n,t){"use strict";t(86634),t(57573),t(49371),t(26780),t(96648);var o=t(90127),i=t(92301),r=t.n(i),a=t(18101),s=t(60021),c=t(76394),d=t(39242),l=t(26179),p=t(60363),M=t(45055),u=t(23902),b=t(22777),h=t(39979),z=t(39403),O=t(28211),f=(t(42723),t(56065),t(94286));class m{static gcd(e,n){return n?m.gcd(n,e%n):e}static getObserver(){return this._observer??=new IntersectionObserver(e=>{for(const n of e){const e=n.target.querySelector(".Preview-overlayTooltip");if(n.isIntersecting)e?.setAttribute("position","top");else{if(null===n.rootBounds)return;const t=n.intersectionRect,o=n.boundingClientRect;o.bottom>t.bottom?e?.setAttribute("position","top"):o.top<t.top&&e?.setAttribute("position","bottom")}}},{threshold:1}),this._observer}constructor(){this.getPreviewFrame=e=>{let n;return e?n=document.querySelector(`iframe[data-container-id="${e}"]`):(n=document.querySelector(".ContentEdit-previewDisplay iframe:first-of-type"),n||(n=document.querySelector(".PreviewFrame-typeDisplay iframe:first-of-type"))),n},this.updateOverlays=(0,z.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 n=document.createElement("iframe");n.src="about:blank",n.style="visibility:hidden;",n.setAttribute("onload","this.style.visibility='visible';"),n.scrolling="no",n.classList.add("Preview-overlayFrame"),n.setAttribute("role","none");const t=this.getPreviewFrame(this._previewContainerId);t.parentNode.insertBefore(n,t.nextSibling),n?.contentDocument?.body.classList.add("overlay-hidden"),this._overlayWindow=n.contentWindow,m._previewOverlays.set(this._previewContainerId,this._overlayWindow),this._overlayFrame=n,Object.assign(n.style,{background:"none",backgroundColor:"transparent",transform:t.style.transform,width:t.style.width}),this._viewport=parseInt(t.style.width,10),this._deferred=!1,this._overlayWindow.addEventListener("message",async({data:e})=>{if("object"!=typeof e)return;const n=e.type;if("BSP.ContentEdit.UpdateOverlayBehaviors"===n){const n=this.Overlays.get(e.key);this.update(n,n.element,{behaviors:e.behaviors})}else"BSP.Preview.UpdateOverlays"===n?e.overlays.forEach(e=>{const{id:n,name:t}=e;this.Overlays.get(`${n}/${t}`).hasFormField=!0}):"BSP.Preview.UpdateInitToggle"===n&&(this._deferred=e.deferPreviewInit)}),this._overlayWindow.addEventListener("click",e=>{if(e.target.closest(".Preview-overlay")){const n=e.target.closest(".Preview-overlay"),t=n.dataset.id+"/"+n.getAttribute("data-type"),i=this.Overlays.get(t);i&&(this.update(i,i.element,{isSelected:!0}),this.Overlays.forEach((e,n)=>{e.element&&n!==t&&this.update(e,e.element,{isSelected:!1,isHover:!1})}),o(i))}else this.Overlays?.forEach(e=>{this.update(e,e.element,{isSelected:!1})})});const o=e=>{let n=e.parentKey,t=e,o=[];const{left:i,right:r}=e.element.getBoundingClientRect(),a=this._overlayWindow.innerWidth,s=i-e.depth*m._gapSize>=0&&r+e.depth*m._gapSize<=a;for(;null!==n;){const e=this.Overlays.get(n),i=t.element?.getBoundingClientRect();o.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}),n=e.parentKey,t=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 n=this._overlayWindow.document;if(e.target.closest(".Preview-overlay")){const t=[...n.elementsFromPoint(e.clientX,e.clientY)].find(e=>e.classList.contains("Preview-imageOverlay"));(t&&!t.isSameNode(a)||!t&&a)&&n.querySelectorAll(".Preview-imageOverlay.is-visible").forEach(e=>e.classList.remove("is-visible")),t&&t.classList.add("is-visible"),a=t}else a&&n.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 n=e.target,t=this._overlayWindow.document;this._pauseUpdate=!0;const a=t.querySelector(".Preview-overlay.is-selected");let c;if(a&&(c=a.dataset.id+"/"+a.getAttribute("data-type")),n.closest(".Preview-overlay")){const n=e.target.closest(".Preview-overlay"),t=n.dataset.id+"/"+n.getAttribute("data-type"),a=this.Overlays.get(t);if(a){this.update(a,a.element,{isHover:!0}),this.Overlays.forEach((e,n)=>{e.element&&n!==t&&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===t?(s.has(t)||s.add(t),o(r)):i&&e===a.parentKey&&s.has(t)?o(r):(o(a),r=a,s.clear(),s.add(t)),i=a}}else this.Overlays?.forEach((e,n)=>{e.element&&n!==c&&this.update(e,e.element,{isHover:!1,isVisible:!1,isSelected:e.isSelected})}),i=null,r=null,s.clear()}),n?.addEventListener("mouseleave",()=>{n?.contentDocument?.body.classList.remove("overlay-visible"),n?.contentDocument?.body.classList.add("overlay-hidden"),this._pauseUpdate=!1}),n?.addEventListener("mouseenter",()=>{n?.contentDocument?.body.classList.add("overlay-visible"),n?.contentDocument?.body.classList.remove("overlay-hidden"),this._pauseUpdate=!1}),this._updateInterval=setInterval(()=>{this._pauseUpdate||this.updateOverlays()},500),window.addEventListener("scroll",this.updateOverlays);const d=async()=>{const e=this._overlayWindow.document,n=e.documentElement,t=this.getPreviewFrame(this._previewContainerId),o=parseFloat(t.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,d=e.body;n.setAttribute("dir","ltr"),n.setAttribute("data-preview-overlay",!0),d.style.background="none",d.style.backgroundColor="transparent",d.style.visibility="hidden";const l=e.createElement("link");e.head.appendChild(l),l.setAttribute("href","https://fonts.googleapis.com/css?family=Noto+Sans:400,700");const p=l.relList;p&&p.supports("preload")?(l.setAttribute("as","style"),l.setAttribute("rel","preload"),l.setAttribute("onload",'this.rel="stylesheet"'),l.setAttribute("crossOrigin","anonymous")):l.setAttribute("rel","stylesheet"),n.style.setProperty("--PreviewScale",`${o}`),o<.6&&n.classList.add("should-upscale"),n.setAttribute("dir",r),a&&n.setAttribute("data-theme",a),s&&this._overlayWindow.localStorage.setItem("BSP.Theme",s),n.setAttribute("data-preview-field-placeholder",c);const M=(()=>{const e=window.document.head;let n=[];const t=e.querySelector('link[id="dist-v4-css"]'),o=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=t||o||e.firstChild;const s=r?r.nextSibling:i.nextSibling;for(;a!==s;)"SCRIPT"!==a.tagName&&"LINK"!==a.tagName||n.push({tag:a.tagName,ref:a.getAttribute("href")||a.getAttribute("src"),id:a.dataset.id,text:a.textContent,isv4:a===i||a===t}),a=a.nextSibling;return n})();await(async()=>{await Promise.all(M.map(async n=>{await(async n=>new Promise(t=>{const o=n.tag,i=n.ref,r=n.id;let a=null;"LINK"===o?(a=e.createElement("link"),a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),a.setAttribute("href",i),n.isv4?a.onload=()=>{t()}:t()):"SCRIPT"===o&&(a=e.createElement("script"),a.setAttribute("type","text/javascript"),a.innerText=n.text,i&&a.setAttribute("src",i),n.isv4?a.onload=()=>{t()}:t()),r&&a.setAttribute("id",r),e.head.appendChild(a)}))(n)})),d.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 d():await new Promise(e=>{this._overlayWindow.addEventListener("load",async()=>{await d(),e()})})}static async create(e){const n=new m;return await n.initialize(e),n}static getOverlayWindow(e){return m._previewOverlays.get(e)}reload(e,n,t){this._previewContainerId=n.previewContainerId,this._allOverlays=n.overlays,t&&t!==this._viewport&&(this._viewport=t,this.updateOverlays());const o=[...n.overlays.keys()];(e=new Map([...e.entries()].sort((e,n)=>e[1].parentKey===n[1].parentKey?o.indexOf(e[0])-o.indexOf(n[0]):e[0]===n[1].parentKey?-1:n[0]===e[1].parentKey?1:o.indexOf(e[1].parentRoot)-o.indexOf(n[1].parentRoot)))).forEach((e,n)=>{const t=this._allOverlays.get(n);if(t&&Object.assign(e,t),e.isShared||(e.linked=null),e.linked){const n=this._allOverlays.get(`${e.linked}`);n&&(e.dimensions=n.dimensions[`${e.linkedIdx}`]??e.dimensions)}}),this.Overlays?(e.forEach((e,n)=>{const t=this.Overlays.get(n);t?this.update(t,t.element,e):(this.Overlays.set(n,e),this.renderOverlay(e,n))}),this.Overlays.forEach((e,n)=>{const t=this._allOverlays.get(n);if(t){if(this.update(e,e.element,Object.assign({},t,{isRemoved:!1})),e.parentKey){const n=this.Overlays.get(e.parentKey);n&&this.update(n,n.element,{isRemoved:!1})}}else{if(e.parentKey&&this.Overlays.get(e.parentKey)){const n=this.Overlays.get(e.parentKey);let t=0;this.Overlays.forEach(n=>{n.parentKey&&n.parentKey===e.parentKey&&t++}),t<=1&&this.update(n,n.element,{isRemoved:!0})}this.update(e,e.element,{isRemoved:!0})}})):(this.Overlays=new Map(e),this.Overlays.forEach((e,n)=>{this.renderOverlay(e,n)})),this.ImageTooltips=new Map(n.imageData),this._overlayWindow.document.querySelectorAll(".Preview-imageOverlay").forEach(e=>{e.parentNode.removeChild(e)}),this.ImageTooltips.forEach((e,n)=>{this.renderImageTooltip(e)})}destroy(){clearInterval(this._updateInterval)}updateLabel(e,n){const t=e.querySelector(".Preview-overlayLabel");if(!t)return;t.textContent=n;const o=e.getBoundingClientRect().height,{height:i}=t.getBoundingClientRect();t.style.top=i>=o?`-${t.getBoundingClientRect().height}px`:"0px"}update(e,n,t,o){if(!n)return;let i=Object.assign(e,Object.fromEntries(Object.entries(t).filter(([e,n])=>null!=n)));if(i.isShared?(n.classList.add("is-shared"),n.dataset.editAction=i.isShared):(n.classList.remove("is-shared"),delete n.dataset.editAction),!0===i.isLocked?n.classList.add("is-locked"):!1===i.isLocked&&n.classList.remove("is-locked"),!0===i.isRoot)e.depth=1,n.classList.add("is-root");else if(!1===i.isRoot){const t=this.Overlays.get(e.parentKey);e.depth=t?.depth+1,e.parentRoot=t?.parentRoot,t?.isSelected&&(n.classList.add("is-visible"),e.isVisible=!0)}!0===i.isVisible?n.classList.add("is-visible"):!1===i.isVisible&&n.classList.remove("is-visible"),!0===i.isSelected?n.classList.add("is-selected"):!1===i.isSelected&&n.classList.remove("is-selected"),!0===i.isHover?n.classList.add("is-hover"):!1===i.isHover&&n.classList.remove("is-hover"),!0===i.isEmpty?n.classList.add("is-empty"):!1===i.isEmpty&&(this.updateLabel(n,e.label||e.name),n.classList.remove("is-empty")),!0===i.isRemoved?n.classList.add("is-removed"):n.classList.remove("is-removed"),this.setDimensions(e,o)}renderImageTooltip(e){const n=this._overlayWindow.document.body,t=document.createElement("div");t.classList.add("Preview-imageOverlay");const o=document.createElement("div");if(o.className="Preview-overlayTooltip",o.innerHTML="<b>Image</b>",e){const n=+e.width,t=+e.height;let i=null;if(o.classList.add("is-grid"),o.append((0,a.A)("span",(n>0?n:"auto")+" x "+(t>0?t:"auto"))),n>0&&t>0){const e=m.gcd(n,t);e>0&&(i=`${n/e}:${t/e}`)}o.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):"")}t.append(o),n.prepend(t),window.requestAnimationFrame(()=>{const{x:n,y:o,width:i,height:r}=e.rect,a=n+window.scrollX;Object.assign(t.style,{height:r,left:a,position:"absolute",top:o+window.scrollY,width:i})}),this.constructor.getObserver().observe(t)}renderOverlay(e){const n=this._overlayWindow.document,t=n.body,o=!!e.isEmpty,{id:i,name:r,type:s}=e;if(!i||!r)return;if("bspField"===s&&!e.dimensions&&!o)return;const c=n.createElement("div");c.classList.add("Preview-overlay"),c.dataset.id=i,c.dataset.type=r;const d=window.parent.parent;c.onclick=n=>{if(d){const n=c.dataset.type;let t=new Map;this.Overlays?.forEach((e,n)=>{if(e.isRoot){const e=this._allOverlays.get(n);e&&(e.isRoot=!0,t.set(n,e))}});let o=e.hasFormField,i=e.parentKey,r=[];for(;!o&&i;){const e=this.Overlays.get(i);r.push({id:e.id,name:e.name,type:e.type,isShared:e.isShared,parentKey:e.parentKey}),o=e.hasFormField,i=e.parentKey}d.postMessage({type:"BSP.Preview.OverlayClick",id:c.dataset.id,label:c.label,name:n.split("/")[0],behavior:c.dataset.editAction,overlayType:e.type,previewContainerId:this._previewContainerId,overlays:this._allOverlays,parentFields:r.reverse(),rootOverlays:t,isEnhancement:e.isEnhancement,hasFormField:e.hasFormField},"*")}},c.querySelector(".Preview-overlayLabel")?.remove();const l=(0,a.A)("div",{className:"Preview-overlayLabel"},e.label||e.name);c.appendChild(l);let p=null;"bspModule"!==e.type||e.isShared||(p=t.querySelector(`.Preview-overlay[data-id="${e.id}"]`)),p?t.insertBefore(c,p):(p=!e.isShared&&t.querySelector(".Preview-overlay.is-shared"),p?t.insertBefore(c,p):t.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,n){const t=e.dimensions,o=e.element;if(!o)return;const i=n=>{const{x:t,y:i,width:r,height:a}=n,s=t+window.scrollX,c=s+r;Object.assign(o.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(t&&"bspField"===e.type&&(!e.children&&!e.fieldValue||e.isShared))i(t);else{const n=[...this.Overlays.values()].filter(n=>n.parentKey===e.id+"/"+e.name&&n.dimensions&&!Array.isArray(n.dimensions));if("bspModule"===e.type&&e.dimensions?.length)e.dimensions.forEach(e=>{i(e)});else if(n.length){let e=null,t=null,i=null,r=null;n.forEach(n=>{const o=n.dimensions;o&&(e=null!==e?Math.min(e,o.top):o.top,t=null!==t?Math.min(t,o.left):o.left,i=null!==i?Math.max(i,o.bottom):o.bottom,r=null!==r?Math.max(r,o.right):o.right)}),Object.assign(o.style,{width:r-t,left:t,position:"absolute",top:e,height:i-e})}else t&&i(t)}if(n){const{updateWidth:e,maxWidth:t}=n,{top:i,bottom:r,left:a,right:s}=o.getBoundingClientRect();let c=i,d=r,l=a,p=s;i>=n.top&&(c=n.top-m._gapSize),r<=n.bottom&&(d=n.bottom+m._gapSize),o.style.top=c,o.style.height=d-c,e&&(a>=n.left&&(l=n.left-m._gapSize),s<=n.right&&(p=n.right+m._gapSize),l>=0&&p<=t&&(o.style.left=l,o.style.width=p-l))}}}m._previewOverlays=new Map,m._gapSize=15;var g=t(79365);function A(e,n){if(!n.once||!n.hasExecuted)try{n.callback(e),n.hasExecuted=!0,n.once&&n.subscription&&(n.subscription.remove(),n.subscription=null)}catch(e){console.error("onRTEReady callback failed",e)}}const w=window.BRIGHTSPOT?.ui.tooltips;function v(e,n){const t=e.querySelector(n)?.htmlFor;t&&document.getElementById(t)?.focus()}const q=new Map;let k=0;function _(e,n,t){if(n){for(const o of(0,c.A)(n,t))e.appendChild("li"===t?o:(0,a.A)("li",{},o));n.remove()}}(0,M.A)([".ContentEdit.is-new",".StandardForm.is-new"],e=>{if(document.querySelector(".Admin-nav"))return;const n=e.querySelector(".CIG:not(:empty)");if(!n)return;let t;for(const e of n.querySelectorAll(":scope > [data-tab]")){const o=e.dataset.tab;if(t){if(t!==o)return void(0,M.A)(n,":scope > .TabBar",e=>{v(n,`: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 t=o}v(n,":scope > .CIG-row:not(.inputContainer-readOnly) > .CIG-label > label")}),(0,M.A)('.Popup[data-popup-source-class*="ContentSelector-edit"] button.Popup-heading',e=>{e.focus()}),(0,M.A)(".ContentEdit-top .Message",e=>{const n=e.closest(".ContentEdit").querySelector(".ContentEdit-main > .ContentEdit-title");n.parentNode.insertBefore(e,n.nextSibling)}),(0,M.A)(".ContentEdit",e=>{const n=e.closest(".Popup-content");n?n.classList.add("is-editing"):document.body.classList.add("is-editing");const t=(0,s.A)(e,".widget-publishing");if(!t)return;const o=(0,a.A)("ul",{className:"ContentEdit-controlsList",role:"menu","aria-label":w.actions?.contentEdit}),i=new MutationObserver(e=>{e.forEach(e=>{const n=e.target,t=n.classList.contains("is-locked");n.querySelectorAll("[accesskey]").forEach(e=>{t?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"),d=(0,s.A)(c,['[name="action-draft"]','[name="action-newDraft"]']),l=(0,s.A)(r,".ContentEdit-workflow")||(0,s.A)(r,".ContentEdit-publish");if(null!==d){const n=d.cloneNode(!0);"action-draft"===n.name&&n.addEventListener("click",()=>{const n=e.querySelector('input[name="publishDate"]');n&&(n.value="")}),l?r.insertBefore(n,l):r.appendChild(n),d.closest(".ContentEdit").classList.contains("is-new")||"action-draft"===d.getAttribute("name")?d.parentNode.remove():n.style.display="none"}_(o,(0,s.A)(e,".widget-contentCreate"),"li"),_(o,c,"li"),_(o,(0,s.A)(e,".widgetControls"),"a"),_(o,(0,s.A)(e,".widget-publishingExtra-right"),"li"),_(o,(0,s.A)(e,".widget-publishing > .widget-controls"),"a");const p=(0,s.A)(o,".widgetControlsEditInFull");p&&!e.closest(".Popup")&&p.closest("li").remove();const M=(0,a.A)("div",{className:"ContentEdit-controls"}),u=(0,a.A)("button",{className:"ContentEdit-controlsToggle",type:"button",title:w.actions?.actions,"aria-haspopup":"menu","aria-expanded":"false","aria-label":w.actions?.contentEdit,onclick:()=>{(0,g.AM)(o,u,M)}});(0,g.D1)(o,u),M.appendChild(u),M.appendChild(o),M.setAttribute("data-tether-anchor",""),t.appendChild(M)}),(0,M.A)(".ContentEdit-controlsList .DraftAndReturnAction",e=>e.setAttribute("aria-hidden","true")),(0,M.A)(".ContentEdit-controlsList .NewDraftAndReturnAction",e=>e.setAttribute("aria-hidden","true")),(0,M.A)(".ContentEdit-restore",e=>{const n=e.closest(".ContentEdit-controls");n.parentNode.insertBefore(e,n);const t=(0,a.A)("div",{className:"ContentEdit-restoreToggle",onclick:()=>{b.A.toggle(t,e,()=>e.classList.toggle("is-open",t.classList.toggle("is-open")))}},e.getAttribute("data-restore-label")||"restore");e.parentNode.insertBefore(t,e)}),(0,M.A)(".ContentEdit-workflow",e=>{const n=e.closest("btu-dialog");e.setAttribute("hidden","");const t=e=>{"Escape"===e.key?(n?.close(e),l.click(),l.focus()):"Tab"!==e.key||document.activeElement.closest(".ContentEdit-workflow.is-open")||document.activeElement.closest(".Popup.is-calendar")||document.activeElement.matches(".Page")||document.activeElement===l||l.click()},o=e=>{if(window.BRIGHTSPOT?.ui.cms.enableV5UI)return;const n=e.target.closest(".Popup"),t=(0,s.A)(document,".ProseMirror-fullscreen-container:not(.hide)");(n&&!e.target.matches(".Popup-close")||t&&e.target.closest(".ProseMirrorToolbar-action")||e.target.closest(".ProseMirror-fullscreen-container")||e.target.matches(".rte2-toolbar-fullscreen"))&&l.click()},i=(0,s.A)(e,".ContentEdit-workflowWrapper > .ContentEdit-workflowBody");let r=0;const d=(0,s.A)(e.parentNode,".ContentEdit-publish"),l=(0,a.A)("button",{"aria-expanded":!1,"aria-haspopup":!0,className:"ContentEdit-workflowToggle",onclick:()=>{if(b.A.toggle(l,e,()=>{const n=l.classList.toggle("is-open"),i=(0,s.A)(document,".Popup"),r=(0,s.A)(document,".ProseMirror-fullscreen-container:not(.hide)");return n?(e.removeAttribute("hidden"),window.addEventListener("keyup",t),window.addEventListener("click",o)):(window.removeEventListener("keyup",t),i||r||window.removeEventListener("click",o)),l.setAttribute("aria-expanded",n?"true":"false"),e.classList.toggle("is-open",n)}),d)for(const n of(0,c.A)(e,".ContentEdit-workflowWrapper"))n.classList.toggle("is-active","workflow"===n.getAttribute("data-name"))},type:"button"},e.getAttribute("data-workflow-label")||"Workflow");e.parentNode.insertBefore(l,e),e.closest(".ContentEdit").classList.add("is-workflow");const p=e.querySelectorAll('.ContentEdit-workflowActions button[name="action-workflow"]');if(e.querySelector(".ContentEdit-workflowActions button[data-workflow-comment-required]")&&(0,M.A)('.CIG-row[data-field-name="comment"] > .AutoExpand > textarea',e=>{e.addEventListener("input",()=>{p.forEach(n=>{n.disabled?""!==e.value.trim()?n.removeAttribute("disabled"):n.setAttribute("disabled","true"):""===e.value.trim()&&n.setAttribute("disabled","true")})})}),d){(0,s.A)(e,'.ContentEdit-workflowWrapper[data-name="publishOverride"] > .ContentEdit-workflowBody').appendChild(d),e.classList.add("is-publishOverride");for(const n of(0,c.A)(e,".ContentEdit-workflowWrapper > .ContentEdit-workflowLink"))n.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),"workflow"===n.parentNode.getAttribute("data-name")&&(r=i.offsetHeight+"%");for(const t of(0,c.A)(e,".ContentEdit-workflowWrapper"))t.classList.toggle("is-active",t.getAttribute("data-name")===n.getAttribute("data-action")),t.classList.contains("is-active")&&t.querySelector(".DateTimeInput, .AutoExpand textarea")?.focus();(0,s.A)(e,'.ContentEdit-workflowWrapper:not([data-name="workflow"]) > .ContentEdit-workflowBody').style.height=r})}}),(0,M.A)(".ContentEdit-publish .ContentEdit-publishButton",e=>{const n=e.closest(".ContentEdit-publish"),t=n.querySelector('input[name="publishDate.date"]'),o=n.querySelector('input[name="publishDate.time"]');if(!t||!o)return;const i=n.querySelector(".DateTimeInput"),r=(0,s.A)(e.parentNode.parentNode,".ContentEdit-overrideMessage"),a=e.textContent;function c(){t.value&&o.value?(n.classList.add("is-scheduling"),e.innerText=e.getAttribute("data-schedule-label"),i.classList.remove("is-empty")):(n.classList.remove("is-scheduling"),e.innerText=a,i.classList.add("is-empty")),r&&(r.innerHTML=n.classList.contains("is-scheduling")?r.getAttribute("data-schedule-message"):r.getAttribute("data-publish-message"))}c(),t.addEventListener("change",c),o.addEventListener("change",c);const d=n.querySelector('select[name="newSchedule"]');d&&d.addEventListener("change",c)}),(0,M.A)(".ContentEdit-workflowActions .ContentEdit-publishButton",e=>{const n=e.closest(".ContentEdit-workflowActions"),t=n.querySelector("input.ContentEdit-workflowScheduleDate"),o=n.querySelector("input.ContentEdit-workflowScheduleTime");if(!t||!o)return;const i=n.querySelector(".ContentEdit-workflowScheduleLink"),r=e.textContent;function a(){t.value&&o.value?(n.classList.add("is-scheduling"),e.innerText=e.getAttribute("data-schedule-label"),i&&i.classList.remove("is-empty")):(n.classList.remove("is-scheduling"),e.innerText=r,i&&i.classList.add("is-empty"))}a(),t.addEventListener("change",a),o.addEventListener("change",a)});const y=window.localStorage;let W=0;(0,M.A)(".ContentEdit",e=>{if(!e.querySelector(".ContentEdit-top"))return;const n=e.getAttribute("data-object-id"),t=e.closest(".Page-content, .Popup");if(!t)return;const i=t.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(()=>{x(n)?.contentWindow?.postMessage({type:"BSP.ContentEdit.ViewportDeviceChanged"},"*")})}),e.closest(".Page.is-previewToEdit")&&t.setAttribute("data-preview-menu",!1);const s=(0,z.A)(()=>{const e=a.querySelector(".PreviewFrame-typeDisplay");if(e){const n=e.querySelectorAll("iframe");if(n.length<1)return;const o=n[0],i=r.querySelector(".deviceWidthSelect");let s=o.getBoundingClientRect().width;if(o.style.transform="",o.style.width="",i){if(t){t.style.removeProperty("--ContentEdit-previewWidth");const e=i.options[i.selectedIndex];e&&(s=parseInt(e.getAttribute("data-device-width"),10),o.style.width=`${s}px`,s<r.getBoundingClientRect().width&&t.style.setProperty("--ContentEdit-previewWidth",`${s}px`))}}else t&&(t.style.removeProperty("--ContentEdit-previewWidth"),o.style.width="",s=1920);k=s;const c=e.clientWidth/s;o.style.transform=`scale(${c})`,o.setAttribute("previewScale",c),o.style.setProperty("--PreviewFrame-scale",c),m.getOverlayWindow(a.querySelector(":scope iframe:first-of-type").getAttribute("data-container-id"))?.dispatchEvent(new Event("resize"))}});let c=new O.A(r,s);const d=function(){window.addEventListener("resize",s),e.addEventListener("brightspot-content-state-change",()=>c.updatePreview())};window.ContentEditFields=new Map;const l=t.querySelector(".content-edit > .ContentEdit .ContentEdit-left");l&&(0,M.A)(l,'.inputContainer[data-tab="Main"]:not([type="hidden"])',e=>{const n=e.dataset.name;e.closest(".TC-unselected")&&window.ContentEditFields.has(n)?window.ContentEditFields.delete(n):window.ContentEditFields.set(n,e)}),(0,M.A)(e,":scope .ContentEdit-previewButton",n=>{n.type="button",n.ariaLabel=t.classList.contains("is-previewing")?w.preview.close:w.preview.open,n.title=n.ariaLabel;const r=n.closest(".ContentEdit-toolbar");n.onclick=function(){if(t.classList.toggle("is-previewing")){t.classList.contains("Popup")&&t.querySelector(":scope > .Popup-content")?.classList.add("is-previewing"),c.isVisible=!0,i.removeAttribute("inert"),n.title=w.preview.close,n.ariaLabel=w.preview.close,(0,o.iP)(w.preview.opened),y.removeItem("BSP.ContentEdit.previewClosed"),c.reloadPreview(),d();const a=r.querySelector("button.is-active[data-right-tab]");if((!window.BRIGHTSPOT?.ui?.cms?.enableV5UI||t.offsetWidth<900)&&a){const n=e.querySelector(`.ContentEdit-right[data-right-tab="${a.dataset.iconButtonName}"]`);T(a,n,{container:t,updateStorage:!0})}}else t.classList.contains("Popup")&&t.querySelector(":scope > .Popup-content")?.classList.remove("is-previewing"),c.isVisible=!1,i.setAttribute("inert",""),n.title=w.preview.open,n.ariaLabel=w.preview.open,(0,o.iP)(w.preview.closed),y.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")&&!y.getItem("BSP.ContentEdit.previewClosed")&&!t.classList.contains("is-previewing")?(n.title=w.preview.close,n.onclick()):t.classList.contains("is-previewing")&&(c.isVisible||(c.isVisible=!0),c.updatePreview(),d(),i.removeAttribute("inert"))})}),(0,M.A)(".ContentEdit",e=>{const n=e.querySelector(".ContentEdit-top");if(!n)return;const t=e.closest(".Page-content, .Popup");if(!t)return;const o=t.querySelector(".ContentEdit-preview");if(!o)return;let i=o.querySelector(".ContentEdit-previewControls");if(!i)return;let r=i.querySelector("form[id]");if(!r)return;let s=r.querySelector('input[name="_previewObject"]');const d=o.querySelector(".ContentEdit-previewDisplay");if(!d)return;const l=o.querySelector(".ContentEdit-previewTypes");let p=!0;const b=e.getAttribute("data-object-id");e.closest(".Page.is-previewToEdit")&&t.setAttribute("data-preview-menu",!1),(0,M.A)(".ContentEdit-preview",e=>{(0,M.A)(e,[".widget-preview > .ContentEdit-previewControls",'.frame.loaded[name^="previewControls"] .ContentEdit-previewControls'],e=>{const n=e.querySelector("form:last-of-type");if(n){const e=(0,a.A)("div",{class:"ContentEdit-secondaryPreviewControls"});(0,M.A)(n,":scope select:not(.deviceWidthSelect) + .ComboInput",n=>{e.appendChild(n)}),n.appendChild(e)}})}),e.addEventListener("brightspot-content-state-change",e=>{for(const n of(0,c.A)(i,'input[name="_previewObject"]'))n.value=e.detail});const O=document.createElement("A");O.className="ContentEdit-previewButton",O.href="#";const f=(0,a.A)("div",{className:"ContentEdit-previewButtonWrapper"},[(0,a.A)("div",{className:"ContentEdit-previewButtonCircle"}),O]),m=(0,z.A)(()=>{const e=d.querySelectorAll("iframe");if(e.length<1)return;const n=e[0],i=document.querySelector(".deviceWidthSelect");let r=n.getBoundingClientRect().width;if(n.style.transform="",n.style.width="",t.style.removeProperty("--ContentEdit-previewWidth"),i){const e=i.options[i.selectedIndex];e&&(r=parseInt(e.getAttribute("data-device-width"),10),n.style.width=`${r}px`,r<o.getBoundingClientRect().width&&t.style.setProperty("--ContentEdit-previewWidth",`${r}px`))}k=r,n.style.transform=`scale(${d.clientWidth/r})`});window.ContentEditFields=new Map;const g=t.querySelector(".content-edit > .ContentEdit .ContentEdit-left");g&&(0,M.A)(g,'.inputContainer[data-tab="Main"]:not([type="hidden"])',e=>{const n=e.dataset.name;e.closest(".TC-unselected")&&window.ContentEditFields.has(n)?window.ContentEditFields.delete(n):window.ContentEditFields.set(n,e)});const A=(0,h.A)(1e3,()=>{if(s&&""===s.value)return;const e=document.createElement("IFRAME");e.name="ContentEdit-previewFrame"+W++,d.insertBefore(e,d.firstChild),e.setAttribute("data-container-id",b);const n=e.closest(".Popup"),t=(e=null)=>{const t=n??document;t.querySelector(".ContentEdit-previewButtonWrapper")?.classList.toggle("is-animating",e)};t(!0),m(),e.onload=function(){const n=[];for(let t=e;t=t.nextElementSibling;)"IFRAME"!==t.tagName||t.classList.contains("Preview-overlayFrame")||n.push(t);const o=e.parentNode;n.forEach(e=>o.removeChild(e)),t(!1)},(0,u.A)(e,()=>t(!1)),r.target=e.name,r.submit()}),w=function(){window.addEventListener("resize",m),e.addEventListener("brightspot-content-state-change",A)},v=function(){window.removeEventListener("resize",m),e.removeEventListener("brightspot-content-state-change",A)};l&&(0,M.A)(".ContentEdit-previewTypesForm",e=>{const n=e.querySelector('select[name="previewType"]');p="true"===n.selectedOptions[0].getAttribute("data-refresh"),n.onchange=function(){d.innerHTML="",p="true"===n.selectedOptions[0].getAttribute("data-refresh"),A()};const o=l.querySelector('div[name^="previewControls"]');o.onload=function(){const e=s?.value;i=o.querySelector(".ContentEdit-previewControls"),r=i.querySelector("form[id]"),s=r.querySelector('input[name="_previewObject"]'),s&&""===s.value&&(s.value=e),t.classList.contains("is-previewing")&&(p||"true"===n.options[n.selectedIndex].getAttribute("data-refresh"))?(A(),w()):v()}}),O.onclick=function(){return t.classList.toggle("is-previewing")?(y.removeItem("BSP.ContentEdit.previewClosed"),y.removeItem("BSP.ContentEdit.rightPanel"),window.BRIGHTSPOT?.ui?.cms?.enableV5UI||t.style.setProperty("--ContentEdit-rightWidth","0px"),o.removeAttribute("inert"),p&&(A(),w())):(y.setItem("BSP.ContentEdit.previewClosed",1),o.setAttribute("inert",""),p&&(v(),setTimeout(function(){d.querySelectorAll(":scope > iframe").forEach(e=>e.remove())},500))),!1},n.insertBefore(f,n.firstChild),window.innerWidth>=768&&!o.classList.contains("is-previewClosedByDefault")&&!y.getItem("BSP.ContentEdit.previewClosed")&&O.onclick()}),(0,M.A)(".ContentEdit-title",e=>{const n=e.closest("form");if(!n)return;n.insertAdjacentElement("afterbegin",e);const t=(0,s.A)(e.closest(".content-edit"),".ContentEdit-overlayList");if(!t)return;e.insertBefore((0,a.A)("button",{className:"ContentEdit-overlay",type:"button","aria-haspopup":"true","aria-expanded":"false","aria-label":(0,s.A)(t,"li.selected").textContent,onclick:e=>{(0,g.AM)(t,e.target)}},(0,s.A)(t,"li.selected").textContent),e.firstChild);const o=e.querySelector(".ContentEdit-overlay");(0,g.D1)(t,o)});const x=e=>{let n;return e?n=document.querySelector(`iframe[data-container-id="${e}"]`):(n=document.querySelector(".ContentEdit-previewDisplay iframe:first-of-type"),n||(n=document.querySelector(".PreviewFrame-typeDisplay iframe:first-of-type"))),n};(0,M.A)(".CIG > .TabBar",e=>{const n=e.closest(".CIG");(0,M.A)(n,".CIG-row.is-overlaid",t=>{const o=t.dataset.tab,i=(0,s.A)(e,`:scope > .TabBar-item[data-tab="${o}"]`);if(!i)return;let r=0;for(const e of(0,c.A)(n,`:scope > [data-tab="${o}"]`))r+=e.classList.contains("is-overlaid")?1:(0,c.A)(e,".is-overlaid").length;const d=(0,s.A)(i,":scope > .Badge");r>0?d?d.textContent=r:(0,p.A)((0,a.A)("div",{className:"Badge"},r),i):d.remove()})}),(0,M.A)([".Page-content .publishing-workflow",".Popup .publishing-workflow"],e=>{const n=(0,s.A)(e,":scope > .progress"),t=(0,s.A)(e,":scope > ul"),o=(0,s.A)(t,".icon-step-forward"),i=(0,s.A)(t,".icon-stop");e.closest(".Page-content, .Popup").classList.add("is-workstream"),e.classList.add("ContentEdit-workstreamMessage"),e.removeAttribute("style"),n.classList.add("ContentEdit-workstreamProgressText"),n.removeAttribute("style"),t.classList.add("ContentEdit-workstreamActions"),o.classList.add("ContentEdit-workstreamSkip"),i.classList.add("ContentEdit-workstreamStop"),(0,l.A)(e,(0,d.A)((0,a.A)("div",{className:"ContentEdit-workstream"},(0,a.A)("div",{className:"ContentEdit-workstreamProgress"},(0,s.A)(n,":scope > .progressBar"),n),t),e))});const L=(e,n)=>{const t=(0,s.A)(document,`.CIG-row[data-name='${e}/${n}']`),o=(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(t){const o=t.querySelector(`:scope .RCS ol[data-sortable-input-name='${e}/${n}']`);return o?{type:"RCS",element:o}:{type:"CIG",element:t}}return i?{type:"OPTION",element:i}:r?{type:"ENHANCEMENT",element:r}:o?{type:"EIG",element:o}:a?{type:"RCIG",element:a}:(console.debug("Form element does not exist for the preview overlay"),null)},C=(e,n,t,o)=>{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=()=>{n.classList.remove("is-visible"),r.removeChild(p),M&&r.removeChild(M);const t=e.classList.contains("RCS-item")&&e.querySelector(":scope > .ContentSelector-clear");t&&t.classList.remove("is-visible"),i.insertBefore(e,s),r.remove()},d=(0,a.A)("div",{className:"Preview-popupCancel",onclick:e=>{c()}}),l=document.createElement("button");l.classList.add("is-save"),l.classList.add("is-dominant"),l.textContent="Save & Close";const p=(0,a.A)("div",{className:"ActionBar"});let M;p.appendChild(l),o&&(M=(0,a.A)("div",{className:"Preview-popupHeading"},o)),r=(0,a.A)("div",{className:"Preview-popup is-previewEditing"},M,e,d,p),t.appendChild(r),l.addEventListener("click",e=>{c()}),n.classList.add("is-visible")};window.addEventListener("message",async({data:e})=>{if("object"!=typeof e)return;const n=e.id,t=e.type,o=e.name;if("BSP.Preview.onChangedHeight"===t){const n=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(n){const t=n.closest(".Page-content, .Popup"),o=t?.querySelector(".ContentEdit-preview");o?.style.setProperty("--PreviewFrame-height",`${e.height}px`)}}else if("BSP.Preview.OverlayClick"===t){const t=e.parentFields,i=e.hasFormField,a=()=>{const a=L(n,o);if(!a)return;(0,c.A)(document.body,".RCIG-item").forEach(e=>{const n=(0,s.A)(e,":scope > .RCIG-title");n&&(e.contains(a.element)||e.isEqualNode(a.element)?e.classList.contains("is-collapsed")&&n.click():e.classList.contains("is-collapsed")||n.click())});const d=a.element.closest(".CIG-row");if(d&&d.classList.contains("is-inHiddenCluster"))for(let e=d;e=e.previousElementSibling;)if(e.classList.contains("CIG-title")){e.click();break}(e=>{if(!e)return;let n=e,t=null,o=[];const i=function(e){return e?e.closest("[data-tab]"):null};for(;t=i(n),t;){const e=t.getAttribute("data-tab"),i=t.parentNode.querySelector(":scope > .TabBar");i&&o.push(i.querySelector(`[data-tab="${e}"]`)),n=t.parentNode}return o})(a.element).forEach(e=>{e&&!e.classList.contains("is-selected")&&e.click()});const l=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,M.A)(e,[":scope > btu-input input",":scope > textarea",":scope > btu-textarea-input > textarea",":scope > .ComboInput",":scope > input"],n=>{const t=e.querySelector(".ProseMirrorContainer > .ProseMirror");t?t.focus():n.focus()})}else if("RCS"===a.type){const e=a.element.closest(".CIG-small");if(e.classList.contains("RCS")){let n=a.element.closest(".RCS-item")??e;r()(n,{align:{top:0,topOffset:10}}),n.dispatchEvent(l)}else e&&(0,M.A)(e,":scope > .ComboInput",e=>{e.focus()}),r()(a.element.closest(".CIG-row"),{align:{top:0,topOffset:10}});a.element.dispatchEvent(l)}else if("OPTION"===a.type){const e=a.element.closest(".CIG-small");if(e.classList.contains("RCS")){let n=a.element.closest(".RCS-item")??e;r()(n,{align:{top:0,topOffset:0}}),n.dispatchEvent(l)}else e&&(0,M.A)(e,":scope > .ComboInput",e=>{e.focus()}),r()(a.element.closest(".CIG-row"),{align:{top:0,topOffset:10}});a.element.dispatchEvent(l)}else if("RCIG"===a.type)r()(a.element,{align:{top:0,topOffset:10}});else if("ENHANCEMENT"===a.type){let e,n=0;const t=a.element.closest(".ProseMirrorContainer");t&&(n=t.querySelector(".ProseMirrorToolbar")?.offsetHeight);let o=parseInt(window.getComputedStyle(a.element).marginTop);isNaN(o)||(e=Math.abs(n-o)),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 n=e.querySelector(".ContentSelector-edit");n?.click()}i||(t.push({id:e.id,name:e.name}),m.getOverlayWindow(e.previewContainerId).postMessage({type:"BSP.Preview.UpdateOverlays",overlays:t},"*"))},d=n=>{const t=n.key,{id:o,name:i,overlayType:r,isEnhancement:s}=e;let c;s?c=`.CIG-row[data-name='${t}'] .ProseMirrorContainer`:"bspField"===r?c=`.CIG-row[data-name='${o}/${i}']`:"bspModule"===r&&(c="RCS"===n.ui.type?`input.objectId[value="${o}"]`:`.repeatableLabel[data-object-id="${o}"]`),(0,M.A)(c,()=>{a()})};if(i)a();else{let n=[];t.forEach((t,o)=>{const{id:i,name:a,type:s}=t;let c="";"bspField"===s?c=`.CIG-row[data-name='${i}/${a}']`:"bspModule"===s&&(c=`.repeatableLabel[data-object-id="${i}"]`);const d=(n,t)=>{(0,M.A)(c,()=>{let o=L(i,a);if(!o)return void t("Could not load edit ui: fields for one or more parent overlay(s) are missing in the form");const s=o.element;r()(s,{align:{top:0,topOffset:10}}),e.isEnhancement&&function(n,t){const{once:o=!0}={},i="string"==typeof t?document.querySelector(t):t;if(!(i instanceof HTMLTextAreaElement))return()=>{};const a={callback:n=>{const t=n.view.dom.querySelector(`[data-state*='_id":"${e.id}']`);t&&(r()(t),t.click())},once:o,hasExecuted:!1,subscription:null};return null!==(s=i)&&"rte"in s&&"object"==typeof s.rte&&i.rte.loaded&&(A(i.rte,a),o)?()=>{}:(a.subscription=window.PubSub.subscribe("rteLoaded",e=>{e.ctx===i&&A(e,a)}),()=>a.subscription?.remove());var s}(0,s.querySelector("textarea.richtext")),"RCIG"===o.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}n&&n({ui:o,key:i+"/"+a})})};n.push(new Promise((e,n)=>{d(e,n)}))}),Promise.all(n).then(e=>{const n=e[e.length-1];d(n)}).catch(e=>{console.debug(e)})}}else if("BSP.Preview.ContentLoad"===t){const n=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`),t=n?.closest(".Page-content.is-previewing")||n?.closest(".Popup.is-previewing"),o=document.activeElement;let i=o.closest(".Preview-overlayFrame")||o.closest(`iframe[data-container-id="${e.previewContainerId}"]`),r=!t||!i;const a=x(e.previewContainerId);a?.contentWindow.postMessage({type:"BSP.Preview.UpdateInitToggle",deferPreviewInit:r},"*");let s=m.getOverlayWindow(e.previewContainerId);s?.postMessage({type:"BSP.Preview.UpdateInitToggle",deferPreviewInit:r},"*")}else if("BSP.Preview.DOMParsed"===t){const n=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(!n?.closest(".Page-content.is-previewing")&&!n?.closest(".Popup.is-previewing"))return;let t=new Map;const o=(e,n,o)=>{t.set(e,n),o&&("bspModule"!==o.type||o.dimensions||(o.childKeys?o.childKeys.push(e):o.childKeys=[e]))},i=(n,r,a,s,c)=>{const d=n===e.previewContainerId,l=t.get(c),p=r.querySelector(`.RCIG-title[data-object-id="${n}"]`),M=r.querySelector(`.EIG-title[data-object-id="${n}"]`);let u,b;const h=r.querySelector(`.objectInputs[data-object-id="${n}"]`);if(!p&&!M||h){let t=a,l=s;if(b=h||r,u=[...b.querySelectorAll(`div.inputContainer[data-name^="${n}"]:not([hidden])`)].filter(e=>!e.closest(".TC-unselected")),p||M){const n=e.overlays.get(c);l=c;let i={id:c.split("/")[0],hasFormField:!0,parentKey:s,parentRoot:a.parentRoot,depth:a.depth+1,type:"bspModule",name:c.split("/")[1]};n&&(i=Object.assign(i,n)),o(c,i,t),t=i}u.forEach(n=>{const a=n.dataset.name;let s;const c=e.overlays.get(a);let p,M;if(!c||c.isEmpty)return;if("bspField"===c.type){p=!d&&n.querySelector(`select[name="${a}.id"]`),M=n.querySelector(`select[name="${a}.id"]`);const e=R(a,n,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:N(n),isInitialized:!0,depth:d?1:t.depth+1,parentRoot:d?a:t.parentRoot,parentKey:d?null:l,hasFormField:!0,isDropdown:M},c),p||o(a,s,t)}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:d?1:t.depth+1,parentRoot:t.parentRoot,parentKey:l,hasFormField:!0},c),o(a,s,t))});let u=[];s.children?u=[...s.children]:!s.isShared&&s.fieldValue&&u.push(s.fieldValue);const b=n.querySelector(`.RCS ol[data-sortable-input-name='${a}']`);if("text"===s.internalType){const t=function(n){(new DOMParser).parseFromString(n,"text/html").querySelectorAll("[data-state]").forEach(n=>{const t=n.getAttribute("data-state"),i=JSON.parse(t);i&&Object.keys(i).forEach(n=>{if(!/^_|^theme./.test(n)){const t=i._id+"/"+n,r=e.overlays.get(t);r&&!r.isInitialized&&o(t,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=n.querySelector('[data-rte-container="true"]'),r=n.querySelector("textarea");i&&r&&(i.dataset.value?t(i.dataset.value):r.value&&t(r.value))}const h=b?.querySelectorAll(`input[name="${a}"]`);u?.forEach((r,c)=>{const d=e.overlays.get(r);let M,u,z=r.split("/")[0],O=`${a}_${z}_acEdit`;b&&(M=[...h].find(e=>e.value===z),u=R(z,M,void 0,a),u&&(u.dataset.previewAction=O));const f={id:z,isInitialized:!0,parentKey:a,parentRoot:s.parentRoot,depth:s.depth+1,type:"bspModule",name:r.split("/")[1],isShared:!(!M||!u)&&O,hasFormField:!0};M&&M.dataset.label&&(f.label=M.dataset.label),p?i(r.split("/")[0],n,t,l,r):(d?o(r,Object.assign(f,d),s):(o(r,f,s),e.overlays.set(r,Object.assign({},f))),i(r.split("/")[0],n,s,a,r))})})}else{let t=[];const i=r.querySelector(`input[name="${s}.id"][value="${n}"]`)?.parentNode,a=i?.querySelector(`input[name="${s}.data"]`).value;if(a){const n=JSON.parse(a),i=(n,r,a,s)=>{let c=a.children?.find(e=>e.split("/")[0]===n._id),d=a;if(c){const n=e.overlays.get(c);let t={id:c.split("/")[0],hasFormField:!1,parentKey:a.id+"/"+a.name,parentRoot:a.parentRoot,depth:a.depth+1,type:"bspModule",name:c.split("/")[1]};n&&(t=Object.assign(t,n)),o(c,t,a),d=t}r.forEach(r=>{if(!/^_|^theme./.test(r)){let c,l,p;const M=n[r];if(n._id){const i=n._id+"/"+r;t.push(i);const a=e.overlays.get(i);a&&(M&&"object"==typeof M&&(l=Object.keys(M).includes(a.name),Object.keys(M).find(e=>!/^_|^theme./.test(e))||(p=!0)),l&&!s||(c=Object.assign({parentKey:d.id+"/"+d.name,parentRoot:d.parentRoot,depth:d.depth+1,isInitialized:!0,hasFormField:!1,isShared:n[r]._ref?i+"_acEdit":null,isEnhancement:!!s,isDropdown:p},a),o(i,c,d)))}!s&&(l?c=d:c||(c=a),M)&&("object"==typeof M?Array.isArray(M)?M.forEach(n=>{if(n._ref){const t=c.children?.find(e=>n._ref===e.split("/")[0]),i=e.overlays.get(t);if(i){const e=Object.assign({parentKey:c.id+"/"+c.name,parentRoot:c.parentRoot,depth:d.depth+1,isInitialized:!0,hasFormField:!1,isShared:c.id+"/"+c.name+"_"+i.id+"_acEdit"});o(t,e,c)}}else i(n,Object.keys(n),c)}):i(M,Object.keys(M),c):"string"==typeof M&&(new DOMParser).parseFromString(M,"text/html").querySelectorAll("[data-state]").forEach(e=>{const n=e.getAttribute("data-state"),t=JSON.parse(n);t&&i(t,Object.keys(t),c,!0)}))}})};i(n,Object.keys(n),l)}}};if(i(e.previewContainerId,document),[...t.values()].filter(e=>e.isDropdown&&!e.linked&&!e.isShared).forEach(e=>{const n=e.id+"/"+e.name;[...t.values()].find(e=>e.parentKey===n&&e.dimensions)?delete e.isDropdown:t.delete(n)}),q.get(e.previewContainerId)){let n=x(e.previewContainerId);q.get(e.previewContainerId)?._overlayFrame.contentDocument.getElementsByTagName("html")[0].style.setProperty("--PreviewScale",n.getAttribute("previewScale")),q.get(e.previewContainerId).reload(t,e,k)}else{const n=await m.create(e);q.set(e.previewContainerId,n),q.get(e.previewContainerId).reload(t,e,k),(0,u.A)(q.get(e.previewContainerId)._overlayFrame,()=>{q.get(e.previewContainerId).destroy(),q.get(e.previewContainerId),q.delete(e.previewContainerId)})}}else if("BSP.Preview.OverlayActionClick"===t){const n=e.key,t=document.querySelector(`.CIG-row[data-name="${n}"]`),o=document.querySelector(".ContentEdit-previewModal"),i=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(e.handler){const n=(e.elementId?document.querySelector(`.repeatableLabel[data-object-id="${e.elementId}"]`):null).parentElement;return"moveUp"===e.handler?n.parentElement.insertBefore(n,n.previousElementSibling):"moveDown"===e.handler&&n.parentElement.insertBefore(n,n.nextElementSibling?.nextElementSibling),void i.dispatchEvent(new Event("change",{bubbles:!0}))}if("text"===e.internalType)C(t,o,i);else{const n=e.elementId?document.querySelector(`.repeatableLabel[data-object-id="${e.elementId}"]`):null,t=(n?n.parentNode:document).querySelector(`[data-preview-action="${e.actionId}"]`);if(t.classList.contains("RCIG-addSelect")?(0,M.A)(t,":scope > .ComboInput",e=>{e.click()}):t.click(),n&&t.classList.contains("removeButton")&&(n.click(),r()(n)),t.classList.contains("RCIG-add")){const e=t.closest(".RCIG");(0,M.A)(e,":scope > .RCIG-list > li.RCIG-item.is-new-item",e=>{C(e,o,i)})}else if(t.classList.contains("RCS-add")){const n=t.closest(".RCS"),r=e.label;(0,M.A)(n,":scope > .RCS-list > li.RCS-item.is-new-item",e=>{C(e,o,i,r)})}else if(t.classList.contains("EIG-add")){const e=t.closest(".EIG");(0,M.A)(e,":scope > .EIG-item",e=>{C(e,o,i)})}else{const e=t.closest(".RCIG-item, .EIG-item");C(e,o,i)}}}});const R=(e,n,t,o)=>{if(null===n)return;let i,r=n.querySelector(`input[name="${e}"]`);return r&&!o?(t&&(r=n.querySelector(`input[name="${t}/${e.split("/")[1]}"]`)??r),r&&(i=!(r.parentNode.classList.contains("RCIG-item")||r.parentNode.classList.contains("RCS-item"))&&r.parentNode.querySelector(":scope > .ContentSelector-edit"))):n.getAttribute("name")===o&&(i=n.parentNode.querySelector(":scope > .ContentSelector-edit")),i},N=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 B(e,n){if(!e.closest(".Page.is-guideOpen"))return;const t=[];for(let n,o=e;n=o.closest(".CIG-row");)o=n.closest(".CIG"),t.unshift({typeId:o.dataset.typeId,field:n.dataset.fieldName});if(t.length<1)return;let o="";for(let e=0,i=t.length;e<i;++e){const{typeId:r,field:a}=t[e];if(o+=`.Guide-content[data-type-id="${r}"] > .Guide-field[data-field="${a}"] `,e+1===i){const i=document.querySelector(`${o} > form > select`);i&&(i.value=n(t[e]),i.dispatchEvent(new Event("change",{bubbles:!0})))}}const i=new MutationObserver(async()=>{const e=document.querySelector(o);e&&(i.disconnect(),e.scrollIntoView(),e.classList.add("is-focus"))});i.observe(document,{attributes:!0,childList:!0,subtree:!0})}(0,M.A)([".ContentEdit",".enhancementForm",".standardForm"],e=>{e.addEventListener("focusin",({target:e})=>{B(e,e=>e.typeId)}),e.addEventListener("focusout",()=>{for(const e of document.querySelectorAll(".Guide-field"))e.classList.remove("is-focus")})}),(0,M.A)('.CIG-row[data-type="record"] > .CIG-small > select, .CIG-row[data-type="record"] > .CIG-small > btu-toggleable > select',e=>{e.addEventListener("change",()=>{B(e,()=>{const n=e.selectedIndex;return n>=0?e.options[n].dataset.type:null})})}),(0,M.A)(".Guide-field.is-embedded",e=>{const n=e.querySelector("select");if(!n)return;const t=e.closest(".Guide-content[data-type-id]")?.dataset?.typeId;if(!t)return;const o=document.querySelector(`.CIG[data-type-id='${t}'] > .CIG-row[data-field-name='${e.dataset.field}'] .CIG`)?.dataset?.typeId;o&&(n.value=o,n.dispatchEvent(new Event("change",{bubbles:!0})),n.form.requestSubmit())});const S="BSP.ContentEdit.rightPanel",T=(e,n,t)=>{const o=e.classList.toggle("is-active");e.ariaExpanded=o,n.classList.toggle("is-visible",o);const i=n.querySelector(".ContentEdit-right-title")?.textContent;if(e.ariaLabel=`${o?w.close:w.open} ${i}`,e.title=e.ariaLabel,"manage_search"!==e.dataset.iconButtonName){const n=e.closest(".ContentEdit-toolbar"),i=t?.container||n?.closest(".Page-content, .Popup-content, .Popup");if(i)if(o)i.classList.add("has-widget-panel-open");else{const e=n?.querySelector('button.is-active:not([data-icon-button-name="manage_search"])');e||i.classList.remove("has-widget-panel-open")}}if(!t)return;const{container:r,updateStorage:a}=t;let s;r&&(s=o?n.dataset.width:"0px",r.style.setProperty("--ContentEdit-rightWidth",s)),!r.classList.contains("Popup")&&a&&(o?y.setItem(S,e.dataset.iconButtonName):y.removeItem(S))};(0,M.A)(".ContentEdit-toolbar",e=>{const n=e.closest(".Page-content, .Popup-content, .Popup");n.style.setProperty("--ContentEdit-rightWidth","0px");const t=e.closest(".ContentEdit");if(!t)return;const o=t.dataset.objectId,i=y.getItem(S);[...e.querySelectorAll("button[data-right-tab]")].forEach(r=>{if("manage_search"===r.dataset.iconButtonName)return;const a=r.dataset.iconButtonName,s=t.querySelector(`.ContentEdit-right[data-right-tab="${a}"]`);if(!s)return;const c=o+"/"+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 d=`${w.open} ${r.ariaLabel}`;r.ariaLabel=d,r.title=d,r.ariaExpanded=!1,(0,M.A)(".ContentEdit-right .Widget.is-error",e=>{const n=e.closest(".ContentEdit-right");if(!n)return;const t=document.querySelector(`button[aria-controls="${n.id}"]`);t&&t.classList.add("is-error")});const l=s.querySelector(".ContentEdit-right-close");l.ariaLabel=w.close,l.title=w.close,l.onclick=()=>{T(r,s,{container:n,updateStorage:!0}),r.focus()},r.onclick=o=>{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&&n.classList.contains("is-previewing")&&n.offsetWidth<900){const n=e.querySelector(".ContentEdit-previewButton");n?.click()}if(T(r,s,{container:n,updateStorage:!0}),i){if(i.dataset.iconButtonName!==a){const e=t.querySelector(`.ContentEdit-right.is-visible[data-right-tab=${i.dataset.iconButtonName}]`);T(i,e)}}else!window.BRIGHTSPOT?.ui.cms.enableV5UI&&n.classList.contains("is-previewing")&&e.querySelector(".ContentEdit-previewButton").click();!c&&r.classList.contains("is-active")&&o.isTrusted&&n.addEventListener("transitionend",function e(t){"grid-template-columns"===t.propertyName&&(n.removeEventListener("transitionend",e),r.classList.contains("is-active")&&l.focus())})},i===a&&r.click()}),window.BRIGHTSPOT?.ui?.cms?.enableV5UI&&new ResizeObserver(()=>{if(n.offsetWidth<900&&n.classList.contains("is-previewing")&&n.querySelector(".ContentEdit-right.is-visible")){const n=e.querySelector(".ContentEdit-previewButton");n?.click()}}).observe(n)})},87872(e,n,t){"use strict";t(57573),t(49371),t(96648);var o=t(65995),i=t.n(o),r=t(24510),a=t(45055),s=t(18101),c=t(23054);let d,l=!1;const p=[];function M(e,n,t,o,i,a){if(clearInterval(e),n.emit(a+".leaving",t),u(i)&&0===o.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 u(e){return document.documentElement.getAttribute("data-user-id")===e.getAttribute("data-content-lock-owner")}function b(e,n){fetch(CONTEXT_PATH+"contentLock"+n).then(function(e){if(!e.ok)throw Error(e.statusText);return e.text()}).then(function(n){try{const t=JSON.parse(n);Array.isArray(e)?function(e,n){e.forEach(e=>{const t=e.getAttribute("data-rtc-content-id"),o=n.lockOwnerIds[t];o&&(e.setAttribute("data-content-lock-owner",o),O(e,o))})}(e,t):"FORM"===e.nodeName&&h(e,t)}catch(e){console.error(e)}}).catch(n=>{Array.isArray(e)||"FORM"!==e.nodeName||function(e){if(!u(e)||l)return;const n=e.getAttribute("data-lock-network-timeout"),t=(0,s.A)("div",{className:"ContentLockMessage-timeout message message-error"}),o=(0,s.A)("span");o.innerHTML="Disconnected from network. Trying to reconnect. The lock might be dropped in: ";const i=(0,s.A)("span",{class:"ContentLockTimer"});i.innerHTML=(n<10?"0"+n:n)+":00",t.appendChild(o),t.appendChild(i);const r=e.querySelector(".ContentEdit-main")||e;r.insertBefore(t,r.firstChild),l=!0,function(e,n){let t,o,i=e;const r=setInterval(function(){t=parseInt(i/60,10),o=parseInt(i%60,10),t=t<10?"0"+t:t,o=o<10?"0"+o:o,n.textContent=t+":"+o,(--i<0||!l)&&clearInterval(r)},1e3)}(60*n-1,i)}(e),console.error(n)})}function h(e,n){if(n.hardTimeout)return e.setAttribute("data-content-lock-owner",null),void(window.location.href=CONTEXT_PATH);const t=e.getAttribute("data-rtc-content-id"),o=n.lockOwnerId;if(!o)return;if(l){const n=e.querySelector(".ContentLockMessage-timeout");n&&n.remove(),l=!1}const i=o!==document.documentElement.getAttribute("data-user-id"),r=e.getAttribute("data-content-lock-owner")!==o,a="true"===e.getAttribute("data-unlocking-disabled")!==n.unlockingDisabled,c=e.querySelector(".ContentEdit-main")||e,p=document.querySelector(".Widget-controls");if(e.classList.toggle("is-locked",i),e.setAttribute("data-content-lock-owner",o),e.setAttribute("data-unlocking-disabled",n.unlockingDisabled),p&&p.classList.toggle("is-locked",i),r){let t=e.querySelector(".ContentLockMessage-eviction");n.evictionMessage?(t||(t=(0,s.A)("div",{className:"ContentLockMessage-eviction message message-warning"}),c.insertBefore(t,c.firstChild)),t.innerHTML=n.evictionMessage):t&&t.remove()}let M=e.querySelector(".ContentLockMessage-status");if(i&&(r||a)){M&&M.remove(),M=(0,s.A)("div",{className:"ContentLockMessage-status message message-warning"}),c.insertBefore(M,c.firstChild),M.innerHTML=n.statusMessage;const o=M.querySelector(".ContentLock-link");o&&(o.onclick=()=>{const n=new FormData;n.append("forceUnlock",!0),n.append("contentId",t),z(e,o,n)}),document.activeElement&&document.activeElement.blur()}else if(!i){if(n.statusMessage){if(r||a){M&&M.remove(),M=(0,s.A)("div",{className:"ContentLockMessage-status message message-info"}),c.insertBefore(M,c.firstChild),M.innerHTML=n.statusMessage;const o=M.querySelector(".ContentLock-link");o&&(o.onclick=()=>{const n=new FormData;n.append("disableUnlock",!0),n.append("contentId",t),z(e,o,n)})}}else M&&M.remove();const o=e.querySelector(".ContentLockMessage-eviction");o&&o.remove()}let u=e.querySelector(".ContentLockMessage-inactive");if(n.inactivityMessage)if(i&&!u){u=(0,s.A)("div",{className:"ContentLockMessage-inactive message message-info"}),c.insertBefore(u,c.firstChild),u.innerHTML=n.inactivityMessage;const o=u.querySelector(".ContentLock-link");o&&(o.onclick=()=>{const n=new FormData;n.append("inactiveUnlock",!0),n.append("contentId",t),z(e,o,n)})}else i||d||(d=document.title,document.title=n.inactivityMessage);else u&&u.remove(),d&&(document.title=d,d=null);r&&O(e,o)}function z(e,n,t){const o=n.getAttribute("data-confirm");o&&confirm(o)&&function(e,n){fetch(CONTEXT_PATH+"contentLock",{method:"post",headers:{"Brightspot-CSRF":r.A.get("bsp.csrf")},body:n}).then(function(e){return e.text()}).then(function(n){try{if(e){const t=JSON.parse(n);h(e,t)}}catch(e){console.error(e)}})}(e,t)}function O(e,n){e.querySelectorAll(".EditFieldUpdateViewers-viewer").forEach(e=>{e.toggleAttribute("data-locked",e.getAttribute("data-user-id")===n)})}(0,a.A)('form[data-rtc-content-id][data-content-locking="true"]',e=>{const n=e.getAttribute("data-rtc-content-id"),t=Date.now(),o=i().client(),r=n+".viewing",s=n+".leaving",d=[],l={viewer:t};o.on(r,function(e){const n=e.viewer;n&&-1===d.indexOf(n)&&(d.push(e.viewer),o.emit(r,l))}),o.on(s,function(e){const n=e.viewer;if(n){const e=d.indexOf(n);-1!==e&&d.splice(e,1)}}),o.emit(r,l);const p="?contentId="+n+"&typeId="+e.getAttribute("data-type-id");b(e,p);const h=setInterval(()=>{const n=p+"&isLockOwner="+u(e)+"&isInactive="+document.hidden;b(e,n)},5e3);window.addEventListener("unload",()=>{M(h,o,l,d,e,n)}),(0,a.A)("[data-rtc-unlock-onreceive]",t=>{t.dataset.rtcUnlockOnreceive&&c.default.receive(t.dataset.rtcUnlockOnreceive,t=>{M(h,o,l,d,e,n)})}),(0,a.A)("[data-rtc-unlock-onclick]",t=>{t.addEventListener("click",t=>{M(h,o,l,d,e,n)})})}),(0,a.A)(':not(form)[data-rtc-content-id][data-content-locking="true"]',e=>{if(0===p.length){const n=e.closest("table");n?n.querySelectorAll(':not(form)[data-rtc-content-id][data-content-locking="true"]').forEach(e=>{-1===p.indexOf(e)&&p.push(e)}):p.push(e);let t="?"+p.map(()=>"contentIds="+e.getAttribute("data-rtc-content-id")).join("&");b(p,t);const o=setInterval(()=>{t="?";const e=[];for(let n=p.length-1;n>=0;--n){const o=p[n];if(document.body.contains(o)){const n=o.getAttribute("data-rtc-content-id");-1===e.indexOf(n)&&(e.push(n),t+="contentIds="+n+"&")}else p.splice(n,1)}0!==p.length&&0!==e.length?b(p,t.substring(0,t.length-1)):clearInterval(o)},5e3)}else-1===p.indexOf(e)&&p.push(e)}),(0,a.A)(".EditFieldUpdateViewers-viewer",e=>{const n=e.closest("[data-content-lock-owner]");n&&e.toggleAttribute("data-locked",e.getAttribute("data-user-id")===n.getAttribute("data-content-lock-owner"))})},17953(e,n,t){"use strict";var o=t(45055);(0,o.A)(".ContentReportingWidget div.widgetControls",e=>{const n=document.querySelector("a.ContentReporting-runLink");n&&e.before(n)}),(0,o.A)(".ContentReportingWidget.is-viewOnly",e=>{const n=e.querySelector("div.widgetControls"),t=e.querySelector("div.widget-contentCreate"),o=e.querySelector("div.ActionBar");n&&(n.innerHTML="",n.parentNode.removeChild(n)),t&&(t.innerHTML="",t.parentNode.removeChild(t)),o&&(o.innerHTML="",o.parentNode.removeChild(o))})},39422(e,n,t){"use strict";t(57573);var o=t(76394),i=t(45055),r=t(39403);function a(e){return e.parentNode.getBoundingClientRect().width<500}window.addEventListener("resize",(0,r.A)(()=>{const e=[];for(const n of(0,o.A)(document,".DT"))e.push({table:n,compact:a(n)});for(const{table:n,compact:t}of e)n.classList.toggle("is-compact",t)})),(0,i.A)(".DT",e=>{e.classList.toggle("is-compact",a(e))})},78927(e,n,t){"use strict";var o=t(45055),i=t(82601),r=t.n(i);(0,o.A)("input.date",e=>{e.classList.remove("date"),e.setAttribute("type","hidden");const n=document.querySelector("html").getAttribute("data-time-zone");e.setAttribute("data-time-zone",n);const t=document.createElement("a");t.classList.add("DateTimeInput","is-legacy"),t.setAttribute("target","DateStringCalendarFrame");const o=e.getAttribute("placeholder");o&&t.setAttribute("data-placeholder",o);const i=new URLSearchParams;let s,c;if(i.append("showDate",!0),i.append("showTime",!0),i.append("hideSecond",!0),e.value){const t=r().tz(parseInt(e.value),n);s=t.format("YYYY-MM-DD"),c=t.format("HH:mm:ss.SSS"),i.append("date",s),i.append("time",c)}else t.classList.add("is-empty");a(t,null,s,c),t.href=window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.ui.form.CalendarFrame"]+"?"+i,e.parentNode.insertBefore(t,e.nextSibling)}),(0,o.A)(".DateStringCalendarEmbedded .DateStringCalendar",e=>{l(e,e.closest(".DateStringCalendarEmbedded"))}),(0,o.A)(".Popup .DateStringCalendar",e=>{const n=e.closest(".frame"),t=n.closest(".Popup");t.setAttribute("aria-label",e.getAttribute("data-popupLabel"));const o=t.classList;o.add("is-local"),o.add("is-calendar");const i=n._bspFrameLink;"true"===i.getAttribute("data-hide-popup-close")&&t.querySelector(".Popup-close").classList.add("is-hidden"),l(e,i)});const a=(e,n,t,o,i,r)=>{if(!e)return;"object"==typeof t&&(o=t.getAttribute("data-time"),i=t.getAttribute("data-zoneOffset"),r=t.getAttribute("data-zoneId"),t=t.getAttribute("data-date"));const a=e.getAttribute("data-placeholder");if(!t&&!o&&a)return e.setAttribute("aria-label",a),void(e.innerHTML="");const s=new URLSearchParams;s.append("date",t),s.append("time",o),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(t=>{const o=`${n||""}${t}`;e.setAttribute("aria-label",o),e.innerHTML=o})},s=(e,n,t)=>{const[o,i]=(n.getAttribute("href")||"").split("?"),a=new URLSearchParams(i);let s;if(n.classList.contains("is-legacy")){const o=n.previousSibling;if(t)e.removeAttribute("data-date"),a.delete("date"),e.removeAttribute("data-time"),a.delete("time"),o.value=null;else{const n=e.getAttribute("data-date");a.set("date",n);const t=e.getAttribute("data-time");a.set("time",t),o.value=r().tz(`${n}T${t}`,o.getAttribute("data-time-zone")).valueOf()}s=o}else{const o=n.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"),d="true"===e.getAttribute("data-showZoneId");if(i){const n=o.querySelector('input[name$=".date"], .DateTimeInput-date');if(t)e.removeAttribute("data-date"),a.delete("date"),n.value=null;else{const t=e.getAttribute("data-date");a.set("date",t),n.value=t}s=n}if(r){const n=o.querySelector('input[name$=".time"], .DateTimeInput-time');if(t)e.removeAttribute("data-time"),a.delete("time"),n.value=null;else{const t=e.getAttribute("data-time");a.set("time",t),n.value=t}if(c){let n=o.querySelector('input[name$=".zoneOffset"]');if(t)e.removeAttribute("data-zoneOffset"),a.delete("zoneOffset"),n.value=null;else{const t=e.getAttribute("data-zoneOffset");a.set("zoneOffset",t),n.value=t}}else if(d){let n=o.querySelector('input[name$=".zoneId"]');if(t)e.removeAttribute("data-zoneId"),a.delete("zoneId"),n.value=null;else{const t=e.getAttribute("data-zoneId");a.set("zoneId",t),n.value=t}}s=n}}return s.dispatchEvent(new Event("change",{bubbles:!0})),o+"?"+a.toString()},c=(e,n)=>{s(e,n),e.closest(`.CIG-row[data-type$="${["/date","/instant","/zonedDateTime","/offsetDateTime","/offsetTime","/localDateTime","/localDate","/localTime"].join('"], .CIG-row[data-type$="')}"]`)?(e=>{const n=e.closest("li"),t=n.getAttribute("data-type");a(n.querySelector(".RCIG-title"),`${t}: `,e)})(e):a(n.closest(".CIG-row").querySelector(".CIG-note"),null,e)},d=(e,n,t)=>{n.setAttribute("href",s(e,n,t)),t?n.classList.add("is-empty"):n.classList.remove("is-empty"),a(n,null,e),e.closest(".Popup").querySelector(".Popup-close").click()},l=(e,n)=>{const t="true"===e.getAttribute("data-isWidgetEmbedded"),o="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(o){const o=e.querySelector(".DateStringCalendarDate"),i=s.querySelector('input[name="date"]');o.querySelector(".Month-body").addEventListener("click",o=>{const r=o.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"),t&&c(e,n)}),s.querySelector(".DateStringCalendarForm-previous").addEventListener("click",e=>{const n=e.target.querySelector("input");n.value=!0,n.dispatchEvent(new Event("change",{bubbles:!0}))}),s.querySelector(".DateStringCalendarForm-next").addEventListener("click",e=>{const n=e.target.querySelector("input");n.value=!0,n.dispatchEvent(new Event("change",{bubbles:!0}))})}if(i){const i=e.querySelector(".DateStringCalendarTime-custom"),d=i.querySelector(".DateStringCalendarTime-hour"),l=i.querySelector(".DateStringCalendarTime-meridiem"),p=i.querySelector(".DateStringCalendarTime-minute"),M=i.querySelector(".DateStringCalendarTime-second"),u=i.querySelector(".DateStringCalendarTime-nanosecond"),b=i.querySelector(".DateStringCalendarTime-zoneOffset"),h=i.querySelector(".DateStringCalendarTime-zoneId");M.addEventListener("change",()=>u.value=0);const z=()=>{const i=l.value;let z=parseInt(d.value);"pm"===i&&(z+=12);const O=`${z.toString().padStart(2,"0")}:${p.value.padStart(2,"0")}:${M.value.padStart(2,"0")}.${u.value}`;e.setAttribute("data-time",O),r?e.setAttribute("data-zoneOffset",b.value):a&&e.setAttribute("data-zoneId",h.value),o&&(s.querySelector('input[name="time"]').value=O,r?s.querySelector('input[name="zoneOffset"]').value=b.value:a&&(s.querySelector('input[name="zoneId"]').value=h.value)),t&&c(e,n)};i.addEventListener("change",z);const O=e.querySelector(".DateStringCalendarTime-common");O&&O.addEventListener("change",r=>{const a=r.target.selectedOptions[0].value;"_custom"===r.target.selectedOptions[0].value?(i.classList.remove("is-hidden"),z()):(i.classList.add("is-hidden"),e.setAttribute("data-time",a),o&&(s.querySelector('input[name="time"]').value=a),t&&c(e,n))})}t?c(e,n):(e.querySelector(".DateStringCalendarAction-clear").addEventListener("click",t=>d(e,n,!0)),e.querySelector(".DateStringCalendarAction-set").addEventListener("click",t=>d(e,n))),e.querySelector(".DateStringCalendarAction-now").addEventListener("click",e=>{let n;if(o){const e=s.querySelector('input[name="date"]');e.value=null,s.querySelector('input[name="renderYear"]').value=null,s.querySelector('select[name="renderMonth"]').value=null,n=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),n=e}n.dispatchEvent(new Event("change",{bubbles:!0}))})}},88646(e,n,t){"use strict";t.a(e,async(e,n)=>{try{t(86634),t(92065),t(30945),t(59981),t(75633),t(6349),t(88420);var o=t(34588),i=t(95791),r=t(18101),a=t(45055),s=t(53853),c=t(23902),d=t(97204),l=t(76394),p=t(79365),M=(t(2565),t(85945),t(45383),t(31201),t(90871),t(70175)),u=(t(25351),t(50401),t(82224)),b=(t(13473),t(97139),t(87872),t(39422),t(78927),t(64314),t(91580),t(25019),t(4199),t(1002),t(64912),t(90962),t(93126),t(63135),t(44475),t(70287),t(27140),t(76131),t(15651),t(53506),t(31915),t(17953),t(61818),t(24341),t(3689),t(47025),t(74227)),h=(t(80754),t(31854),t(9216)),z=(t(25539),t(83026),t(84410),t(38948),t(84164),t(28211),t(64854),t(72117),t(46131),t(44726),t(9386),t(56435),t(58014),t(77469),t(72168),t(39721),t(72049)),O=t(24510),f=e([z]);function m(){const e=document.createElement("div");Object.assign(e.style,{height:"100px",overflow:"scroll",visibility:"hidden",width:"100px"});const n=document.body;n.appendChild(e),document.documentElement.style.setProperty("--scrollbarSize",e.offsetWidth-e.clientWidth+"px"),n.removeChild(e)}z=(f.then?(await f)():f)[0],t.p=CONTEXT_PATH+"dist/",window.addEventListener("mouseup",e=>{const n=e.target;if(n===document.activeElement){let e=n.tagName;e&&(e=e.toLowerCase(),("a"===e||"button"===e&&!n.classList.contains("TabBar-item"))&&n.blur())}}),(0,a.A)(".autoSubmit:not(:has(:state(btu-loading))), [data-bsp-autosubmit]:not(:has(:state(btu-loading)))",e=>{new M.A(e)}),(0,d.A)("select",e=>{if(!e.isConnected)return;let n="";(e.closest(".RCIG-addSelect")||e.closest(".Page-create")||e.classList.contains("ContentSelector-select")&&e.parentNode.querySelector(".ContentSelector-clear"))&&(n="is-hidePlaceholder");const t=new u.A(e,{getOptionsUrl:n=>{const t=e.getAttribute("data-options-url");return t?t+encodeURIComponent(n):null},modifier:n});(0,c.A)(e,()=>{t.destroy()})}),(0,a.A)(".is-readOnly:not(select)",e=>{for(const n of(0,l.A)(e,"input, textarea, select"))n.type.includes("select")?n.classList.add("is-readOnly"):n.readOnly=!0}),(0,d.A)(".TC",e=>{new h.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 n=window.BRIGHTSPOT.ajaxInitiator;if(n){const{action:t,id:o,nodeName:i,shadowField:r}=n;if("select"!==i&&!r)return;const a=r?`[shadow-field="${r}"]`:`form[action*="${new URL(t).pathname}"] ${i}[name="${o}"] ~ .ComboInput`;(0,s.A)(a,()=>{let n=e.target.querySelector(a);null==n&&(n=document.querySelector(a)),n&&(n.focus(),window.BRIGHTSPOT.ajaxInitiator=null)})}}),(0,a.A)('input[autocomplete="off"]',e=>{if(e.closest("btu-search-input"))return;const n=e;n.readOnly||(n.readOnly=!0,n.addEventListener("focus",()=>{n.readOnly=!1}))}),(0,b.Ts)(),"loading"===document.readyState?window.addEventListener("DOMContentLoaded",()=>{m(),window.location!==window.parent.location&&(document.body.classList.contains("is-inIframe")||document.body.classList.add("is-inIframe"))}):m(),window.BRIGHTSPOT&&(window.BRIGHTSPOT.js={...window.BRIGHTSPOT.js,trapFocusWithin:i.J,getFocusableDescendants:o.l,getFirstAndLastFocusableDescendants:o.q,create:r.A,onFind:a.A,onRemove:c.A,Cookies:O.A,setupMenuForAria:p.D1,toggleMenu:p.AM}),n()}catch(g){n(g)}})},91580(e,n,t){"use strict";t(86634),t(49371),t(56673),(0,t(45055).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()})})})},64314(e,n,t){"use strict";var o=t(76394);const i=['button:not([type="button"])','input[type="submit"]'].join(",");window.addEventListener("click",function(e,n){const t=Array.isArray(e)?e.join(","):e;return function(...e){if(e[0]instanceof Event||e[0]instanceof window.jQuery.Event){const o=e[0].target;o instanceof Element&&o.matches(t)&&n.apply(o,e)}}}(i,function(){for(const e of(0,o.A)(this.closest("form"),i))e.classList.remove("is-clicked");this.classList.add("is-clicked")})),window.addEventListener("submit",e=>{const n=e.target;if(n.target&&!n.classList.contains("is-loader"))for(const e of(0,o.A)(n,".is-clicked"))e.classList.remove("is-clicked");else n.classList.add("is-submitting")})},25019(e,n,t){"use strict";t(86634),t(49371),t(96648);var o=t(45055);window.addEventListener("click",e=>{const n=e.target;if(n.classList.contains("Hierarchy-expand")){for(const e of n.closest("ul").querySelectorAll(".is-selected"))e.classList.remove("is-selected");n.closest("li").classList.add("is-selected")}},{capture:!0}),window.addEventListener("brightspot-frame-load",e=>{const n=e.target;if(n.classList.contains("HierarchyResults")){const e=[...n.querySelectorAll("li")],t=n.closest(".Hierarchy-column").querySelector("ul");e.forEach(e=>{t.appendChild(e)})}const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&document.querySelector(".Hierarchy-moreElements")?.click()})});let o=document.getElementsByClassName("lastHierarchyElement");o.item(0)&&(t.observe(o.item(0)),o.item(0).classList.remove("lastHierarchyElement"))}),(0,o.A)("div[data-popup-source-class*='Page-search'] div.Hierarchy-column a[data-hierarchy-item]",e=>{const n=e.getAttribute("data-type-id"),t=e.getAttribute("data-parent-type-ids"),o=e.closest("div.SearchWidget-form");if(!o||!n)return;const i=o.querySelector("select[name='st'] option[selected]").value;n===i||t&&t.includes(i)||e.setAttribute("data-mismatch-hierarchy-type","true")}),(0,o.A)("div[data-popup-source-class*='objectId-select'] div.Hierarchy-column a[data-hierarchy-item]",e=>{const n=e.getAttribute("data-type-id"),t=e.closest("div.SearchWidget-form");if(!t||!n)return;const o=t.querySelector("div.searchCreate form.objectId-create"),i=o.querySelector("input[name='typeId']")?.value,r=o.querySelector("select[name='typeId']")?.getAttribute("data-typeids");i&&n===i||r&&r.includes(n)||e.setAttribute("data-mismatch-hierarchy-type","true")})},4199(e,n,t){"use strict";t(49371),t(55763);var o=t(91762);const i=window.BRIGHTSPOT?.icons?.materialToLucide??{},r=!!window.BRIGHTSPOT?.ui?.cms?.enableV5UI,a=!r&&Object.keys(i).length>0?Object.keys(i).reduce((e,n)=>(e[i[n]]=n,e),{}):void 0;r||(0,o.A)(["[data-icon]","[data-icon-name]","[data-icon-button-name]"],function(e){const n=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(!n)return;const t=e.getAttribute(n);if(null==t)return;const o=t.trim(),i=a&&null!=a[o]?a[o]:o;e.setAttribute(n,i)})},1002(e,n,t){"use strict";(0,t(53853).A)(".imageEditor",async()=>{await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(4582),t.e(9277),t.e(4795),t.e(5857)]).then(t.bind(t,92954))})},64912(e,n,t){"use strict";var o=t(24510);(0,t(45055).A)(".LinkCarousel-item",e=>{e.addEventListener("click",async n=>{const t=n.target;if(t.classList.contains("LinkCarousel-item-favorite")){t.classList.toggle("is-unstarred");const n=t.classList.contains("is-unstarred")?t.getAttribute("data-title-on"):t.getAttribute("data-title-off");t.title=n,t.setAttribute("aria-label",n);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",o.A.get("bsp.csrf"));try{await fetch(i,{method:"POST",headers:r})}catch(e){console.error(e)}}else{if(e!==t)return;n.stopPropagation(),e.querySelector("a").click()}})})},90962(e,n,t){"use strict";var o=t(18101);(0,t(45055).A)(".LinkList td:not(.LinkList-image, .LinkList-main, .LinkList-viewers, .LinkList-button, .LinkList-type, .LinkList-description, .date-time)",e=>{const n=(0,o.A)("span",{className:"LinkList-icon","aria-hidden":"true"});e.prepend(n)})},93126(e,n,t){"use strict";var o=t(18101),i=t(60021),r=t(76394),a=t(45055);(0,a.A)(".LinkTable .Label",e=>{const n=e.closest("th, td");if(!n||n.classList.contains("LinkTable-label")||e.closest(".CommunityWidget"))return;const t=n.previousElementSibling;if(t&&t.classList.contains("LinkTable-label"))return void t.appendChild(e);const i=e.closest("tr"),r=Array.from(i.querySelectorAll("th, td")).indexOf(n);let a;const s=i.closest("table").querySelector("tr").querySelectorAll("th, td");for(let e=0,n=0;n-1<r;e++)a=s[e],n+=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 n=r;for(const t of e.querySelectorAll("th, td"))if(n-=t.colSpan,n<0){e.insertBefore((0,o.A)(t.tagName,{className:"LinkTable-label"},"TH"===t.tagName&&e.closest("table").classList.contains("searchResultTable")?window.BRIGHTSPOT.ui?.searchContentStatus:""),t);break}}i.querySelectorAll("th, td")[r].appendChild(e)}});const s=new ResizeObserver(e=>{for(const n of e)n.target.classList.toggle("is-compact",(n.borderBoxSize?.inlineSize||n.contentRect.width)<500)});(0,a.A)(".LinkTable",e=>{e.classList.contains("is-compact")||s.observe(e);const n=e.classList.contains("is-static");for(const t of(0,r.A)(e,":scope > tbody > tr")){const e=(0,r.A)(t,":scope > td");if(!n)for(const n of e)if((0,i.A)(n,":scope > a")){n.classList.add("LinkTable-main");break}const o=e[0].classList;o.contains("LinkTable-main")?e.length>1&&e[1].classList.add("LinkTable-first"):o.add("LinkTable-first")}})},63135(e,n,t){"use strict";var o=t(97204);(0,o.A)(".locationMap",async e=>{const{default:n}=await Promise.all([t.e(8897),t.e(5598),t.e(1888)]).then(t.bind(t,48207));new n(e)}),(0,o.A)(".regionMap",async e=>{const{default:n}=await Promise.all([t.e(8897),t.e(5598),t.e(6086),t.e(6379)]).then(t.bind(t,22848));new n(e)})},44475(e,n,t){"use strict";var o=t(45055),i=t(60021);(0,o.A)('.LookingGlass-actions[data-action="copy"]',e=>{e.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation();const t=document.createElement("textarea");t.value=(0,i.A)(e,"a").href,t.setAttribute("readonly",""),document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),e.setAttribute("data-copied","true"),setTimeout(()=>{e.removeAttribute("data-copied")},2e3)})})},70287(e,n,t){"use strict";var o=t(18101);(0,t(45055).A)(".Message",e=>{const n=(0,o.A)("span",{className:"Message-icon","aria-hidden":"true"}),t=e.querySelector(".ContentEdit-revisionInfo");t?t.insertAdjacentElement("afterend",n):e.append(n)})},27140(e,n,t){"use strict";var o=t(76394),i=t(45055),r=t(39403);function a(e){const n=e.style;n.overflow="auto",n.transform="",n.width="100%";const t=e.getBoundingClientRect().width,o=e.scrollWidth;t<o&&(n.transform=`scale(${t/o})`,n.transformOrigin="left"),n.overflow="",n.width=""}(0,i.A)(".NB",a),window.addEventListener("resize",(0,r.A)(()=>{for(const e of(0,o.A)(document,".NB"))a(e)}))},76131(e,n,t){"use strict";t(86634),t(57573),t(49371),t(42723),t(56065);var o=t(18101),i=t(60021),r=t(76394),a=t(39242),s=t(45055),c=t(53853),d=t(23902),l=t(93832),p=t(2674),M=t(34588),u=t(95791),b=t(88630);const h=window.BRIGHTSPOT?.ui.tooltips;function z(e,n){n&&e.style.setProperty("--Page-headerBottom",`calc(var(--Page-headerHeight) + ${n.clientHeight}px)`)}function O(e,n=!1){const t=e?.querySelector(".Page-nav"),o=e.classList.contains("is-navigating")||!0===n;o?t?.setAttribute("inert",""):t?.removeAttribute("inert"),o||t.querySelector(":scope .selected li:first-of-type")?.querySelector("a")?.focus();const i=o?h.menu.open:h.menu.close;e.classList.toggle("is-navigating",!0!==n&&void 0);const r=e?.querySelector(".Page-navToggle");r&&(r.title=i,r.setAttribute("aria-label",i),r.setAttribute("aria-expanded",!o))}function f(e,n){const t=document.querySelector(".Page-nav");if(!e)return;let o,i,r=e.classList;if(r.remove("is-active"),r.contains("selected")&&r.contains("isNested")||r.contains("is-expanded")){const t=e.querySelector("ul").firstElementChild;null!=t&&f(t,n)}const a=e.closest("ul").closest("li"),s=e.closest(".isNested");if(1===n){i=e.nextSibling;const n=e.classList.contains("is-expanded");null!==i?n?o=e.querySelector("ul").firstElementChild:"LI"===i.tagName&&(o=i):n||(o=null!==s.nextSibling?a.nextSibling:t.firstElementChild.querySelector("ul").firstElementChild),o.querySelector("a").focus()}else if(i=e.previousSibling,null!==i)"LI"===i.tagName&&(o=i,o.querySelector("a").focus()),e.classList.contains("isNested")&&(o=i.querySelector("ul").lastElementChild,o.querySelector("a").focus());else{const e=s.previousSibling;if(a.classList.contains("isNested")?o=a:null!==e&&(o=e.classList.contains("selected")?e.querySelector("ul").lastElementChild:a),s.classList.contains("selected")){const e=t.lastElementChild;o=e.classList.contains("is-expanded")?e.querySelector("ul").lastElementChild:e}o.querySelector("a").focus()}}(0,s.A)(".Page .Container-broadcast",e=>{const n=e.closest(".Page");new ResizeObserver(t=>{z(n,e)}).observe(e),z(n,e)}),(0,s.A)(".Page-nav",e=>{e.setAttribute("inert",""),e.addEventListener("keydown",n=>{switch(n.key){case"Enter":document.activeElement.closest("li").setAttribute("aria-expanded",document.activeElement.closest("li").matches(".is-expanded"));break;case"ArrowUp":case"ArrowLeft":f(n.target.closest("li"),-1),n.preventDefault(),n.stopPropagation();break;case"ArrowRight":case"ArrowDown":f(n.target.closest("li"),1),n.preventDefault(),n.stopPropagation();break;case"Escape":if("false"===document.activeElement.closest("li").getAttribute("aria-expanded")||document.activeElement.parentElement.parentElement.parentElement.classList.contains("selected"))O(e.closest(".Page"),!0);else if(n.target.closest("li").classList.contains("is-expanded")||n.target.closest("li").closest("ul").classList.contains("is-expanded")){const e=n.target.closest(".isNested");e.classList.remove("is-expanded"),e.firstElementChild.focus()}else O(e.closest(".Page"),!0)}});const n=(0,a.A)((0,o.A)("button",{className:"Page-navToggle",title:h.menu.open,"aria-label":h.menu.open,"aria-haspopup":"true","aria-expanded":"false",onclick:n=>{O(e.closest(".Page"))},onkeydown:n=>{e.closest(".Page");const t=(0,i.A)(e,":scope > li");switch(n.key){case"ArrowUp":case"ArrowLeft":e.lastElementChild.querySelector("a").focus();break;case"ArrowDown":case"ArrowRight":t.classList.contains("isNested")&&t.classList.contains("selected")?t.querySelector("ul").firstElementChild.querySelector("a").focus():t.querySelector("a").focus()}}}),e);for(const n of(0,r.A)(e,".isNested")){const e=`BSP.Page.navItemExpanded.${n.textContent.trim()}`,t=(0,i.A)(n,":scope > a"),r=l.A.get(e),a=r?h.collapse:h.expand,s=(0,o.A)("div",{className:"Page-navItemToggle","aria-label":a});t.setAttribute("tabindex",0),n.setAttribute("aria-expanded",n.classList.toggle("is-expanded",r)),t.appendChild(s),t.title=a,t.addEventListener("click",o=>{o.preventDefault();const i=n.classList.toggle("is-expanded");t.title=i?h.collapse:h.expand,s.setAttribute("aria-label",t.title),l.A.toggle(e,i),n.setAttribute("aria-expanded",i),i&&setTimeout(()=>n.scrollIntoView({behavior:"smooth",block:"nearest"}),100)})}window.addEventListener("click",t=>{e.contains(t.target)||n.contains(t.target)||window.BRIGHTSPOT?.ui.cms.enableV5UI||O(e.closest(".Page"),!0)})}),(0,s.A)(".toolUserDisplay",e=>{const n=e.querySelector(".toolUserNotifications"),t=e.querySelector(".toolUserNotifications a");e.parentNode.insertBefore((0,o.A)("div",{className:"Page-notifications","data-new":t.dataset.new,"data-count":t.dataset.count,"data-count-label":t.dataset.countLabel},Array.from(n.children)),e.nextSibling),n.remove()}),(0,s.A)('.Popup[name="profilePanel"] .p-tud > h1',e=>{const n=(0,o.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"),n.appendChild(e);e.parentNode.insertBefore(n,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"),n=e.querySelector("label")?.htmlFor;n&&document.getElementById(n)?.focus()});const m=[];let g;function A(){if(!document.querySelector(".Page").classList.contains("is-guideOpen"))return;const{href:e,name:n}=m[m.length-1];if(e&&e!==g){g=e;const t=document.querySelector(".Page-guide");if(!t.querySelector(`:scope > .frame[name="${n}"]`)){const o=document.createElement("div");o.classList.add("frame"),o.setAttribute("name",n),t.appendChild(o);const i=new URLSearchParams;i.append("subject",e);const r=document.createElement("a");r.href=`${document.querySelector(".Page-guideLink a").href}?${i}`,r.target=n,document.body.appendChild(r),r.click(),document.body.removeChild(r)}for(const e of t.querySelectorAll(":scope > .frame")){const n=e.getAttribute("name");m.some(({name:e})=>e===n)||t.removeChild(e)}}}function w(e){const n=e.dataset.href;return"true"===new URLSearchParams(n).get("isFieldGuide")}let v=0;function q(e,n,t,o=!1){if("Tab"!==e.key)return;const i=t!==document&&t?.matches(".is-fromTop"),r={header:(o?"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:o?".Page-guide":null,queryFieldDone:t!==document&&t?.matches('[name="queryField"]')?".QueryField-button":null},a=Object.values(r).filter(e=>e).map(e=>{const o=".searchFiltersRest"!==e||n?0:1,i=e.includes("Page-search.toolSearch")?document:t;return(0,M.l)(e,i,o)}).filter(e=>null!==e);(0,u.J)(e,a,!o)}function k(e,n){"Tab"===n.key&&(0,s.A)(e,e=>{const t=(0,p.Kr)(e,{includeContainer:!0});t&&t.length>0&&function(e,n){let t,o;if(n[n.length-1].classList.contains("ContentSelector-search")?(t=n.pop(),o=n.pop()):n[n.length-1].classList.contains("ComboInput")&&(t=n.pop()),t){const e=o?[o,t]:[t];e.length>0&&n.splice(1,0,...e)}let i=null;n[0].nextElementSibling instanceof HTMLElement&&(i=n[0].nextElementSibling);const r=i?(0,p.Kr)(i,{includeContainer:!0}):[],a=e.target instanceof HTMLElement||e.target instanceof SVGElement,s=e.target&&a?n.indexOf(document.activeElement):-1,c=e.shiftKey?"back":"forward";"forward"===c?s>=0&&s<n.length-1?(e.preventDefault(),n[s+1]?.focus()):s===n.length-1&&(e.preventDefault(),r[0]?.focus()):"back"===c&&(a&&e.target===r[0]?(e.preventDefault(),n[n.length-1]?.focus()):s>0&&(e.preventDefault(),n[s-1]?.focus()))}(n,t)})}(0,s.A)([".Page",".Popup"],e=>{if("DateStringCalendarFrame"===e.getAttribute("name"))return;const n=e.dataset.href;n&&(m.push({href:n,name:"guide-"+ ++v}),function(e){const n=new URLSearchParams(e);return null!=n.get("typeId")||null!=n.get("id")||e.includes("?typeId=")||e.includes("?id=")}(n)&&e.setAttribute("data-subject-type","true"),A(),(0,d.A)(e,()=>{m.splice(m.indexOf(n),1),A()}))}),(0,s.A)(".Page-guideLink a",e=>{const n=e.closest(".Page");n.classList.contains("is-guideOpen")&&e.setAttribute("aria-expanded","true"),e.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation();const o=n.querySelector("div.Popup[name='guideField']");o&&o.querySelector(".closeButton").click();const i=n.querySelector(".Page-navToggle");"true"===i?.getAttribute("aria-expanded")&&i.click(),n.classList.add("is-guideOpen"),e.setAttribute("aria-expanded","true");const r=".Page-guide a.Guide-close";(0,c.A)(r,()=>{document.querySelector(r).focus()}),A()},{capture:!0})}),(0,s.A)(".Guide-close",e=>{const n=e.closest(".Page");e.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),document.querySelector(".CIG-row.is-openPopup")?.classList.remove(".is-openPopup"),n.classList.remove("is-guideOpen");const o=n.querySelector(".Page-guideLink a");o.setAttribute("aria-expanded","false"),o.focus(),fetch(e.href)},{capture:!0})}),(0,s.A)('.Popup[name="edit-guide"] .ActionBar > button[name="action-save"]',e=>{e.addEventListener("click",()=>{let n=b(e).popup("source").frame("container")[0];n&&(n.classList.contains("Guide-embedded")&&(n=n.closest(".Guide")?.closest(".frame")),n&&n.parentNode?.removeChild(n))})}),(0,s.A)("a.CIG-guide",e=>{e.addEventListener("click",n=>{if(!document.querySelector(".Page").classList.contains("is-guideOpen"))return;n.preventDefault(),n.stopPropagation();const t=e.getAttribute("href"),o=t.substring(t.indexOf("?")+1),i=new URLSearchParams(o).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",n=>{const t=e.closest('div.Popup[name="edit-guide"]');if(!w(t))return;const o=t.parentElement.querySelector('div.Popup[name="guideField"]');o.parentElement.removeChild(o)})}),(0,s.A)('div.Popup[name="edit-guide"] button.closeButton',e=>{e.addEventListener("click",n=>{if(!w(e.closest('div.Popup[name="edit-guide"]')))return;const t=document.querySelectorAll("div.Page-guide>div.frame");if(!t.length)return;const i=document.querySelector(".Page");let r,a;if(t.length>1&&i.querySelector("div.Popup")?.dataset.href?(r=i.querySelector("div.Popup").dataset.href,a=t.item(t.length-1)):(r=document.querySelector(".Page").dataset.href,a=t.item(0)),!r)return;const s=new URLSearchParams;s.append("subject",r);const c=(0,o.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 n=document.querySelector("body main");let t=n;const o=n.querySelector(".ContentEdit");o&&(t=o.querySelector(".ContentEdit-left")??o);const i=n.querySelector(".main");i&&(t=i);const r=n.querySelector(":scope .SearchWidget-result");r&&(t=r);const a=n.querySelector(":scope > .SearchWidget .SearchResult-view");a&&(t=a),t&&(t.setAttribute("tabindex","-1"),t.focus({focusVisible:!0}))})}),window.addEventListener("keydown",e=>{if("Tab"!==e.key)return;const n=document.querySelector(".Admin-main"),t=document.querySelector(".content-edit"),o=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"]'),d=a?.includes("ContentSelector-search"),l=r?.matches('[name="queryField"]'),p=c||d||l,b=document.querySelector(".BulkWorkflow");if(!(p||o||i||t||n||r||b))return;const h=".searchFilter.searchFilter-record.SearchWidget-filter.is-record.is-multiple.searchFilter-multiple";if(b){const n=(0,M.q)(b);if(!n)return;(0,u.J)(e,[n])}else if(p){const n=r.querySelector(".SearchWidget-query"),t="none"===window.getComputedStyle(n).display;k(".Popup "+h,e),q(e,t,r)}else if(o&&!r)k(h,e),q(e,!1,document,!0);else if(i){const n=[(0,M.q)(i)].filter(e=>null!==e);(0,u.J)(e,n)}else if(s||!r&&t){const n=s?r:document,t=window.BRIGHTSPOT?.ui.cms.enableV5UI,o=[(0,M.l)(".Page-header",n),t?(0,M.l)("btu-nav-rail",n):null,t?(0,M.l)(".Page-guide",n):null,t?(0,M.l)(".Page-askAi",n):null,t?null:(0,M.l)(".popup-objectId-edit-heading.Link",n),t?null:(0,M.l)(".ContentEdit-title.breadcrumbs",n),t&&s?(0,M.l)(":scope > .Popup-content > .Popup-close",n):null,(0,M.l)(".ContentEdit-top",n),(0,M.l)(".ContentEdit-left",n),(0,M.l)(".ContentEditDrawer.is-open",n),(0,M.l)(".ContentEdit-preview:not([inert])",n),(0,M.l)(".ContentEdit-right.is-visible",n),(0,M.l)(".ContentEdit-toolbar",n),t?null:(0,M.l)(".Page-guide",n),t?null:(0,M.l)(".Page-askAi",n)].filter(e=>null!==e);(0,u.J)(e,o,!!s)}else if(n&&!r){const n=window.BRIGHTSPOT?.ui.cms.enableV5UI,t=[(0,M.l)(".Page-header",document),n?(0,M.l)("btu-nav-rail",document):null,n?(0,M.l)(".Page-guide",document):null,n?(0,M.l)(".Page-askAi",document):null,(0,M.l)('.frame.loaded[name$="Result"] > ul.pagination',document),(0,M.l)(".leftNav.Admin-nav .Widget-controls",document),(0,M.l)(".leftNav.Admin-nav .Widget-controls + ul.LinkTable",document),(0,M.l)('form[target$="Result"]',document),(0,M.l)('.leftNav.Admin-nav form[target="dashboardsResult"] + ul.LinkTable',document),(0,M.l)('.frame.loaded[name$="Result"] > ul.pagination + ul.LinkTable',document)].filter(e=>null!==e);(0,u.J)(e,t,!1)}else if(r){const n=[(0,M.q)(r)].filter(e=>null!==e);(0,u.J)(e,n)}})},15651(e,n,t){"use strict";t(57573),t(49371),t(96648);const o=function(){let e={},n=e.hasOwnProperty;return{subscribe:function(t,o){n.call(e,t)||(e[t]=[]);let i=e[t].push(o)-1;return{remove:function(){delete e[t][i]}}},publish:function(t,o){n.call(e,t)&&e[t].forEach(function(e){e(void 0!==o?o:{})})}}}();window.PubSub=o},53506(e,n,t){"use strict";t(49371),t(96648);var o=t(45055),i=t(17664);function r(e,n){if(e.querySelector(".Message.is-error"))return e.querySelector(".Message.is-error").textContent;const t=e.querySelector(".QueryField-keyword"),o=e.querySelector(".QueryField-queryString").textContent;let i,r,a="";t.textContent&&(a+='"'+t.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=n.closest(".CIG-row").querySelector(".CIG-label label"),a+=i||r.textContent;const c=e.querySelector(".SearchWidget-filter.searchFilter-visibilities"),d=c.querySelectorAll(".ComboInput-selected"),l=c.querySelectorAll('option[selected="selected"]');if((d.length>0||l.length>0&&!c.querySelector(".ComboInput-label"))&&(a+=" "+QF_VISIBILITIES+" ",d.length>0?d.forEach(e=>{a+=e.textContent+", "}):l.length>0&&!c.querySelector(".ComboInput-label")&&l.forEach(e=>{a+=e.textContent+", "}),a=a.substring(0,a.length-2)),o.match(/cms.content.publishDate/)){a+=" "+QF_PUBLISH_DATE+" ";const e={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"},n=o.match(/cms.content.publishDate greaterthanorequals \d+/),t=o.match(/cms.content.publishDate lessthanorequals \d+/);if(n){const t=n[0].match(/\d+/)[0],o=new Date(parseInt(t));a+=QF_PUBLISH_START+" "+o.toLocaleString(void 0,e)}if(n&&t&&(a+=" "+QF_CONJUNCTION+" "),t){const n=t[0].match(/\d+/)[0],o=new Date(parseInt(n));a+=QF_PUBLISH_END+" "+o.toLocaleString(void 0,e)}}return a}(0,o.A)(".QueryField input",e=>{e.closest(".CIG.TC").classList.add("is-query")}),(0,o.A)(".QueryField input[data-initialized]",e=>{!function(e){const n=document.createElement("div");n.classList.add("QueryField-toggle"),n.frame=e.frame,e.frame.queryToggle=n;const t=document.createElement("span");t.classList.add("QueryField-icon");const o=document.createElement("span");o.classList.add("QueryField-label"),e.closest(".CIG-row").appendChild(n),n.appendChild(o),n.appendChild(t),n.label=o}(e.closest(".QueryField"))}),(0,o.A)(".QueryField-frame .SearchWidget-result.loaded",e=>{const n=e.closest(".QueryField-frame"),t=n.queryToggle;t&&(t.label.textContent=r(e.closest(".widget-queryField"),t),t.closest(".QueryField-toggle.is-open")&&e.closest(".Popup.is-fromRight.popup-show").classList.add("is-visible")),n.style["z-index"]=(0,i.default)()}),(0,o.A)(".QueryField-button",e=>{e.addEventListener("click",n=>{n.preventDefault();const t=e.closest(".QueryField-frame").queryToggle,o=e.closest(".widget-queryField");if(t){t.label.textContent=r(o,t),t.classList.remove("is-open");const e=t.closest(".CIG-row")?.querySelector(".ComboInput")||t.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,o.A)(".QueryField-toggle",e=>{e.addEventListener("click",()=>{const n=e.frame;e.classList.add("is-open");const t=n.querySelector(".Popup.is-ready");t.classList.add("is-visible"),t.querySelector(".SearchWidget-query input")?.focus()})}),(0,o.A)(".widget-queryField > .SearchWidget-title",e=>{e.textContent="Edit Dynamic Query"})},31915(e,n,t){"use strict";t(49371),t(56673);var o=t(18101),i=t(60021),r=t(76394),a=t(26179),s=t(45055),c=t(97204);const d=window.BRIGHTSPOT?.ui.tooltips,l=d?.expandAll,p=d?.collapseAll;window.addEventListener("click",e=>{const n=e.target,t=n.closest(".RCIG-addSelect");if(t){const e=(0,i.A)(t,":scope > .ComboInput");e&&!e.contains(n)&&e.click()}}),(0,c.A)(".RCIG-list > .RCIG-item",e=>{(0,s.A)(e,":scope > .RCIG-title",n=>{n.role="button",n.ariaExpanded="false",n.ariaLabel=`${n.textContent}`,e.hasAttribute("data-empty")||(n.ariaExpanded="false",n.addEventListener("click",()=>{const t=!e.classList.contains("is-collapsed");n.ariaExpanded=t?"true":"false"}))})}),(0,c.A)(".RCIG",e=>{const n=e.querySelector(":scope > .RCIG-list");if(!n)return;let t=n.children.length;for(const e of n.children)(0,s.A)(e,":scope > .RCIG-title",n=>{n.role="button",n.ariaExpanded="false",n.ariaLabel=`${n.textContent}`,e.hasAttribute("data-empty")||(n.ariaExpanded="false",n.addEventListener("click",()=>{const t=!e.classList.contains("is-collapsed");n.ariaExpanded=t?"true":"false"}))});e.dataset.rcigSize=t;const i=e.previousElementSibling?.querySelector(".CIG-label label")?.textContent;let c=l,M=p;i&&(c+=` ${i}`,M+=` ${i}`),e.addEventListener("repeatable.add",()=>{e.dataset.rcigSize=++t,e.closest(".CIG-row")?.classList.add("is-expandable")}),e.addEventListener("repeatable.remove",()=>{e.dataset.rcigSize=--t,0===t&&e.closest(".CIG-row")?.classList.remove("is-expandable")});const u=e.querySelector(":scope > ol, :scope > ul");if(Array.from(u.children).some(e=>!e.hasAttribute("data-empty"))){e.addEventListener("repeatable.toggle",()=>{const e=n.querySelectorAll(":scope > li.is-collapsed").length;0===e?(i.classList.add("is-expanded"),i.title=M,i.setAttribute("aria-label",M)):e===t&&(i.classList.remove("is-expanded"),i.title=c,i.setAttribute("aria-label",c))});const i=(0,o.A)("button",{className:"RCIG-expandAll",type:"button",title:c,"aria-label":c,onclick:n=>{const t=i.classList.toggle("is-expanded");t?(i.title=M,i.setAttribute("aria-label",M),s.textContent=d?.expandedAll):(i.title=c,i.setAttribute("aria-label",c),s.textContent=d?.collapsedAll);for(const n of(0,r.A)(e,":scope > .RCIG-list > .RCIG-item > .RCIG-title")){const e=n.parentElement.classList.contains("is-collapsed");(t&&e||!t&&!e)&&n.click()}}}),s=(0,o.A)("div",{className:"screen-reader-only","aria-live":"polite"});0===t?i.classList.add("is-expanded"):e.closest(".CIG-row")?.classList.add("is-expandable"),(0,a.A)(s,e),(0,a.A)(i,e)}})},61818(e,n,t){"use strict";t(86634),t(57573),t(49371),t(42723),t(96648),t(56065);var o=t(45055),i=t(18101),r=t(97204),a=t(88630);(0,o.A)(".richtext",e=>{const n=e.closest("div");n.style.position="relative";const t=e.getBoundingClientRect().height,o=(0,i.A)("div",{className:"ProseMirror-loader"});o.style.minHeight=`${t}px`,n.appendChild(o)});const s=new Map;RICH_TEXT_ELEMENTS.forEach(e=>{let n=e.tag,t="";const o=/[\u0030-\u0039\u0061-\u007A\u0041-\u005A-]/g;[...n].forEach(e=>{let n=e;e.match(o)||(n=`--${e.charCodeAt(0)}--`),t+=n}),s.set(n,t)}),window.RICH_TEXT_ELEMENTS_PM=RICH_TEXT_ELEMENTS.map(e=>{if(e.tag=s.get(e.tag),e.context){const n=[];e.context.forEach(e=>{let t=e;t&&(t=s.get(e)),n.push(t)}),e.context=n}return e}),(0,r.A)(".richtext",async e=>{const{RTE:n}=await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(4582),t.e(2825),t.e(9360),t.e(4795),t.e(1386)]).then(t.bind(t,60252)),o=e.getAttribute("data-rte-toolbar");let i=RICH_TEXT_TOOLBARS[o];if(!window.BRIGHTSPOT?.ai?.AI_CHAT_ENABLED){const e=["rte2-toolbar-track-ai","rte2-toolbar-ai-inline"];i=i.filter(n=>!e.includes(n.className))}const r=e.getAttribute("data-rte-lines"),a="true"===e.getAttribute("data-inline"),c=e.getAttribute("data-user"),d=e.getAttribute("data-user-id");let l=e.getAttribute("data-rte-tags");if(l)try{l=JSON.parse(l).map(e=>s.get(e))}catch(e){console.log(e)}const p=e.getAttribute("name"),M="true"===e.getAttribute("data-collab"),u=new n(e,i,a,c,d,l,p,M,s,parseInt(r,10)||1,RICH_TEXT_ELEMENTS_PM);u.init(),e.rte=u,e.dispatchEvent(new CustomEvent("brightspot.rte.init",{bubbles:!0,detail:{rte:u}}))}),(0,o.A)(".RichTextEditor-uploadComplete",e=>{let n=e.dataset.html;if(!n)return;const t=a(e),o=t.popup("source");if(!o)return;const i=o.attr("data-event-id");n=n.replace(/<br>/g,"");const r=document.createElement("div");r.innerHTML=n;const s=r.children,c=[];[...s].forEach(e=>{const n=[...e.attributes].reduce((e,n)=>(e[n.name]=n.value,e),{});c.push({label:e.innerText,data:n,tag:e.tagName.toLowerCase()})}),PubSub.publish(i,c),t.popup("close")})},24341(e,n,t){"use strict";t(86634),t(49371),t(96648),t(56065);var o=t(45055);(0,o.A)(".SearchFields-input",e=>{const n=window.BRIGHTSPOT?.ui.tooltips;e.setAttribute("title",e.closest(".SearchFields-hide")?n.fieldSelect:n.fieldHide),e.addEventListener("keydown",i),e.addEventListener("click",r)}),(0,o.A)(".SearchFields-filter",e=>{e.addEventListener("keydown",i)});const i=e=>{"Enter"===e.key&&e.preventDefault()},r=e=>{e.preventDefault(),e.stopPropagation();const n=e.target.matches("input")?e.target:e.target.querySelector("input"),t=n.closest(".SearchFields"),o=n.closest("li"),i=o.closest("div");let s,c,d=o.nextSibling;if(t.querySelector(".SearchFields-tab-container")){const e=t.querySelector(".SearchFields-tab-container").querySelector("ul").querySelector(".is-selected").classList[0].toLowerCase();s=t.querySelector(`.SearchFields-container-${e} > .SearchFields-displayContainer > .SearchFields-displayTitle > ul`),c=t.querySelector(`.SearchFields-container-${e} > .SearchFields-hide`)}else s=t.querySelector(".SearchFields-displayTitle > ul"),c=t.querySelector(".SearchFields-hide > ul");if(i.classList.contains("SearchFields-hide")){const e=o.cloneNode(!0),n=e.querySelector(".SearchFields-input");n.addEventListener("click",r),n.setAttribute("title",window.BRIGHTSPOT?.ui.tooltips.fieldHide),s.appendChild(e);const t=s?.querySelector(":scope > li .SearchFields-input");if(d)if(d.classList.contains("is-disabled"))for(;d?.classList.contains("is-disabled");)d=d.nextSibling,d?d.classList.contains("is-disabled")||d.querySelector("input")?.focus():t?.focus();else d.querySelector("input")?.focus();else t?.focus()}else d?d.querySelector("input")?.focus():t?.querySelector(".actions > button")?.focus(),o.remove();a(n.value,c)},a=(e,n)=>{const t=n.querySelector(`input[value="${e}"]`),o=t?.closest("li");o?.classList.contains("is-disabled")&&t.addEventListener("click",r),o?.classList.toggle("is-disabled"),t?.toggleAttribute("disabled"),o?.querySelector(".SearchFields-drag")?.toggleAttribute("disabled")};(0,o.A)(".SearchFields .SearchFields-filter",e=>{e.addEventListener("input",n=>{const t=e.closest(".SearchFields-hide"),o=new RegExp(n.target.value.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");t.querySelectorAll("label").forEach(e=>{const n=e.parentElement;o.test(e.getAttribute("data-display-name"))?n.style.display="flex":n.style.display="none"}),t.querySelectorAll(".SearchFields-subheading").forEach(e=>{const n=e.nextSibling;n.querySelector('li[style*="display: flex"]')?(e.style.display="flex",n.style.display="block"):(e.style.display="none",n.style.display="none")})})}),(0,o.A)(".SearchFields .SearchFields-tab-container .SearchFields-tab-ul",e=>{const n=e.closest(".SearchFields");n.classList.add("has-tabs");const t=[...e.children].filter(e=>e.classList.contains("is-selected"))[0],o=[...e.children].filter(e=>!e.classList.contains("is-selected"))[0],i=n.querySelector(".SearchFields-container-"+t.classList[0].toLowerCase()),r=n.querySelector(".SearchFields-container-"+o.classList[0].toLowerCase());t.addEventListener("click",()=>{s(t,o,i,r)}),o.addEventListener("click",()=>{s(o,t,i,r)})}),(0,o.A)(".SearchFields-container",e=>{const n=e.querySelectorAll(".SearchFields-hide .SearchFields-input"),t=e.querySelectorAll(".SearchFields-displayContainer .SearchFields-input"),o=Array.from(t).map(e=>e.value);o&&n.forEach(e=>{if(o.includes(e.value)){const n=e.closest(".RCIG-item");n?.classList.add("is-disabled"),e.setAttribute("disabled",""),n?.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",n=>{if(n.detail&&(n=n.detail),!n.item)return;const t=n.item.querySelector(".SearchFields-input"),o=t.value,i=n.from.classList.contains("is-clonable"),s=n.to.classList.contains("is-clonable"),c=e.closest(".SearchFields-hide");setTimeout(()=>{if(t.addEventListener("click",r),s&&i){n.item.remove();const e=c?.querySelector(`.SearchFields-input[value="${o}"]`).closest("li"),t=e.querySelector(".SearchFields-input");e.addEventListener("animationend",()=>{e.classList.remove("is-added")}),e.classList.add("is-added"),t.addEventListener("click",r),t.checked=!1}else i?(t.checked=!0,a(o,n.from)):c?.querySelectorAll(`.SearchFields-input[value="${o}"]`).forEach(e=>{const t=e.closest("li");t.classList.contains("is-disabled")&&(n.item.remove(),a(o,c),e.scrollIntoView({block:"center"}),e.checked=!1,t.addEventListener("animationend",()=>{t.classList.remove("is-added")}),t.classList.add("is-added"))})},0)})})});const s=(e,n,t,o)=>{e.classList.contains("is-selected")||(e.classList.toggle("is-selected"),n.classList.toggle("is-selected"),o.classList.toggle("is-hidden"),t.classList.toggle("is-hidden"))}},3689(e,n,t){"use strict";t(86634),t(49371),t(96648);var o=t(18101),i=t(76394),r=t(39242),a=t(45055),s=t(85211),c=t.n(s),d=t(93832),l=t(79365),p=t(17664);const M=window.BRIGHTSPOT?.ui.tooltips;function u(e,n){e.preventDefault(),e.stopPropagation();const t=e.target.closest(".SearchWidget-form"),o=t.querySelector(`.searchFiltersRest input[name="${n}"]`),i=t.querySelector('input[name="view"]'),r=t.querySelector(".SearchResult-views li.selected a").dataset.view;o.value=e.target.value,i.value=r,o.shadowField=n,o.dispatchEvent(new Event("change",{bubbles:!0}))}(0,a.A)(".searchResult-checkAll",e=>{const n=e.closest("table");if(n){const t=(0,i.A)(n,':scope > tbody input[type="checkbox"]'),o=()=>{const o=(0,i.A)(n,':scope > tbody input[type="checkbox"]:checked');e.checked=t.length>0&&o.length===t.length};for(const e of t)e.addEventListener("click",e=>{o()});e.addEventListener("click",n=>{const o=e.checked,i="data-frame-"+(o?"check":"uncheck");let r="";for(const n of t)n.checked=o,e.getAttribute(i).includes(n.value)||(r+=`&id=${encodeURIComponent(n.value)}`);e.setAttribute(i,e.getAttribute(i)+r)}),o()}}),(0,a.A)(".SearchResult-view > .SearchResult-actions.loaded",e=>{const n=e.closest(".SearchResult-view"),t=(0,o.A)("div",{className:"SearchResult-actions-wrapper"});e.querySelectorAll('[role="menuitem"]').forEach(e=>e.setAttribute("tabindex","-1"));const i=(0,o.A)("button",{className:"SearchResult-actions-toggle",id:"SearchResult-actions-toggle",title:M.actions?.actions,"aria-haspopup":"menu","aria-label":M.actions?.searchResult,"aria-expanded":"false",onclick:()=>{(0,l.H0)(e,i),(0,l.AM)(e,i)}});if(n.prepend(t),t.appendChild(i),t.appendChild(e),(0,l.D1)(e,i),n.closest('.SearchWidget[name="searchAdvancedFull"]'))return;const r=n.querySelector('.SearchResult-action-link[href*="/searchAdvancedFull"]'),a=(0,o.A)("button",{className:"SearchResult-fullscreen",title:M.fullScreenSearch,"aria-label":M.fullScreen,onclick:e=>{r.click()}});t.appendChild(a)}),(0,a.A)(".SearchResult-actions .SearchResult-selectionReset",e=>{e.addEventListener("click",()=>{const n=e.closest(".SearchResult-actions-wrapper");n?.querySelector(".SearchResult-actions-toggle")?.focus()})}),(0,a.A)(".SearchResult-views",e=>{const n=e.closest(".SearchWidget"),t=n?.querySelector(".searchFiltersRest");if(t){const n=t.querySelector('input[name="view"]');n&&e.querySelectorAll("[data-view]").forEach(e=>{e.addEventListener("click",()=>n.value=e.dataset.view)})}}),(0,a.A)(".SearchResult-images",e=>{const n=e.closest(".SearchWidget-form"),t=n?.querySelector('.searchFiltersRest input[name="iz"]'),i=e.closest(".SearchResult-list"),a=t?.value||d.A.get("BSP.SearchResult.imageHeight")||20;e.setAttribute("data-height",a),i&&(0,r.A)((0,o.A)("div",{className:"SearchResult-imageHeightInput"},(0,o.A)("input",{type:"range",title:M.imageHeight,min:1,max:100,step:1,value:a,"aria-label":M.imageHeight,"shadow-field":t?.name,oninput:({target:{value:n}})=>{e.setAttribute("data-height",n),d.A.set("BSP.SearchResult.imageHeight",n)},onmouseup:e=>{t&&a!==e.target.value&&u(e,t.name)}})),i)}),(0,a.A)(".SearchResult-board-field",e=>{e.addEventListener("change",n=>{u(n,e.name)})}),(0,a.A)(".SearchResult [data-highlight]",e=>{const n=e.dataset.highlight;if(n){const t=e.matches("table")&&e.querySelector("tbody")||e;new(c())(t).mark(n.trim().split(/\s+/),{className:"SearchResult-highlight"})}}),(0,a.A)('.Popup[name="bulkArchive"]',e=>{const n=e.parentNode.querySelector('.Popup[name="miscSearch"] .queryRestrictions'),t=e.querySelector(".closeButton");t&&t.addEventListener("click",function(){if(e.querySelector(".message.is-success")){let t=new CustomEvent("submit",{bubbles:!0});n.dispatchEvent(t),e.parentNode.removeChild(e)}})}),(0,a.A)('.Popup[name="miscSearch"] .SearchResult-list',e=>{e.addEventListener("click",function(e){const n=e.target.closest('a[href*="/edit.jsp"]');if(!n)return;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||0!==e.button)return;e.preventDefault();const t=(0,o.A)("div",{id:"searchResult-loader-overlay",className:"searchResult-loader-overlay"},(0,o.A)("span",{className:"searchResult-loader-spinner"}));t.style.zIndex=(0,p.default)(),document.body.appendChild(t),window.location=n.href})})},47025(e,n,t){"use strict";var o=t(45055),i=t(28211);(0,o.A)(".action-share",async e=>{const n=e.closest(".PreviewFrame");if(!n)return;const t=n.querySelector(".PreviewFrame-typeForm");let i=null;if(t){const e=t.querySelector('select[name="previewType"]');i=e.options[e.selectedIndex].value}e.addEventListener("click",n=>{let t=e.href;return!t||(i&&(t=t+"&defaultPreviewTypeId="+encodeURIComponent(i)),e.href=t,!0)}),(0,o.A)(".PreviewFrame-iFrameControlsForm",async n=>{n.addEventListener("submit",t=>{let o=e.getAttribute("data-original-href");if(o||(o=e.href,e.setAttribute("data-original-href",o)),!o)return!0;let i=new URLSearchParams(new FormData(n)).toString();return i&&(o=o+"&="+i),e.href=o,!0})})}),(0,o.A)(".SharePreview",async e=>{const n=e.querySelector(".PreviewFrame"),t=new i.A(n);t.isVisible=!0,t.updatePreview()})},74227(e,n,t){"use strict";function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function i(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},r.apply(null,arguments)}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach(function(n){i(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}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 d(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}t.d(n,{Ts:()=>Cn}),t(86634),t(57573),t(49371),t(42723),t(26780),t(96648),t(56673);var l=d(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),p=d(/Edge/i),M=d(/firefox/i),u=d(/safari/i)&&!d(/chrome/i)&&!d(/android/i),b=d(/iP(ad|od|hone)/i),h=d(/chrome/i)&&d(/android/i),z={capture:!1,passive:!1};function O(e,n,t){e.addEventListener(n,t,!l&&z)}function f(e,n,t){e.removeEventListener(n,t,!l&&z)}function m(e,n){if(n){if(">"===n[0]&&(n=n.substring(1)),e)try{if(e.matches)return e.matches(n);if(e.msMatchesSelector)return e.msMatchesSelector(n);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(n)}catch(e){return!1}return!1}}function g(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function A(e,n,t,o){if(e){t=t||document;do{if(null!=n&&(">"===n[0]?e.parentNode===t&&m(e,n):m(e,n))||o&&e===t)return e;if(e===t)break}while(e=g(e))}return null}var w,v=/\s+/g;function q(e,n,t){if(e&&n)if(e.classList)e.classList[t?"add":"remove"](n);else{var o=(" "+e.className+" ").replace(v," ").replace(" "+n+" "," ");e.className=(o+(t?" "+n:"")).replace(v," ")}}function k(e,n,t){var o=e&&e.style;if(o){if(void 0===t)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(t=e.currentStyle),void 0===n?t:t[n];n in o||-1!==n.indexOf("webkit")||(n="-webkit-"+n),o[n]=t+("string"==typeof t?"":"px")}}function _(e,n){var t="";if("string"==typeof e)t=e;else do{var o=k(e,"transform");o&&"none"!==o&&(t=o+" "+t)}while(!n&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function y(e,n,t){if(e){var o=e.getElementsByTagName(n),i=0,r=o.length;if(t)for(;i<r;i++)t(o[i],i);return o}return[]}function W(){return document.scrollingElement||document.documentElement}function x(e,n,t,o,i){if(e.getBoundingClientRect||e===window){var r,a,s,c,d,p,M;if(e!==window&&e.parentNode&&e!==W()?(a=(r=e.getBoundingClientRect()).top,s=r.left,c=r.bottom,d=r.right,p=r.height,M=r.width):(a=0,s=0,c=window.innerHeight,d=window.innerWidth,p=window.innerHeight,M=window.innerWidth),(n||t)&&e!==window&&(i=i||e.parentNode,!l))do{if(i&&i.getBoundingClientRect&&("none"!==k(i,"transform")||t&&"static"!==k(i,"position"))){var u=i.getBoundingClientRect();a-=u.top+parseInt(k(i,"border-top-width")),s-=u.left+parseInt(k(i,"border-left-width")),c=a+r.height,d=s+r.width;break}}while(i=i.parentNode);if(o&&e!==window){var b=_(i||e),h=b&&b.a,z=b&&b.d;b&&(c=(a/=z)+(p/=z),d=(s/=h)+(M/=h))}return{top:a,left:s,bottom:c,right:d,width:M,height:p}}}function L(e,n,t){for(var o=S(e,!0),i=x(e)[n];o;){var r=x(o)[t];if(!("top"===t||"left"===t?i>=r:i<=r))return o;if(o===W())break;o=S(o,!1)}return!1}function C(e,n,t,o){for(var i=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Xe.ghost&&(o||a[r]!==Xe.dragged)&&A(a[r],t.draggable,e,!1)){if(i===n)return a[r];i++}r++}return null}function R(e,n){for(var t=e.lastElementChild;t&&(t===Xe.ghost||"none"===k(t,"display")||n&&!m(t,n));)t=t.previousElementSibling;return t||null}function N(e,n){var t=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Xe.clone||n&&!m(e,n)||t++;return t}function B(e){var n=0,t=0,o=W();if(e)do{var i=_(e),r=i.a,a=i.d;n+=e.scrollLeft*r,t+=e.scrollTop*a}while(e!==o&&(e=e.parentNode));return[n,t]}function S(e,n){if(!e||!e.getBoundingClientRect)return W();var t=e,o=!1;do{if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=k(t);if(t.clientWidth<t.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||t.clientHeight<t.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!t.getBoundingClientRect||t===document.body)return W();if(o||n)return t;o=!0}}}while(t=t.parentNode);return W()}function T(e,n){return Math.round(e.top)===Math.round(n.top)&&Math.round(e.left)===Math.round(n.left)&&Math.round(e.height)===Math.round(n.height)&&Math.round(e.width)===Math.round(n.width)}function E(e,n){return function(){if(!w){var t=arguments;1===t.length?e.call(this,t[0]):e.apply(this,t),w=setTimeout(function(){w=void 0},n)}}}function D(e,n,t){e.scrollLeft+=n,e.scrollTop+=t}function j(e){var n=window.Polymer,t=window.jQuery||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):t?t(e).clone(!0)[0]:e.cloneNode(!0)}function P(e,n){k(e,"position","absolute"),k(e,"top",n.top),k(e,"left",n.left),k(e,"width",n.width),k(e,"height",n.height)}function X(e){k(e,"position",""),k(e,"top",""),k(e,"left",""),k(e,"width",""),k(e,"height","")}function H(e,n,t){var o={};return Array.from(e.children).forEach(function(i){var r,a,s,c;if(A(i,n.draggable,e,!1)&&!i.animated&&i!==t){var d=x(i);o.left=Math.min(null!==(r=o.left)&&void 0!==r?r:1/0,d.left),o.top=Math.min(null!==(a=o.top)&&void 0!==a?a:1/0,d.top),o.right=Math.max(null!==(s=o.right)&&void 0!==s?s:-1/0,d.right),o.bottom=Math.max(null!==(c=o.bottom)&&void 0!==c?c:-1/0,d.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var Y="Sortable"+(new Date).getTime();var I=[],F={initializeByDefault:!0},V={mount:function(e){for(var n in F)F.hasOwnProperty(n)&&!(n in e)&&(e[n]=F[n]);I.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),I.push(e)},pluginEvent:function(e,n,t){var o=this;this.eventCanceled=!1,t.cancel=function(){o.eventCanceled=!0};var i=e+"Global";I.forEach(function(o){n[o.pluginName]&&(n[o.pluginName][i]&&n[o.pluginName][i](s({sortable:n},t)),n.options[o.pluginName]&&n[o.pluginName][e]&&n[o.pluginName][e](s({sortable:n},t)))})},initializePlugins:function(e,n,t,o){for(var i in I.forEach(function(o){var i=o.pluginName;if(e.options[i]||o.initializeByDefault){var a=new o(e,n,e.options);a.sortable=e,a.options=e.options,e[i]=a,r(t,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,n){var t={};return I.forEach(function(o){"function"==typeof o.eventProperties&&r(t,o.eventProperties.call(n[o.pluginName],e))}),t},modifyOption:function(e,n,t){var o;return I.forEach(function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[n]&&(o=i.optionListeners[n].call(e[i.pluginName],t))}),o}};function G(e){var n=e.sortable,t=e.rootEl,o=e.name,i=e.targetEl,r=e.cloneEl,a=e.toEl,c=e.fromEl,d=e.oldIndex,M=e.newIndex,u=e.oldDraggableIndex,b=e.newDraggableIndex,h=e.originalEvent,z=e.putSortable,O=e.extraEventProperties;if(n=n||t&&t[Y]){var f,m=n.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||l||p?(f=document.createEvent("Event")).initEvent(o,!0,!0):f=new CustomEvent(o,{bubbles:!0,cancelable:!0}),f.to=a||t,f.from=c||t,f.item=i||t,f.clone=r,f.oldIndex=d,f.newIndex=M,f.oldDraggableIndex=u,f.newDraggableIndex=b,f.originalEvent=h,f.pullMode=z?z.lastPutMode:void 0;var A=s(s({},O),V.getEventProperties(o,n));for(var w in A)f[w]=A[w];t&&t.dispatchEvent(f),m[g]&&m[g].call(n,f)}}var U=["evt"],$=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=t.evt,i=function(e,n){if(null==e)return{};var t,o,i=function(e,n){if(null==e)return{};var t={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==n.indexOf(o))continue;t[o]=e[o]}return t}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)t=r[o],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(t,U);V.pluginEvent.bind(Xe)(e,n,s({dragEl:K,parentEl:Z,ghostEl:Q,rootEl:ee,nextEl:ne,lastDownEl:te,cloneEl:oe,cloneHidden:ie,dragStarted:Oe,putSortable:le,activeSortable:Xe.active,originalEvent:o,oldIndex:re,oldDraggableIndex:se,newIndex:ae,newDraggableIndex:ce,hideGhostForTarget:Ee,unhideGhostForTarget:De,cloneNowHidden:function(){ie=!0},cloneNowShown:function(){ie=!1},dispatchSortableEvent:function(e){J({sortable:n,name:e,originalEvent:o})}},i))};function J(e){G(s({putSortable:le,cloneEl:oe,targetEl:K,rootEl:ee,oldIndex:re,oldDraggableIndex:se,newIndex:ae,newDraggableIndex:ce},e))}var K,Z,Q,ee,ne,te,oe,ie,re,ae,se,ce,de,le,pe,Me,ue,be,he,ze,Oe,fe,me,ge,Ae,we=!1,ve=!1,qe=[],ke=!1,_e=!1,ye=[],We=!1,xe=[],Le="undefined"!=typeof document,Ce=b,Re=p||l?"cssFloat":"float",Ne=Le&&!h&&!b&&"draggable"in document.createElement("div"),Be=function(){if(Le){if(l)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Se=function(e,n){var t=k(e),o=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),i=C(e,0,n),r=C(e,1,n),a=i&&k(i),s=r&&k(r),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+x(i).width,d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+x(r).width;if("flex"===t.display)return"column"===t.flexDirection||"column-reverse"===t.flexDirection?"vertical":"horizontal";if("grid"===t.display)return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var l="left"===a.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==l?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=o&&"none"===t[Re]||r&&"none"===t[Re]&&c+d>o)?"vertical":"horizontal"},Te=function(e){function n(e,t){return function(o,i,r,a){var s=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==e&&(t||s))return!0;if(null==e||!1===e)return!1;if(t&&"clone"===e)return e;if("function"==typeof e)return n(e(o,i,r,a),t)(o,i,r,a);var c=(t?o:i).options.group.name;return!0===e||"string"==typeof e&&e===c||e.join&&e.indexOf(c)>-1}}var t={},o=e.group;o&&"object"==c(o)||(o={name:o}),t.name=o.name,t.checkPull=n(o.pull,!0),t.checkPut=n(o.put),t.revertClone=o.revertClone,e.group=t},Ee=function(){!Be&&Q&&k(Q,"display","none")},De=function(){!Be&&Q&&k(Q,"display","")};Le&&!h&&document.addEventListener("click",function(e){if(ve)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ve=!1,!1},!0);var je=function(e){if(K){e=e.touches?e.touches[0]:e;var n=(i=e.clientX,r=e.clientY,qe.some(function(e){var n=e[Y].options.emptyInsertThreshold;if(n&&!R(e)){var t=x(e),o=i>=t.left-n&&i<=t.right+n,s=r>=t.top-n&&r<=t.bottom+n;return o&&s?a=e:void 0}}),a);if(n){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);t.target=t.rootEl=n,t.preventDefault=void 0,t.stopPropagation=void 0,n[Y]._onDragOver(t)}}var i,r,a},Pe=function(e){K&&K.parentNode[Y]._isOutsideThisEl(e.target)};function Xe(e,n){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=n=r({},n),e[Y]=this;var t,o,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 Se(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,n){e.setData("Text",n.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!==Xe.supportPointer&&"PointerEvent"in window&&(!u||b),emptyInsertThreshold:5};for(var a in V.initializePlugins(this,e,i),i)!(a in n)&&(n[a]=i[a]);for(var c in Te(n),this)"_"===c.charAt(0)&&"function"==typeof this[c]&&(this[c]=this[c].bind(this));this.nativeDraggable=!n.forceFallback&&Ne,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?O(e,"pointerdown",this._onTapStart):(O(e,"mousedown",this._onTapStart),O(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(O(e,"dragover",this),O(e,"dragenter",this)),qe.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),r(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(e){if("none"!==k(e,"display")&&e!==Xe.ghost){o.push({target:e,rect:x(e)});var n=s({},o[o.length-1].rect);if(e.thisAnimationDuration){var t=_(e,!0);t&&(n.top-=t.f,n.left-=t.e)}e.fromRect=n}})},addAnimationState:function(e){o.push(e)},removeAnimationState:function(e){o.splice(function(e,n){for(var t in e)if(e.hasOwnProperty(t))for(var o in n)if(n.hasOwnProperty(o)&&n[o]===e[t][o])return Number(t);return-1}(o,{target:e}),1)},animateAll:function(e){var n=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof e&&e());var i=!1,r=0;o.forEach(function(e){var t=0,o=e.target,a=o.fromRect,s=x(o),c=o.prevFromRect,d=o.prevToRect,l=e.rect,p=_(o,!0);p&&(s.top-=p.f,s.left-=p.e),o.toRect=s,o.thisAnimationDuration&&T(c,s)&&!T(a,s)&&(l.top-s.top)/(l.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(t=function(e,n,t,o){return Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))/Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))*o.animation}(l,c,d,n.options)),T(s,a)||(o.prevFromRect=a,o.prevToRect=s,t||(t=n.options.animation),n.animate(o,l,s,t)),t&&(i=!0,r=Math.max(r,t),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout(function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null},t),o.thisAnimationDuration=t)}),clearTimeout(t),i?t=setTimeout(function(){"function"==typeof e&&e()},r):"function"==typeof e&&e(),o=[]},animate:function(e,n,t,o){if(o){k(e,"transition",""),k(e,"transform","");var i=_(this.el),r=i&&i.a,a=i&&i.d,s=(n.left-t.left)/(r||1),c=(n.top-t.top)/(a||1);e.animatingX=!!s,e.animatingY=!!c,k(e,"transform","translate3d("+s+"px,"+c+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),k(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),k(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){k(e,"transition",""),k(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},o)}}}))}function He(e,n,t,o,i,r,a,s){var c,d,M=e[Y],u=M.options.onMove;return!window.CustomEvent||l||p?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=n,c.from=e,c.dragged=t,c.draggedRect=o,c.related=i||n,c.relatedRect=r||x(n),c.willInsertAfter=s,c.originalEvent=a,e.dispatchEvent(c),u&&(d=u.call(M,c,a)),d}function Ye(e){e.draggable=!1}function Ie(){We=!1}function Fe(e){for(var n=e.tagName+e.className+e.src+e.href+e.textContent,t=n.length,o=0;t--;)o+=n.charCodeAt(t);return o.toString(36)}function Ve(e){return setTimeout(e,0)}function Ge(e){return clearTimeout(e)}Xe.prototype={constructor:Xe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(fe=null)},_getDirection:function(e,n){return"function"==typeof this.options.direction?this.options.direction.call(this,e,n,K):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,t=this.el,o=this.options,i=o.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,d=o.filter;if(function(e){xe.length=0;for(var n=e.getElementsByTagName("input"),t=n.length;t--;){var o=n[t];o.checked&&xe.push(o)}}(t),!K&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||o.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!u||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=A(s,o.draggable,t,!1))&&s.animated||te===s)){if(re=N(s),se=N(s,o.draggable),"function"==typeof d){if(d.call(this,e,s,this))return J({sortable:n,rootEl:c,name:"filter",targetEl:s,toEl:t,fromEl:t}),$("filter",n,{evt:e}),void(i&&e.preventDefault())}else if(d&&(d=d.split(",").some(function(o){if(o=A(c,o.trim(),t,!1))return J({sortable:n,rootEl:o,name:"filter",targetEl:s,fromEl:t,toEl:t}),$("filter",n,{evt:e}),!0})))return void(i&&e.preventDefault());o.handle&&!A(c,o.handle,t,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,n,t){var o,i=this,r=i.el,a=i.options,s=r.ownerDocument;if(t&&!K&&t.parentNode===r){var c=x(t);if(ee=r,Z=(K=t).parentNode,ne=K.nextSibling,te=t,de=a.group,Xe.dragged=K,pe={target:K,clientX:(n||e).clientX,clientY:(n||e).clientY},he=pe.clientX-c.left,ze=pe.clientY-c.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,K.style["will-change"]="all",o=function(){$("delayEnded",i,{evt:e}),Xe.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!M&&i.nativeDraggable&&(K.draggable=!0),i._triggerDragStart(e,n),J({sortable:i,name:"choose",originalEvent:e}),q(K,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){y(K,e.trim(),Ye)}),O(s,"dragover",je),O(s,"mousemove",je),O(s,"touchmove",je),a.supportPointer?(O(s,"pointerup",i._onDrop),!this.nativeDraggable&&O(s,"pointercancel",i._onDrop)):(O(s,"mouseup",i._onDrop),O(s,"touchend",i._onDrop),O(s,"touchcancel",i._onDrop)),M&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),$("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!n||this.nativeDraggable&&(p||l))o();else{if(Xe.eventCanceled)return void this._onDrop();a.supportPointer?(O(s,"pointerup",i._disableDelayedDrag),O(s,"pointercancel",i._disableDelayedDrag)):(O(s,"mouseup",i._disableDelayedDrag),O(s,"touchend",i._disableDelayedDrag),O(s,"touchcancel",i._disableDelayedDrag)),O(s,"mousemove",i._delayedDragTouchMoveHandler),O(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&O(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Ye(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,n){n=n||"touch"==e.pointerType&&e,!this.nativeDraggable||n?this.options.supportPointer?O(document,"pointermove",this._onTouchMove):O(document,n?"touchmove":"mousemove",this._onTouchMove):(O(K,"dragend",this),O(ee,"dragstart",this._onDragStart));try{document.selection?Ve(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,n){if(we=!1,ee&&K){$("dragStarted",this,{evt:n}),this.nativeDraggable&&O(document,"dragover",Pe);var t=this.options;!e&&q(K,t.dragClass,!1),q(K,t.ghostClass,!0),Xe.active=this,e&&this._appendGhost(),J({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Me){this._lastX=Me.clientX,this._lastY=Me.clientY,Ee();for(var e=document.elementFromPoint(Me.clientX,Me.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Me.clientX,Me.clientY))!==n;)n=e;if(K.parentNode[Y]._isOutsideThisEl(e),n)do{if(n[Y]&&n[Y]._onDragOver({clientX:Me.clientX,clientY:Me.clientY,target:e,rootEl:n})&&!this.options.dragoverBubble)break;e=n}while(n=g(n));De()}},_onTouchMove:function(e){if(pe){var n=this.options,t=n.fallbackTolerance,o=n.fallbackOffset,i=e.touches?e.touches[0]:e,r=Q&&_(Q,!0),a=Q&&r&&r.a,s=Q&&r&&r.d,c=Ce&&Ae&&B(Ae),d=(i.clientX-pe.clientX+o.x)/(a||1)+(c?c[0]-ye[0]:0)/(a||1),l=(i.clientY-pe.clientY+o.y)/(s||1)+(c?c[1]-ye[1]:0)/(s||1);if(!Xe.active&&!we){if(t&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<t)return;this._onDragStart(e,!0)}if(Q){r?(r.e+=d-(ue||0),r.f+=l-(be||0)):r={a:1,b:0,c:0,d:1,e:d,f:l};var p="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");k(Q,"webkitTransform",p),k(Q,"mozTransform",p),k(Q,"msTransform",p),k(Q,"transform",p),ue=d,be=l,Me=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Q){var e=this.options.fallbackOnBody?document.body:ee,n=x(K,!0,Ce,!0,e),t=this.options;if(Ce){for(Ae=e;"static"===k(Ae,"position")&&"none"===k(Ae,"transform")&&Ae!==document;)Ae=Ae.parentNode;Ae!==document.body&&Ae!==document.documentElement?(Ae===document&&(Ae=W()),n.top+=Ae.scrollTop,n.left+=Ae.scrollLeft):Ae=W(),ye=B(Ae)}q(Q=K.cloneNode(!0),t.ghostClass,!1),q(Q,t.fallbackClass,!0),q(Q,t.dragClass,!0),k(Q,"transition",""),k(Q,"transform",""),k(Q,"box-sizing","border-box"),k(Q,"margin",0),k(Q,"top",n.top),k(Q,"left",n.left),k(Q,"width",n.width),k(Q,"height",n.height),k(Q,"opacity","0.8"),k(Q,"position",Ce?"absolute":"fixed"),k(Q,"zIndex","100000"),k(Q,"pointerEvents","none"),Xe.ghost=Q,e.appendChild(Q),k(Q,"transform-origin",he/parseInt(Q.style.width)*100+"% "+ze/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(e,n){var t=this,o=e.dataTransfer,i=t.options;$("dragStart",this,{evt:e}),Xe.eventCanceled?this._onDrop():($("setupClone",this),Xe.eventCanceled||((oe=j(K)).removeAttribute("id"),oe.draggable=!1,oe.style["will-change"]="",this._hideClone(),q(oe,this.options.chosenClass,!1),Xe.clone=oe),t.cloneId=Ve(function(){$("clone",t),Xe.eventCanceled||(t.options.removeCloneOnHide||ee.insertBefore(oe,K),t._hideClone(),J({sortable:t,name:"clone"}))}),!n&&q(K,i.dragClass,!0),n?(ve=!0,t._loopId=setInterval(t._emulateDragOver,50)):(f(document,"mouseup",t._onDrop),f(document,"touchend",t._onDrop),f(document,"touchcancel",t._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(t,o,K)),O(document,"drop",t),k(K,"transform","translateZ(0)")),we=!0,t._dragStartId=Ve(t._dragStarted.bind(t,n,e)),O(document,"selectstart",t),Oe=!0,window.getSelection().removeAllRanges(),u&&k(document.body,"user-select","none"))},_onDragOver:function(e){var n,t,o,i,r=this.el,a=e.target,c=this.options,d=c.group,l=Xe.active,p=de===d,M=c.sort,u=le||l,b=this,h=!1;if(!We){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=A(a,c.draggable,r,!0),j("dragOver"),Xe.eventCanceled)return h;if(K.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||b._ignoreWhileAnimating===a)return X(!1);if(ve=!1,l&&!c.disabled&&(p?M||(o=Z!==ee):le===this||(this.lastPutMode=de.checkPull(this,l,K,e))&&d.checkPut(this,l,K,e))){if(i="vertical"===this._getDirection(e,a),n=x(K),j("dragOverValid"),Xe.eventCanceled)return h;if(o)return Z=ee,P(),this._hideClone(),j("revert"),Xe.eventCanceled||(ne?ee.insertBefore(K,ne):ee.appendChild(K)),X(!0);var z=R(r,c.draggable);if(!z||function(e,n,t){var o=x(R(t.el,t.options.draggable)),i=H(t.el,t.options,Q);return n?e.clientX>i.right+10||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>i.bottom+10||e.clientX>o.right&&e.clientY>o.top}(e,i,this)&&!z.animated){if(z===K)return X(!1);if(z&&r===e.target&&(a=z),a&&(t=x(a)),!1!==He(ee,r,K,n,a,t,e,!!a))return P(),z&&z.nextSibling?r.insertBefore(K,z.nextSibling):r.appendChild(K),Z=r,I(),X(!0)}else if(z&&function(e,n,t){var o=x(C(t.el,0,t.options,!0)),i=H(t.el,t.options,Q);return n?e.clientX<i.left-10||e.clientY<o.top&&e.clientX<o.right:e.clientY<i.top-10||e.clientY<o.bottom&&e.clientX<o.left}(e,i,this)){var O=C(r,0,c,!0);if(O===K)return X(!1);if(t=x(a=O),!1!==He(ee,r,K,n,a,t,e,!1))return P(),r.insertBefore(K,O),Z=r,I(),X(!0)}else if(a.parentNode===r){t=x(a);var f,m,g,w=K.parentNode!==r,v=!function(e,n,t){var o=t?e.left:e.top,i=t?e.right:e.bottom,r=t?e.width:e.height,a=t?n.left:n.top,s=t?n.right:n.bottom,c=t?n.width:n.height;return o===a||i===s||o+r/2===a+c/2}(K.animated&&K.toRect||n,a.animated&&a.toRect||t,i),_=i?"top":"left",y=L(a,"top","top")||L(K,"top","top"),W=y?y.scrollTop:void 0;if(fe!==a&&(m=t[_],ke=!1,_e=!v&&c.invertSwap||w),f=function(e,n,t,o,i,r,a,s){var c=o?e.clientY:e.clientX,d=o?t.height:t.width,l=o?t.top:t.left,p=o?t.bottom:t.right,M=!1;if(!a)if(s&&ge<d*i){if(!ke&&(1===me?c>l+d*r/2:c<p-d*r/2)&&(ke=!0),ke)M=!0;else if(1===me?c<l+ge:c>p-ge)return-me}else if(c>l+d*(1-i)/2&&c<p-d*(1-i)/2)return function(e){return N(K)<N(e)?1:-1}(n);return(M=M||a)&&(c<l+d*r/2||c>p-d*r/2)?c>l+d/2?1:-1:0}(e,a,t,i,v?1:c.swapThreshold,null==c.invertedSwapThreshold?c.swapThreshold:c.invertedSwapThreshold,_e,fe===a),0!==f){var B=N(K);do{B-=f,g=Z.children[B]}while(g&&("none"===k(g,"display")||g===Q))}if(0===f||g===a)return X(!1);fe=a,me=f;var S=a.nextElementSibling,T=!1,E=He(ee,r,K,n,a,t,e,T=1===f);if(!1!==E)return 1!==E&&-1!==E||(T=1===E),We=!0,setTimeout(Ie,30),P(),T&&!S?r.appendChild(K):a.parentNode.insertBefore(K,T?S:a),y&&D(y,0,W-y.scrollTop),Z=K.parentNode,void 0===m||_e||(ge=Math.abs(m-x(a)[_])),I(),X(!0)}if(r.contains(K))return X(!1)}return!1}function j(c,d){$(c,b,s({evt:e,isOwner:p,axis:i?"vertical":"horizontal",revert:o,dragRect:n,targetRect:t,canSort:M,fromSortable:u,target:a,completed:X,onMove:function(t,o){return He(ee,r,K,n,t,x(t),e,o)},changed:I},d))}function P(){j("dragOverAnimationCapture"),b.captureAnimationState(),b!==u&&u.captureAnimationState()}function X(n){return j("dragOverCompleted",{insertion:n}),n&&(p?l._hideClone():l._showClone(b),b!==u&&(q(K,le?le.options.ghostClass:l.options.ghostClass,!1),q(K,c.ghostClass,!0)),le!==b&&b!==Xe.active?le=b:b===Xe.active&&le&&(le=null),u===b&&(b._ignoreWhileAnimating=a),b.animateAll(function(){j("dragOverAnimationComplete"),b._ignoreWhileAnimating=null}),b!==u&&(u.animateAll(),u._ignoreWhileAnimating=null)),(a===K&&!K.animated||a===r&&!a.animated)&&(fe=null),c.dragoverBubble||e.rootEl||a===document||(K.parentNode[Y]._isOutsideThisEl(e.target),!n&&je(e)),!c.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function I(){ae=N(K),ce=N(K,c.draggable),J({sortable:b,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",je),f(document,"mousemove",je),f(document,"touchmove",je)},_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 n=this.el,t=this.options;ae=N(K),ce=N(K,t.draggable),$("drop",this,{evt:e}),Z=K&&K.parentNode,ae=N(K),ce=N(K,t.draggable),Xe.eventCanceled||(we=!1,_e=!1,ke=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ge(this.cloneId),Ge(this._dragStartId),this.nativeDraggable&&(f(document,"drop",this),f(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),u&&k(document.body,"user-select",""),k(K,"transform",""),e&&(Oe&&(e.cancelable&&e.preventDefault(),!t.dropBubble&&e.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(ee===Z||le&&"clone"!==le.lastPutMode)&&oe&&oe.parentNode&&oe.parentNode.removeChild(oe),K&&(this.nativeDraggable&&f(K,"dragend",this),Ye(K),K.style["will-change"]="",Oe&&!we&&q(K,le?le.options.ghostClass:this.options.ghostClass,!1),q(K,this.options.chosenClass,!1),J({sortable:this,name:"unchoose",toEl:Z,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==Z?(ae>=0&&(J({rootEl:Z,name:"add",toEl:Z,fromEl:ee,originalEvent:e}),J({sortable:this,name:"remove",toEl:Z,originalEvent:e}),J({rootEl:Z,name:"sort",toEl:Z,fromEl:ee,originalEvent:e}),J({sortable:this,name:"sort",toEl:Z,originalEvent:e})),le&&le.save()):ae!==re&&ae>=0&&(J({sortable:this,name:"update",toEl:Z,originalEvent:e}),J({sortable:this,name:"sort",toEl:Z,originalEvent:e})),Xe.active&&(null!=ae&&-1!==ae||(ae=re,ce=se),J({sortable:this,name:"end",toEl:Z,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){$("nulling",this),ee=K=Z=Q=ne=oe=te=ie=pe=Me=Oe=ae=ce=re=se=fe=me=le=de=Xe.dragged=Xe.ghost=Xe.clone=Xe.active=null;var e=this.el;xe.forEach(function(n){e.contains(n)&&(n.checked=!0)}),xe.length=ue=be=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,n=[],t=this.el.children,o=0,i=t.length,r=this.options;o<i;o++)A(e=t[o],r.draggable,this.el,!1)&&n.push(e.getAttribute(r.dataIdAttr)||Fe(e));return n},sort:function(e,n){var t={},o=this.el;this.toArray().forEach(function(e,n){var i=o.children[n];A(i,this.options.draggable,o,!1)&&(t[e]=i)},this),n&&this.captureAnimationState(),e.forEach(function(e){t[e]&&(o.removeChild(t[e]),o.appendChild(t[e]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return A(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var t=this.options;if(void 0===n)return t[e];var o=V.modifyOption(this,e,n);t[e]=void 0!==o?o:n,"group"===e&&Te(t)},destroy:function(){$("destroy",this);var e=this.el;e[Y]=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(),qe.splice(qe.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ie){if($("hideClone",this),Xe.eventCanceled)return;k(oe,"display","none"),this.options.removeCloneOnHide&&oe.parentNode&&oe.parentNode.removeChild(oe),ie=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ie){if($("showClone",this),Xe.eventCanceled)return;K.parentNode!=ee||this.options.group.revertClone?ne?ee.insertBefore(oe,ne):ee.appendChild(oe):ee.insertBefore(oe,K),this.options.group.revertClone&&this.animate(K,oe),k(oe,"display",""),ie=!1}}else this._hideClone()}},Le&&O(document,"touchmove",function(e){(Xe.active||we)&&e.cancelable&&e.preventDefault()}),Xe.utils={on:O,off:f,css:k,find:y,is:function(e,n){return!!A(e,n,e,!1)},extend:function(e,n){if(e&&n)for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e},throttle:E,closest:A,toggleClass:q,clone:j,index:N,nextTick:Ve,cancelNextTick:Ge,detectDirection:Se,getChild:C,expando:Y},Xe.get=function(e){return e[Y]},Xe.mount=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];n[0].constructor===Array&&(n=n[0]),n.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&&(Xe.utils=s(s({},Xe.utils),e.utils)),V.mount(e)})},Xe.create=function(e,n){return new Xe(e,n)},Xe.version="1.15.7";var Ue,$e,Je,Ke,Ze,Qe,en=[],nn=!1;function tn(){en.forEach(function(e){clearInterval(e.pid)}),en=[]}function on(){clearInterval(Qe)}var rn=E(function(e,n,t,o){if(n.scroll){var i,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=n.scrollSensitivity,c=n.scrollSpeed,d=W(),l=!1;$e!==t&&($e=t,tn(),Ue=n.scroll,i=n.scrollFn,!0===Ue&&(Ue=S(t,!0)));var p=0,M=Ue;do{var u=M,b=x(u),h=b.top,z=b.bottom,O=b.left,f=b.right,m=b.width,g=b.height,A=void 0,w=void 0,v=u.scrollWidth,q=u.scrollHeight,_=k(u),y=u.scrollLeft,L=u.scrollTop;u===d?(A=m<v&&("auto"===_.overflowX||"scroll"===_.overflowX||"visible"===_.overflowX),w=g<q&&("auto"===_.overflowY||"scroll"===_.overflowY||"visible"===_.overflowY)):(A=m<v&&("auto"===_.overflowX||"scroll"===_.overflowX),w=g<q&&("auto"===_.overflowY||"scroll"===_.overflowY));var C=A&&(Math.abs(f-r)<=s&&y+m<v)-(Math.abs(O-r)<=s&&!!y),R=w&&(Math.abs(z-a)<=s&&L+g<q)-(Math.abs(h-a)<=s&&!!L);if(!en[p])for(var N=0;N<=p;N++)en[N]||(en[N]={});en[p].vx==C&&en[p].vy==R&&en[p].el===u||(en[p].el=u,en[p].vx=C,en[p].vy=R,clearInterval(en[p].pid),0==C&&0==R||(l=!0,en[p].pid=setInterval(function(){o&&0===this.layer&&Xe.active._onTouchMove(Ze);var n=en[this.layer].vy?en[this.layer].vy*c:0,t=en[this.layer].vx?en[this.layer].vx*c:0;"function"==typeof i&&"continue"!==i.call(Xe.dragged.parentNode[Y],t,n,e,Ze,en[this.layer].el)||D(en[this.layer].el,t,n)}.bind({layer:p}),24))),p++}while(n.bubbleScroll&&M!==d&&(M=S(M,!1)));nn=l}},30),an=function(e){var n=e.originalEvent,t=e.putSortable,o=e.dragEl,i=e.activeSortable,r=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(n){var c=t||i;a();var d=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,l=document.elementFromPoint(d.clientX,d.clientY);s(),c&&!c.el.contains(l)&&(r("spill"),this.onSpill({dragEl:o,putSortable:t}))}};function sn(){}function cn(){}sn.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,t=e.putSortable;this.sortable.captureAnimationState(),t&&t.captureAnimationState();var o=C(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),t&&t.animateAll()},drop:an},r(sn,{pluginName:"revertOnSpill"}),cn.prototype={onSpill:function(e){var n=e.dragEl,t=e.putSortable||this.sortable;t.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),t.animateAll()},drop:an},r(cn,{pluginName:"removeOnSpill"});var dn,ln,pn,Mn,un,bn=[],hn=[],zn=!1,On=!1,fn=!1;function mn(){function e(e){for(var n in this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?O(document,"pointerup",this._deselectMultiDrag):(O(document,"mouseup",this._deselectMultiDrag),O(document,"touchend",this._deselectMultiDrag))),O(document,"keydown",this._checkKeyDown),O(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(n,t){var o="";bn.length&&ln===e?bn.forEach(function(e,n){o+=(n?", ":"")+e.textContent}):o=t.textContent,n.setData("Text",o)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var n=e.dragEl;pn=n},delayEnded:function(){this.isMultiDrag=~bn.indexOf(pn)},setupClone:function(e){var n=e.sortable,t=e.cancel;if(this.isMultiDrag){for(var o=0;o<bn.length;o++)hn.push(j(bn[o])),hn[o].sortableIndex=bn[o].sortableIndex,hn[o].draggable=!1,hn[o].style["will-change"]="",q(hn[o],this.options.selectedClass,!1),bn[o]===pn&&q(hn[o],this.options.chosenClass,!1);n._hideClone(),t()}},clone:function(e){var n=e.sortable,t=e.rootEl,o=e.dispatchSortableEvent,i=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||bn.length&&ln===n&&(gn(!0,t),o("clone"),i()))},showClone:function(e){var n=e.cloneNowShown,t=e.rootEl,o=e.cancel;this.isMultiDrag&&(gn(!1,t),hn.forEach(function(e){k(e,"display","")}),n(),un=!1,o())},hideClone:function(e){var n=this,t=(e.sortable,e.cloneNowHidden),o=e.cancel;this.isMultiDrag&&(hn.forEach(function(e){k(e,"display","none"),n.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)}),t(),un=!0,o())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&ln&&ln.multiDrag._deselectMultiDrag(),bn.forEach(function(e){e.sortableIndex=N(e)}),bn=bn.sort(function(e,n){return e.sortableIndex-n.sortableIndex}),fn=!0},dragStarted:function(e){var n=this,t=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(t.captureAnimationState(),this.options.animation)){bn.forEach(function(e){e!==pn&&k(e,"position","absolute")});var o=x(pn,!1,!0,!0);bn.forEach(function(e){e!==pn&&P(e,o)}),On=!0,zn=!0}t.animateAll(function(){On=!1,zn=!1,n.options.animation&&bn.forEach(function(e){X(e)}),n.options.sort&&An()})}},dragOver:function(e){var n=e.target,t=e.completed,o=e.cancel;On&&~bn.indexOf(n)&&(t(!1),o())},revert:function(e){var n=e.fromSortable,t=e.rootEl,o=e.sortable,i=e.dragRect;bn.length>1&&(bn.forEach(function(e){o.addAnimationState({target:e,rect:On?x(e):i}),X(e),e.fromRect=i,n.removeAnimationState(e)}),On=!1,function(e,n){bn.forEach(function(t,o){var i=n.children[t.sortableIndex+(e?Number(o):0)];i?n.insertBefore(t,i):n.appendChild(t)})}(!this.options.removeCloneOnHide,t))},dragOverCompleted:function(e){var n=e.sortable,t=e.isOwner,o=e.insertion,i=e.activeSortable,r=e.parentEl,a=e.putSortable,s=this.options;if(o){if(t&&i._hideClone(),zn=!1,s.animation&&bn.length>1&&(On||!t&&!i.options.sort&&!a)){var c=x(pn,!1,!0,!0);bn.forEach(function(e){e!==pn&&(P(e,c),r.appendChild(e))}),On=!0}if(!t)if(On||An(),bn.length>1){var d=un;i._showClone(n),i.options.animation&&!un&&d&&hn.forEach(function(e){i.addAnimationState({target:e,rect:Mn}),e.fromRect=Mn,e.thisAnimationDuration=null})}else i._showClone(n)}},dragOverAnimationCapture:function(e){var n=e.dragRect,t=e.isOwner,o=e.activeSortable;if(bn.forEach(function(e){e.thisAnimationDuration=null}),o.options.animation&&!t&&o.multiDrag.isMultiDrag){Mn=r({},n);var i=_(pn,!0);Mn.top-=i.f,Mn.left-=i.e}},dragOverAnimationComplete:function(){On&&(On=!1,An())},drop:function(e){var n=e.originalEvent,t=e.rootEl,o=e.parentEl,i=e.sortable,r=e.dispatchSortableEvent,a=e.oldIndex,s=e.putSortable,c=s||this.sortable;if(n){var d=this.options,l=o.children;if(!fn)if(d.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),q(pn,d.selectedClass,!~bn.indexOf(pn)),~bn.indexOf(pn))bn.splice(bn.indexOf(pn),1),dn=null,G({sortable:i,rootEl:t,name:"deselect",targetEl:pn,originalEvent:n});else{if(bn.push(pn),G({sortable:i,rootEl:t,name:"select",targetEl:pn,originalEvent:n}),n.shiftKey&&dn&&i.el.contains(dn)){var p=N(dn),M=N(pn);~p&&~M&&p!==M&&function(){var e,r;M>p?(r=p,e=M):(r=M,e=p+1);for(var a=d.filter;r<e;r++)~bn.indexOf(l[r])||A(l[r],d.draggable,o,!1)&&(a&&("function"==typeof a?a.call(i,n,l[r],i):a.split(",").some(function(e){return A(l[r],e.trim(),o,!1)}))||(q(l[r],d.selectedClass,!0),bn.push(l[r]),G({sortable:i,rootEl:t,name:"select",targetEl:l[r],originalEvent:n})))}()}else dn=pn;ln=c}if(fn&&this.isMultiDrag){if(On=!1,(o[Y].options.sort||o!==t)&&bn.length>1){var u=x(pn),b=N(pn,":not(."+this.options.selectedClass+")");if(!zn&&d.animation&&(pn.thisAnimationDuration=null),c.captureAnimationState(),!zn&&(d.animation&&(pn.fromRect=u,bn.forEach(function(e){if(e.thisAnimationDuration=null,e!==pn){var n=On?x(e):u;e.fromRect=n,c.addAnimationState({target:e,rect:n})}})),An(),bn.forEach(function(e){l[b]?o.insertBefore(e,l[b]):o.appendChild(e),b++}),a===N(pn))){var h=!1;bn.forEach(function(e){e.sortableIndex===N(e)||(h=!0)}),h&&(r("update"),r("sort"))}bn.forEach(function(e){X(e)}),c.animateAll()}ln=c}(t===o||s&&"clone"!==s.lastPutMode)&&hn.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})}},nullingGlobal:function(){this.isMultiDrag=fn=!1,hn.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!==fn&&fn||ln!==this.sortable||e&&A(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;bn.length;){var n=bn[0];q(n,this.options.selectedClass,!1),bn.shift(),G({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:n,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 n=e.parentNode[Y];n&&n.options.multiDrag&&!~bn.indexOf(e)&&(ln&&ln!==n&&(ln.multiDrag._deselectMultiDrag(),ln=n),q(e,n.options.selectedClass,!0),bn.push(e))},deselect:function(e){var n=e.parentNode[Y],t=bn.indexOf(e);n&&n.options.multiDrag&&~t&&(q(e,n.options.selectedClass,!1),bn.splice(t,1))}},eventProperties:function(){var e,n=this,t=[],i=[];return bn.forEach(function(e){var o;t.push({multiDragElement:e,index:e.sortableIndex}),o=On&&e!==pn?-1:On?N(e,":not(."+n.options.selectedClass+")"):N(e),i.push({multiDragElement:e,index:o})}),{items:(e=bn,function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return o(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?o(e,n):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(hn),oldIndicies:t,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 gn(e,n){hn.forEach(function(t,o){var i=n.children[t.sortableIndex+(e?Number(o):0)];i?n.insertBefore(t,i):n.appendChild(t)})}function An(){bn.forEach(function(e){e!==pn&&e.parentNode&&e.parentNode.removeChild(e)})}Xe.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 n=e.originalEvent;this.sortable.nativeDraggable?O(document,"dragover",this._handleAutoScroll):this.options.supportPointer?O(document,"pointermove",this._handleFallbackAutoScroll):n.touches?O(document,"touchmove",this._handleFallbackAutoScroll):O(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var n=e.originalEvent;this.options.dragOverBubble||n.rootEl||this._handleAutoScroll(n)},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)),on(),tn(),clearTimeout(w),w=void 0},nulling:function(){Ze=$e=Ue=nn=Qe=Je=Ke=null,en.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,n){var t=this,o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(o,i);if(Ze=e,n||this.options.forceAutoScrollFallback||p||l||u){rn(e,this.options,r,n);var a=S(r,!0);!nn||Qe&&o===Je&&i===Ke||(Qe&&on(),Qe=setInterval(function(){var r=S(document.elementFromPoint(o,i),!0);r!==a&&(a=r,tn()),rn(e,t.options,r,n)},10),Je=o,Ke=i)}else{if(!this.options.bubbleScroll||S(r,!0)===W())return void tn();rn(e,this.options,S(r,!1),!1)}}},r(e,{pluginName:"scroll",initializeByDefault:!0})}),Xe.mount(cn,sn);const wn=Xe;var vn=t(18101),qn=t(45055),kn=t(24510),_n=t(23902),yn=t(17664),Wn=t(90127),xn=t(50965),Ln=t(88630);const Cn=()=>wn.mount(new mn),Rn=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 n=e.getAttribute("data-sortable-item-type");return n?[...document.querySelectorAll(`[data-sortable-valid-item-types~="${n}"][data-read-only="false"]`)]:[...document.querySelectorAll(".Sortable:not([data-sortable-valid-item-types])")]},Nn=(e,n,t)=>{const o=e.dataset.sortableInputName,i=n.closest(".Sortable").dataset.sortableInputName;o!==i&&t.forEach(e=>{e.querySelectorAll(`[name^="${o}"]`).forEach(e=>{e.setAttribute("name",e.getAttribute("name").replace(o,i))})})},Bn=e=>{const n=e.closest(".inputContainer");n&&(n.dataset.interacted="true"),e.closest("form")?.dispatchEvent(new Event("change",{bubbles:!0}))},Sn=[];let Tn=!1,En=null,Dn=null;function jn(e,n,t){const o=t.children[e],i=t.children[n];e>n?t.insertBefore(o,i):t.insertBefore(o,i.nextElementSibling),(0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[e+1,n+1])}(0,qn.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 n=e.closest(".is-readOnly");if("true"===e.dataset.readOnly||n)return;const t="record"===e.dataset.type;if("true"===e.dataset.rteContainer||t){const n=e.querySelector(":scope .drawerDropOverlay");Sn.push(n)}const o=e.classList.contains("RCIG-list");let i=!1;e.parentElement&&(i=e.parentElement.classList.contains("is-previewable"));const r=e.closest("dialog"),a=new wn(e,{animation:t?null:160,handle:o&&!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,n,t){if(Sn.length>0)for(const e in Sn){const n=Sn[e];if(n){const e=n.dataset?.sortableValidItemTypes?.split(" "),o=t.dataset?.sortableLoadTypes?.split(" "),i=o?.find(n=>e.includes(n));i&&(n.style.display="inline")}}let o=!1;if(e.el.dataset.sortableValidItemTypes){if(o=e.el.dataset.sortableValidItemTypes.includes(t.dataset.sortableItemType),!o&&t.dataset.sortableLoadTypes){const n=e.el.dataset.sortableValidItemTypes.split(" ");o=t.dataset.sortableLoadTypes.split(" ").some(e=>n.includes(e))}return o}return o},pull:function(e,n,t){let o=!1;const i=n.el.classList.contains("is-clonable");if(e.el.dataset.sortableValidItemTypes){if(o=e.el.dataset.sortableValidItemTypes.includes(t.dataset.sortableItemType),!o&&t.dataset.sortableLoadTypes){const n=e.el.dataset.sortableValidItemTypes.split(" ");o=t.dataset.sortableLoadTypes.split(" ").some(e=>n.includes(e))}return o&&i?"clone":o}return o}},onSelect:e=>{const n=e.item,t=e.items;if(n.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list"))for(const e in t){const n=t[e];n.parentElement&&!n.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list")&&wn.utils.deselect(n)}else for(const e in t){const n=t[e];n.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list")&&((0,xn.k)(n),wn.utils.deselect(n))}n.classList.contains("is-moving")||wn.utils.deselect(n)},onDeselect:e=>{const n=e.item,t=n.querySelector(".ContentEditDrawer-widget-carousel-list-item-selectButton");n.classList.contains("is-moving")&&(t&&(t.checked=!1),n.classList.remove("is-moving"))},onStart:e=>{const n=e.item,t=+(e.items.length>0?e.items:[e.item]).length,o=Rn(n),i=document.querySelector(".ContentEdit-previewDisplay");if(document.body.style.userSelect="none",i&&(i.style.pointerEvents="none"),t&&(wn.ghost.style.setProperty("--drag-count",t),wn.ghost.style.zIndex=(0,yn.default)()+1,wn.ghost.setAttribute("item-suffix",""),t>1&&wn.ghost.setAttribute("item-suffix","s")),1===o.length){var r=o[0];n.closest(`.${r.className}`)||r.classList.add("Sortable-allowedContainer")}if(o.length>1&&o.forEach(e=>e.classList.add("Sortable-allowedContainer")),window.BRIGHTSPOT?.ui.cms.enableV5UI){const e=parseInt(wn.ghost.style.left);wn.ghost.style.left=.95*e+"px"}_n.A.pause(),qn.A.pause()},onSort:e=>{const n=e.from,t=e.to,o=e.items.length>0?e.items:[e.item];if(!Tn){if("record"===t.dataset.type){const e=Ln(t).find(":input.objectId").first(),n=Ln(o);return e.attr("data-label",n.data("label-html")),e.attr("data-label-html",n.data("label-html")),e.attr("data-preview",n.find("img").attr("src")||n.find(".ItemPreview-url").attr("data-src")||""),e.attr("data-visibility",n.find("span.Label").text()),e.attr("data-read-only",!!n.attr("data-read-only")&&n.attr("data-read-only")),e.val(n.data("id")),void e.change()}o.sort(function(e,n){return e.dataset.index-n.dataset.index});for(const i in o){const r=o[i];if("true"===t?.dataset?.rteContainer)return;if(t.dataset.sortableValidItemTypes&&n.dataset.sortableEndpoint&&!r.classList.contains("is-pending")){const e=t.dataset.sortableValidItemTypes.split(" "),o=r.dataset.sortableLoadTypes?.split(" "),i=r.dataset?.id,a=o?.find(n=>e.includes(n)),s=t.parentElement.classList.contains("is-previewable"),c=t.dataset.previewable,d=t.dataset.sortableValidItemTypes;if(!a){r.remove();continue}Tn=!0,wn.utils.deselect(r),Pn(n.dataset.sortableEndpoint,i,a,t.dataset.sortableInputName,s,c,d).then(e=>{r.innerHTML=e;const n=t.closest(".plugin-repeatable");r.classList.remove("Sortable-selected"),r.classList.remove("is-moving"),Tn=!1,t.classList.contains("RCIG-list")?(r.classList.remove("RCS-item"),Ln(n).data("repeatable").itemLoad(r).then(()=>{Ln(n).data("repeatable").initItem(r),s&&!t.parentElement.classList.contains("is-gridView")&&(r.classList.remove("is-gridItem"),r.classList.add("is-listItem")),Bn(t)})):(r.classList.remove("RCIG-item"),Ln(r).trigger("create"),Ln(n).data("repeatable").initItemRemove(r),Bn(t))})}else{let o=e.items.length?e.items:[r];o.forEach(e=>{e.addEventListener("animationend",()=>{e.classList.remove("is-added")}),e.classList.add("is-added")}),Nn(n,t,o),n.querySelectorAll("input, select, textarea").forEach(e=>{e.dispatchEvent(new Event("change"))}),Bn(t)}}}},onEnd:e=>{const n=e.item,t=e.items.length>0?e.items:[n],o=document.querySelector(".ContentEdit-previewDisplay");if(document.body.style.userSelect="unset",o&&(o.style.pointerEvents="initial"),Rn(n).forEach(e=>e.classList.remove("Sortable-allowedContainer")),Sn.length>0)for(const e in Sn){const n=Sn[e];n&&(n.style.display="none")}if("true"===e.to?.dataset?.rteContainer){for(const e in t)wn.utils.deselect(t[e]);const o=new CustomEvent("interchange",{detail:e});e.to.querySelector(".richtext").rte.view.dispatchEvent(o),n.remove()}if("record"===e.to?.dataset?.type)for(const e in t)wn.utils.deselect(t[e]),t[e].remove();_n.A.resume(),qn.A.resume()},onUpdate:e=>{const n=e.item;n.addEventListener("animationend",()=>{n.classList.remove("is-added")}),n.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 n=e.closest(".CIG-row")?.querySelector("label")?.textContent;e.querySelectorAll(":scope > li > input[type=text]").forEach(e=>{if(e.dataset?.label){const n=e.closest("li");n?.setAttribute("aria-label",e.dataset?.label)}}),(0,qn.A)(e,":scope > li",e=>{e.addEventListener("focus",e=>{if(!e.relatedTarget)return;const t=n?(0,Wn.wC)(window.BRIGHTSPOT.ui.sortable.namedList,[n]):window.BRIGHTSPOT.ui.sortable.genericList;(0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.listGainedFocus,[t])}),e.addEventListener("blur",e=>{e.relatedTarget&&(En&&(_n.A.resume(),qn.A.resume()),En=null)}),e.dataset?.label&&!e.hasAttribute("aria-label")&&e.setAttribute("aria-label",e.dataset?.label)}),e.hasAttribute("aria-label")||e.setAttribute("aria-label",n||"")}const s=e.classList.contains("RTI-list");(0,qn.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,vn.A)("div",{class:"RTI-handle"}))})});const Pn=async(e,n,t,o,i,r,a)=>{const s=new URLSearchParams;s.set("id",n),s.set("targetTypeId",t),s.set("inputName",o),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":kn.A.get("bsp.csrf")}});return await c.text()};(0,qn.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 n=e.closest("[data-sortable-item-type], .Sortable-item");n.classList.add("MultiSortable"),n.addEventListener("mouseup",e=>{e.target!==i||n.classList.contains("is-moving")?n.classList.remove("is-moving"):(n.classList.add("is-moving"),n.classList.contains("is-collapsed")||!n.classList.contains("RCIG-item")||n.classList.contains("is-gridItem")||n.classList.add("collapsed","is-collapsed"))});let t="";const o=e.closest(".CIG-row");o&&(t=o.querySelector(".CIG-label label").textContent);const i=(0,vn.A)("button",{type:"button",class:"MultiSortable-buttonToggle",title:`${window.BRIGHTSPOT?.ui.tooltips.multiSort} ${t}`,"aria-label":`${window.BRIGHTSPOT?.ui.tooltips.multiSort} ${t}`});e.classList.contains("EIG-remove")||e.insertAdjacentElement("beforeBegin",i)}),window.addEventListener("keydown",e=>{if("Escape"===e.code&&document.querySelectorAll(".Sortable-selected").forEach(e=>{wn.utils.deselect(e),(0,xn.k)(e),e.classList.remove("is-moving")}),!e.target.classList.contains("Sortable-item")&&!e.target.classList.contains("MultiSortable-buttonToggle"))return;const n=e.target.classList.contains("MultiSortable-buttonToggle")?e.target.closest(".Sortable-item"):e.target;if("Tab"===e.code&&En){const t=function(e){const n=e.dataset.sortableItemType;return Array.from(document.querySelectorAll(`ol.Sortable[data-sortable-valid-item-types*="${n}"],\n ul.Sortable[data-sortable-valid-item-types*="${n}"]`)).filter(e=>null!==e.offsetParent)}(n);if(t.length){const o=n.closest("ul.Sortable, ol.Sortable");let i=null,r=null;t.forEach((e,n)=>{o.isEqualNode(e)&&(r=n)}),r+1>t.length-1?i=0:r+1<=t.length-1&&(i=r+1);const a=t[i],s=a.children[0];a.isEqualNode(o)&&1===t.length||(s?((0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[r,i]),a.insertBefore(n,s)):((0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[r,1]),a.appendChild(n))),n.focus(),e.preventDefault()}else _n.A.resume(),qn.A.resume(),En=null}if("Escape"===e.code){if(En){const e=En.prevDropZone.children;e.length&&En.prevIdx<e.length-1?En.prevDropZone.insertBefore(n,e[En.prevIdx]):En.prevDropZone.appendChild(n),_n.A.resume(),qn.A.resume(),(0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemDragCancelled),n.focus()}En=null}if("Space"===e.code||"Enter"===e.code){if(En){const e=n.closest("ul.Sortable, ol.Sortable");e.querySelectorAll("input, select, textarea").forEach(e=>{e.dispatchEvent(new Event("change"))}),Bn(e),0===En.prevDropZone?.childElementCount&&En.prevDropZone?.removeAttribute("tabindex"),e.dispatchEvent(new CustomEvent("add",{detail:{item:n,from:En.prevDropZone,to:e}})),_n.A.resume(),qn.A.resume(),En=null,(0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemDropped)}else En={prevIdx:Array.prototype.indexOf.call(n.parentNode.children,n),prevDropZone:n.closest("ul.Sortable, ol.Sortable")},_n.A.pause(),qn.A.pause(),(0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemDragStarted);if(e.preventDefault(),!En)return}"ArrowUp"!==e.code&&"ArrowLeft"!==e.code||(Dn=Array.prototype.indexOf.call(n.parentNode.children,n),En&&Dn>0&&(jn(Dn,Dn-1,n.closest("ul.Sortable, ol.Sortable")),n.focus())),"ArrowDown"!==e.code&&"ArrowRight"!==e.code||(Dn=Array.prototype.indexOf.call(n.parentNode.children,n),En&&Dn<n.parentNode.children.length-1&&(jn(Dn,Dn+1,n.closest("ul.Sortable, ol.Sortable")),n.focus()))}),window.addEventListener("click",()=>{En&&(_n.A.resume(),qn.A.resume()),En=null})},80754(e,n,t){"use strict";t(49371),t(96648);var o=t(45055),i=t(24510);(0,o.A)(".StyleEmbeddedContent-items > li",e=>{e.addEventListener("click",async e=>{let n=e.target;const t=n.parentElement.classList.contains("Card");if("LI"===n.parentElement.nodeName||t){t&&(n=n.parentElement);const e=n.dataset.addEmbeddedContentData;if(!e)return;const o=JSON.parse(e),r=o.typeId;if(!r)return;const a=n.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 d=o.value;d&&(c+="&templateStyle="+d);const l=new Headers;l.append("Brightspot-CSRF",i.A.get("bsp.csrf"));try{await fetch(c,{method:"POST",headers:l})}catch(e){console.error(e)}}})}),(0,o.A)(".StyleEmbeddedContent-search input",e=>{e.addEventListener("input",n=>{const t=e.closest(".StyleEmbeddedContent-nav"),o=t?.nextSibling,i=new RegExp(n.target.value.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");o?.querySelectorAll("a").forEach(e=>{const n=e.parentElement,t=n?.parentElement,o=t?.previousSibling;i.test(e.innerText)?(n.style.display="",t.style.display=t.classList.contains("LinkTable")?"block":"flex",o.style.display="block"):(n.style.display="none",t.querySelector('li:not([style*="display: none"])')||(t.style.display="none",o.style.display="none"))}),t?.querySelectorAll("li").forEach(e=>{e.style.display=e.classList.contains("is-selected")||""===n.target.value?"list-item":"none",e.style.borderColor="var(--color-gray3)"});const r=t?.querySelector('li:not([style*="display: none"])');r.style.borderColor="transparent";const a=o?.querySelector(".StyleEmbeddedContent-warning");a.style.display=o?.querySelector('li:not([style*="display: none"])')?"none":"flex"})})},31854(e,n,t){"use strict";t(62953),t(49371),t(96648);var o=t(45055),i=t(24510),r=t(49309),a=t(88630);const s="> .CIG-large > .CIG > .CIG-row, > .CIG-large > .CIG > .TemplateField",c="> .CIG-large > .CIG > btu-cig-cluster > .TemplateField";(0,o.A)(".CIG-row.StyleguidePreset-row",e=>{let n,t,o,i,r;const a=e.closest(".CIG-row.StyleguideTemplate-row"),l=e.getAttribute("data-original-template"),M=n=>Array.from(e.querySelectorAll(`.TC > .TemplateField[data-template='${n}'] > .CIG-row, .TC > btu-cig-cluster > .TemplateField[data-template='${n}'] > .CIG-row`));if(a){t=a.querySelector(".CIG-small > select");let e=t.value;t.addEventListener("change",()=>{e!==t.value&&(e=t.value,o=e||l,i=M(o),r=u.concat(i),b&&(b.querySelector("option[data-show]").setAttribute("data-show",`${s}[data-template="${o}"], ${c}[data-template="${o}"]`),b.querySelectorAll("option[data-preset]").forEach(e=>e.remove()),(async()=>{const e=await fetch(CONTEXT_PATH+"styleguide/preset?themeId=currentTheme&templateId="+o,{method:"GET",headers:new Headers});try{const n=await e.json(),t=n.success&&n.data;t?.forEach(e=>{const n=document.createElement("option");n.setAttribute("data-hide",`${s}, ${c}`),n.setAttribute("data-preset",e.presetId),n.setAttribute("value",e.presetId),n.textContent=e.label,b.appendChild(n)})}catch(e){console.log(e)}})()),n?d(b,"none"):b.dispatchEvent(new Event("change",{bubbles:!0})))})}o=t?.value||l;const u=Array.from(e.querySelectorAll(".TC > .CIG-row"));i=M(o),r=u.concat(i);const b=e.querySelector(".CIG-small > select");n=b.value,b.setAttribute("data-previous-value",n);const h=e.querySelector(".CIG-large");b.addEventListener("change",e=>{n=b.value;const t=b.getAttribute("data-previous-value");n!==t&&(b.setAttribute("data-previous-value",n),n?h.style.display="none":(h.style.display="",p(o,t,r)))})});const d=(e,n)=>{if(e.nextElementSibling?.matches(".ComboInput")){const t=e.nextElementSibling.getAttribute("aria-owns"),o=document.querySelector(`#${t}`).querySelector(`.ComboInput-option[data-value="${n}"]`);o&&o.click()}else e.value=n},l=(e,n)=>{const t=e.querySelector("textarea"),o=e.querySelector('input[type="checkbox"]'),i=e.querySelector("input.color"),r=e.querySelector("select");if(t)t.value=n||"";else if(o)o.checked=n||!1;else if(i){a(i).spectrum("set",n||"");const e=i.parentElement.querySelector(".sp-preview");e&&n?e.setAttribute("data-color",n):e?e.removeAttribute("data-color"):i.value=n||""}else r&&d(r,n||"")},p=async(e,n,t)=>{const o=e=>{t?.forEach(n=>{const t=n.getAttribute("data-field-name"),o=t?.slice(t.lastIndexOf(".")+1),i=e&&o&&e[o];l(n,i)})};if(n&&"none"!==n){const t=CONTEXT_PATH+"styleguide/preset?themeId=currentTheme&templateId="+e+"&presetId="+n,i=new Headers,r=await fetch(t,{method:"GET",headers:i});try{const e=await r.json(),n=e.success&&e.data[0].values;n&&o(n)}catch(e){console.log(e)}}else o()},M=async(e,n,t)=>{let o,i;if(!t){const e=document.querySelector(".ThemeBundleEditor-top"),n=e?.closest(".ThemeBundle.TC"),t=n?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"] select[name$="_preset"]');i=t?.querySelector(`option[value="${t.value}"]`)?.textContent,o=(e=>{const n=e?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"]'),t=n?.querySelectorAll(":scope > .CIG-large > .CIG .CIG-row"),o=[],i=[];return t.forEach(e=>{const n=e.getAttribute("data-field-name"),t=n.substring(n.lastIndexOf(".")+1),r=e.querySelector("textarea, input.color"),a=e.querySelector('input[type="checkbox"]'),s=e.querySelector('[data-type="text"] select');r?(o[t]=r.value||"",i[t]=r.placeholder||""):a?o[t]=a.checked:s&&(o[t]=s.value||"",i[t]=s.getAttribute("data-placeholder")||"")}),{overrideValues:o,themePlaceholders:i}})(n)}const r=CONTEXT_PATH+"styleguide/preset?themeId="+e+"&templateId="+(t||"themeFields"),a=new Headers,s=await fetch(r,{method:"GET",headers:a});try{const e=await s.json(),t=e.success&&JSON.stringify(e.data);document.querySelector("iframe.StyleguideFrame").contentWindow.postMessage({type:"BSP.Styleguide.ReturnThemePresets",presets:t,selectedPreset:n,themeOverrides:o?.overrideValues,themePlaceholders:o?.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 n=document.querySelector(".ThemeBundle")?.getAttribute("data-id"),t=e.preset?.key?.startsWith("brightspot-styleguide-template-values-")&&e.preset.key.replace("brightspot-styleguide-template-values-",""),o=document.querySelector(".ThemeBundleEditor-top"),a=o?.closest(".ThemeBundle.TC"),p=a?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"]');if("BSP.Styleguide.RequestPresets"===e.type)M(n,e.label,e.templateName);else if("BSP.Styleguide.SetOverrides"===e.type||"BSP.Styleguide.RemovePreset"===e.type)(async(e,n,t,o)=>{const a=CONTEXT_PATH+"styleguide/preset?themeId="+e,d=new Headers;d.append("Brightspot-CSRF",i.A.get("bsp.csrf"));const l={};l.type=n.type,l.key=n.preset.key,l.values=n.preset.values,l.label=n.preset.label,l.presetId=n.preset.presetId||(0,r.A)();const p=await fetch(a,{method:"POST",headers:d,body:JSON.stringify(l)});try{(await p.json()).success&&M(e,n.preset.label,t)}catch(e){console.log(e)}if("brightspot-styleguide-theme-values"===n.preset.key){const e=o?.querySelector(":scope > .CIG-small select");if("BSP.Styleguide.RemovePreset"===n.type){const t=e?.querySelector(`option[value="${n.preset.presetId}"]`);t?.remove()}else if("BSP.Styleguide.SetOverrides"===n.type)if(n.preset.presetId){const t=e?.querySelector(`option[value="${n.preset.presetId}"]`);t.textContent=n.preset.label}else{const t=document.createElement("option");t.setAttribute("data-hide",`${s}, ${c}`),t.setAttribute("value",l.presetId),t.textContent=n.preset.label,e.appendChild(t)}}})(n,e,t,p);else if("BSP.Styleguide.SyncOverrideField"===e.type){const n=p?.querySelector(`:scope > .CIG-large > .CIG .CIG-row[data-field-name$=".${e.field}"]`);l(n,e.value),p.setAttribute("data-received-update","")}else if("BSP.Styleguide.SyncThemePresetField"===e.type){const n=p?.querySelector(":scope > .CIG-small select"),t="Custom"===e.preset?"":e.preset;n&&d(n,t)}})},9216(e,n,t){"use strict";t.d(n,{A:()=>l}),t(86634),t(57573),t(49371),t(42723),t(26780),t(96648);var o=t(88630),i=t.n(o),r=t(18101),a=t(39403),s=t(76394),c=t(60021),d=t(79365);class l{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 n of this._container.children){const t=n.dataset.tab;void 0!==t&&e(t,n)}}_toArray(e){if(e)try{const n=JSON.parse(e);return Array.isArray(n)?n:[]}catch{}return[]}_update(){this._observer&&(this._observer.disconnect(),this._observer=null);const e=(0,r.A)("div",{className:"TabBar",role:"tablist"}),n=(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}),t=(0,r.A)("div",{className:"TabBar-menuList",role:"menu","aria-label":window.BRIGHTSPOT?.ui.tooltips.tabs}),o=(0,r.A)("div",{className:"TabBar-menu"},n,t);n.onclick=()=>{(0,d.AM)(t,n,e)};const i="MENU"===this._container.dataset.tcMode,a=this._container.dataset.tcMain,l=this._toArray(this._container.dataset.tcExceptions),p=new Set;this._defaultTab=null;for(const e of this._container.children){const n=e.dataset.tab;void 0!==n&&(p.has(n)||(this._defaultTab||(this._defaultTab=n),p.add(n)))}const M=this._toArray(this._container.dataset.tcStart),u=this._toArray(this._container.dataset.tcEnd),b=[];for(const e of M)p.has(e)&&b.push(e);for(const e of p)M.includes(e)||u.includes(e)||b.push(e);for(const e of u)p.has(e)&&b.push(e);for(const n of b){const o=l.indexOf(n)>-1?i?e:t:i?t:e;o.insertBefore((0,r.A)("button",{className:"TabBar-item",dataset:{tab:n},role:"tab",onclick:e=>{e.preventDefault(),this.select(n,e)},onkeydown:e=>{var n=e.currentTarget,t=n.closest(".TabBar");switch(e.key){case"ArrowRight":return void(n.nextSibling?n.nextSibling.focus():t.firstChild.focus());case"ArrowLeft":return void(n.previousSibling?n.previousSibling.focus():t.lastChild.focus())}}},n),n===a?o.firstChild:null)}b.includes(a)&&(this._defaultTab=a),1===e.children.length&&t.insertBefore(e.children[0],t.firstChild);for(const e of t.children)e.className="TabBar-menuItem",e.setAttribute("role","menuitem");if((0,d.D1)(t,n),this._bar&&(this._bar.remove(),this._bar=null,this._menu=null,this._menuToggle=null,this._menuList=null),0===b.length||b.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),t.children.length>0&&(0===e.children.length&&(e.classList.add("is-menuOnly"),e.removeAttribute("role")),this._menu=o,this._menuToggle=n,this._menuList=t,this._bar.appendChild(o));const h=this._toggle();h.includes(this._defaultTab)||(this._defaultTab=h[0]),e.hidden=1===Array.from(t.children).filter(e=>!e.hidden).length;let z=!1;for(const e of(0,s.A)(this._container,".CIG-row > .Message.is-error")){let n,t=e;do{n=t,t=n.parentNode}while(t!==this._container);const o=(0,c.A)(this._bar,`[data-tab="${n.dataset.tab}"]`);o&&!o.classList.contains("is-error")&&(o.classList.add("is-error"),o.classList.contains("TabBar-menuItem")&&(z=!0))}z&&e.classList.add("is-menuError"),this.select()}_toggle(){const e=[];this._forEachChild((n,t)=>{t.hidden||t instanceof HTMLHeadingElement||e.push(n)});for(const n of[this._bar,this._menuList])if(n)for(const t of n.children)t!==this._menu&&(t.hidden=!e.includes(t.dataset.tab));return e}select(e,n){const t=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 n of this._bar.children){const t=n.dataset.tab===e;n.classList.toggle("is-selected",t),n.setAttribute("aria-selected",t),t?n.removeAttribute("tabindex"):n.setAttribute("tabindex","-1")}if(this._menuList){let n=!1;for(const t of this._menuList.children)t.classList.toggle("is-selected",t.dataset.tab===e)&&(n=e!==this._defaultTab);this._bar.classList.toggle("is-menuSelected",n),this._menuToggle.innerText=n?e:""}if(this._forEachChild((n,t)=>{t.classList.toggle("TC-unselected",n!==e)}),window.dispatchEvent(new Event("resize")),i()(this._container).find("> [data-tab]").trigger("tabbedShow"),i()(this._bar).trigger("tabbed-select"),t){const n=this._container.querySelector(`:scope > .CIG-row:not(.inputContainer-readOnly)[data-tab="${e}"] > .CIG-label > label`)?.htmlFor;n&&document.getElementById(n)?.focus()}else n&&n.target.scrollIntoView({block:"nearest"})}}},25539(){window.addEventListener("click",e=>{const n=e.target;if(n.classList.contains("Taxonomy-expand")){for(const e of n.closest("ul").querySelectorAll(".is-selected"))e.classList.remove("is-selected");n.closest("li").classList.add("is-selected")}},{capture:!0}),window.addEventListener("brightspot-frame-load",e=>{const n=e.target;n.classList.contains("Taxonomy-children")&&window.requestAnimationFrame(()=>{n.closest(".Taxonomy").scrollTo({left:3e4})})})},83026(e,n,t){"use strict";t(49371),t(96648);var o=t(18101),i=t(45055);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"]'),n=e.querySelector(".CIG-large");if(this._selectedPreset!==this._presetSelect.value||e.hasAttribute("data-received-update")){const t=this._presetSelect.closest(".CIG").querySelector(":scope > .TabBar .ThemeBundle-tabOverrides");t&&t.click(),n.style=this._presetSelect.value?"display: none;":"",e.classList.add("state-changed"),e.removeAttribute("data-received-update"),this._presetSelect.value||n.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,o.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,o.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 n=(0,o.A)("DIV",{className:"ThemeBundleEditor-stage-main"}),t=(0,o.A)("DIV",{className:"ThemeBundleEditor-stage-top"},(0,o.A)("a",{className:"Popup-heading ThemeBundleEditor-close",onclick:e=>{this._closeEditor()}},this._labels.close));if(this._editorStage.appendChild(t),this._editorStage.appendChild(n),e.appendChild(this._editorStage),e.querySelector('.CIG-row[data-field-name$="._preset"]')){const n=e.querySelector(".CIG-row");n&&e.insertBefore((0,o.A)("DIV",{className:"ThemeBundleEditor-top","data-tab":this._labels.tab},this._editorToggle),n)}}_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 n=await fetch(e.href),t=await n.text(),i=document.createElement("template");i.innerHTML=t,this._sg=i.content.querySelector('.Tab[data-tab="Styleguide"] iframe'),this._editorStage.querySelector(".ThemeBundleEditor-stage-main").appendChild(this._sg);const r=(0,o.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")}}},84410(e,n,t){"use strict";(0,t(53853).A)(".TimedContentPlayerNote",async()=>{window.BRIGHTSPOT?.ui.cms.enableV5UI||await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(2415)]).then(t.bind(t,27271)),await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(2415)]).then(t.bind(t,26602))})},38948(e,n,t){"use strict";(0,t(53853).A)(".VideoEditor",async()=>{window.BRIGHTSPOT?.ui.cms.enableV5UI||await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(4582),t.e(3543),t.e(4795),t.e(8863)]).then(t.bind(t,64583)),await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(4582),t.e(3543),t.e(4795),t.e(8863)]).then(t.bind(t,71852))})},84164(e,n,t){"use strict";var o=t(45055),i=t(28211);(0,o.A)(".ViewMirror",async e=>{const n=e.dataset.contentUrl;if(!n)return;const t=e.dataset.refreshUrl;if(!t)return;const o=e.querySelector(".ViewMirror-content");if(!o)return;let r;const a=async()=>{o.innerHTML=await(await fetch(n,{cache:"no-cache"})).text();const e=o.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(t),s.onmessage=e=>{switch(JSON.parse(e.data).action){case"update-content":a();break;case"update-preview":r&&r.updatePreview()}})},1e3)})},28211(e,n,t){"use strict";t.d(n,{A:()=>s}),t(57573);var o=t(45055),i=t(23902);const r=window.BRIGHTSPOT?.ui.tooltips;let a=0;class s{get isVisible(){return this.__isVisible}set isVisible(e){this.__isVisible=e}constructor(e,n){this.__isVisible=!1,this.__preview=e,this.__onPreviewUpdate=n,this.__typeFrame=e.querySelector(".PreviewFrame-typeFrame"),this.__reloadButton=e.querySelector(".PreviewFrame-reload");const t=e.closest(".Page-content, .Popup");if(t){const e=t.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 n=document.createElement("IFRAME");n.name="PreviewFrame-preview"+a++,n.setAttribute("title",r.preview.iframeTitle);const t=this.__previewDisplay.querySelector("iframe[name^='PreviewFrame-preview']:not(.Preview-overlayFrame)"),o=this.__previewControls.querySelector(".deviceWidthSelect");let s=t?.style.width;if(!s){const e=o?.options[o?.selectedIndex],n=parseInt(e?.getAttribute("data-device-width")||"0",10);n&&(s=`${n}px`)}s&&(n.style.width=s),t?.style.transform&&(n.style.transform=t.style.transform);const c=t?.style.getPropertyValue("--PreviewFrame-scale");c&&n.style.setProperty("--PreviewFrame-scale",c),this.__previewDisplay.insertBefore(n,this.__previewDisplay.firstChild),n.setAttribute("data-container-id",this.containerId);const d=n.closest(".Popup"),l=(e=null)=>{const n=d??document;n.querySelector(".ContentEdit-previewButtonWrapper")?.classList.toggle("is-animating",e)};l(!0),n.onload=()=>{const e=[];this.__onPreviewUpdate&&this.__onPreviewUpdate(),l(!1);for(let t=n;t=t.nextElementSibling;)"IFRAME"!==t.tagName||t.classList.contains("Preview-overlayFrame")||e.push(t);const t=n.parentNode;e.forEach(e=>t.removeChild(e))},(0,i.A)(n,()=>l(!1)),e.target=n.name,e.submit()}}reloadPreview(){this.__reloadButton.click()}deletePreview(){this.__typeFrame.innerHTML=""}}(0,o.A)(".deviceWidthSelect",async e=>{let n=e.closest(".PreviewFrame-typeControlsContainer");if(!n)return;let t=n.querySelector("form");t&&e.addEventListener("change",e=>{document.querySelector("iframe[name='"+t.target+"']")&&(window.dispatchEvent(new Event("resize")),window.dispatchEvent(new Event("viewport-device-changed")))})}),(0,o.A)('select[name="_mainObjectId"]',e=>{const n=e.closest(".Page-content, .Popup");n&&e.addEventListener("change",()=>{n.classList.toggle("is-previewToEditDisabled",e.value)})})},64854(e,n,t){"use strict";t(49371),t(96648);var o=t(18101),i=t(60021),r=t(76394),a=t(45055),s=t(79365);const c=window.BRIGHTSPOT?.ui.tooltips;(0,a.A)('.Widget a[target="toolUserTfa"]',e=>{const n=e.closest(".Widget").querySelector(".Widget-controls");n&&(e.setAttribute("data-popup-mode","local"),n.insertBefore(e,n.firstChild))}),(0,a.A)(".Widget-controls",e=>{const n=e.closest(".Widget"),t=(0,r.A)(n,":scope > .widget-contentCreate li");if((0,i.A)(e,":scope > button:not(.FormFilter-icon)")&&e.closest(".Widget").querySelector("form").prepend(e),t.length<1)return;const a=(0,o.A)("ul",{className:"Widget-actionsList",role:"menu","aria-label":c.actions?.widget}),d=(0,o.A)("div",{className:"Widget-actions"}),l=(0,o.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,l,d)}});for(const e of t)a.appendChild(e);const p=(0,i.A)(e,':scope > button[name="action-delete"]');p&&a.appendChild((0,o.A)("li",p)),d.appendChild(l),d.appendChild(a),d.setAttribute("data-tether-anchor",""),e.appendChild(d),(0,s.D1)(a,l)}),(0,a.A)("[data-widget-id]:not(.Guide-tabCluster)",e=>{e.addEventListener("focusin",()=>{if(document.body.classList.contains("is-guideOpen")){const n=[...document.querySelectorAll(".Guide")].pop().querySelector(`.Guide-tabCluster[data-widget-id="${e.dataset.widgetId}"]`);if(n){const e=n.closest(".Guide-content");e.querySelectorAll(".is-focus").forEach(e=>e.classList.remove("is-focus")),e.scrollTo({top:0}),n.scrollIntoView(!0),n.nextElementSibling.classList.add("is-focus")}}})})},2565(e,n,t){"use strict";(0,t(53853).A)(".AppetizeioPreviewPage",async()=>{await Promise.all([t.e(8897),t.e(4114),t.e(2963)]).then(t.bind(t,77875))})},59981(){const e=window.fetch;window.fetch=function(){const n=[...arguments],t=n.length>1?n[1]:{};return"object"!=typeof t||t.credentials||(t.credentials="same-origin"),n[1]=t,e.apply(this,n)}},75633(e,n,t){"use strict";var o=t(88630),i=t.n(o);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}},6349(e,n,t){"use strict";var o=t(50195),i=t(88630);window.define=o.E8,window.require=o.Yp,window.requirejs=o.nw,(0,o.E8)("bsp-utils",[],()=>t(88097)),(0,o.E8)("iframeResizer",[],()=>t(34346)),(0,o.E8)("ColorRotator",[],()=>t(72404)),(0,o.E8)("jquery",[],()=>i),(0,o.E8)("v3/rtc",[],()=>t(23054).default)},22777(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(55408)},18101(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(25936)},76752(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(96203)},45055(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(91762)},23902(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(35083)},97204(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(46391)},23054(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>o.A});var o=t(75230)},72404(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>s});var o=t(36450),i=t.n(o);const r=(0,t(13904).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],n=window.BRIGHTSPOT?.ui.cms.enableV5UI?i().keyword.hex(e.v5):r.getColor(e.v4,5),[t,o,s]=i().hex.hsl(n);return`#${i().hsl.hex([t+20*Math.floor(this._index++/a.length),o,s])}`}}},93832(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(71669)},72117(e,n,t){"use strict";var o=t(45055),i=t(23054);(0,o.A)('.Widget[data-internal-name="com.psddev.assign.widget.AssignmentContentWidget"]',e=>{const n=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",t=>{const o=(t.mainObjectValues||t.values)["assign.assignments"];if(o)for(var i of o)if(i._ref===n){let n=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(n)&&n.click();break}})})},46131(e,n,t){"use strict";t(86634),t(49371),t(96648);var o=t(45055),i=t(22777),r=t(23054),a=t(18101),s=t(79365);(0,o.A)(".AssignmentDeskDashboard-actionsToggle",e=>{const n=e.closest(".AssignmentDeskDashboard-actionsWrapper").querySelector(".AssignmentDeskDashboard-actions");(0,s.D1)(n,e),e.addEventListener("click",t=>{(0,s.AM)(n,e)})}),(0,o.A)('.AssignmentDeskDashboard .SearchWidget-type .ComboInput-option:not([data-value*="-"])',e=>{e.remove()}),(0,o.A)(".AssignmentDeskDashboard .toolbar .AssignmentDeskDashboard-title",e=>{const n=e.closest(".SearchWidget");n.querySelector(":scope > .AssignmentDeskDashboard-title")?e.remove():n.appendChild(e)}),(0,o.A)(".AssignmentDeskDashboard.SearchWidget",e=>{const n=Array.from(document.querySelectorAll('select[name="st"] option'),e=>{if(e.value)return e.value});new MutationObserver(n=>{e.classList.remove("has-refresh")}).observe(e.querySelector(".SearchWidget-result"),{attributes:!0,attributeFilter:["class"]}),r.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",t=>{let o,i,r;if(t.mainObjectId?(i=t.contentTypeId,r=t.contentId,o=t.values):(i=t.mainObjectIdTypeId,r=t.mainObjectId,o=t.mainObjectValues),n.includes(i)){const n=e.querySelectorAll(`.SearchWidget-result a[href$="${r}"]:not([data-rtc-updated]):not([target="SingleFieldUpdateTarget"])`);if(n.length>0){for(const e of n){const n=e.closest("tr");if(n&&n.classList.contains("has-updateAttempt"))return}e.classList.add("has-refresh"),n.forEach(e=>{e.setAttribute("data-rtc-updated",!0),e.parentElement.insertBefore((0,a.A)("span",{class:"Label is-updated",title:`${t.userName} - ${new Date(t.date).toLocaleString()}`},"Updated"),e)})}e.classList.contains("has-refresh")||o["cms.content.publishDate"]!==o["cms.content.updateDate"]||e.classList.add("has-refresh")}})});const c=function(e){e.addEventListener("click",n=>{if(e.classList.contains("is-open")){const e=document.getElementById("calendarPopup");e&&(n.preventDefault(),n.stopImmediatePropagation(),e.dispatchEvent(new CustomEvent("close",{bubbles:!0})))}else e.classList.toggle("is-open")})};(0,o.A)(".SingleFieldUpdate-date",e=>{c(e)}),(0,o.A)(".SingleFieldUpdate-content .DateTimeInput",e=>{const n=e.closest(".Popup");if(n&&"SingleFieldUpdateTarget"===n.getAttribute("name")){e.click();const t=document.getElementById("calendarPopup"),o=n.querySelector(".SingleFieldUpdate-form");if(!o)return;const r=o.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=o.querySelector("button"),d=e.previousSibling;if(!(t&&s&&c&&d))return;t._tether=new i.A(s,t),t.onclose=()=>{s.classList.contains("is-open")&&s.classList.toggle("is-open"),n.classList.remove("is-visible","popup-show"),t.remove()},d.addEventListener("change",e=>{e.preventDefault();const n=s.closest("tr");n&&(n.classList.add("has-updateAttempt"),c.click(),t.dispatchEvent(new CustomEvent("close",{bubbles:!0})))})}}),(0,o.A)(".SingleFieldUpdate-success",e=>{e.parentNode.classList.remove("is-visible","popup-show");const n=document.querySelectorAll(`.SearchWidget-result a[href$="${e.dataset.objectid}"]:not([data-rtc-updated]):not([target="SingleFieldUpdateTarget"])`),t=e.content.firstElementChild;t&&(t.classList.add("is-updated"),n.length>0&&n.forEach(e=>{const n=e.closest("tr");if(n){const e=t.cloneNode(!0),o=e.querySelector(".SingleFieldUpdate-date");o&&c(o),n.replaceWith(e)}}),t.remove())}),(0,o.A)(".SingleFieldUpdate-error",e=>{window.alert(e.textContent),e.parentNode.classList.remove("is-visible","popup-show")})},44726(e,n,t){"use strict";(0,t(45055).A)(".AssociatedContent",e=>{const n=e.parentElement;n&&n.classList.add("is-associatedContentWidget")})},9386(e,n,t){"use strict";(0,t(45055).A)(".BulkUploadProcessor li[data-tab]",e=>{const n=e.getAttribute("data-tab"),t=e.closest(".objectInputs").querySelector('[data-tab="'+n+'"][data-upload-mime-type-count]');let o;if(t&&(o=t.getAttribute("data-upload-mime-type-count")),o){const n=document.createElement("SPAN");n.classList.add("MimeTypeCount"),n.innerText=o,e.append(n)}})},56435(e,n,t){"use strict";(0,t(45055).A)(document,".Calendar .calendarEvent",e=>{const n=e.dataset.color;n&&e.style.setProperty("--bg-color",n)})},58014(e,n,t){"use strict";(0,t(45055).A)(".ButtonForClosableWindow",e=>{e.addEventListener("click",n=>{const t=e.getAttribute("data-url");t&&(n.preventDefault(),window.open(t,"_blank"))})})},77469(e,n,t){"use strict";var o=t(45055),i=t(23054);(0,o.A)('.Widget[data-internal-name="com.psddev.assign.widget.PitchAssignmentsWidget"]',e=>{const n=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.assign.AssignmentRtcBroadcast",t=>{if(t.pitchId===n){let n=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(n)&&n.click()}})})},72168(e,n,t){"use strict";var o=t(45055),i=t(23054);(0,o.A)('.Widget[data-internal-name="com.psddev.assign.widget.PitchContentWidget"]',e=>{const n=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",t=>{const o=(t.mainObjectValues||t.values)["assign.pitches"];if(o)for(var i of o)if(i._ref===n){let n=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(n)&&n.click();break}})})},39721(e,n,t){"use strict";var o=t(45055),i=t(79365);(0,o.A)(".Revisions-more",e=>{const n=e.nextSibling;(0,i.D1)(n,e),e.addEventListener("click",()=>{(0,i.AM)(n,e)})}),(0,o.A)(".Revisions-listItem.is-parentRevision",e=>{const n=e.querySelector(".Revisions-listItem-collapseButton"),t=e.querySelector(".Revisions-listItem-children"),o=e.dataset.id;n.addEventListener("click",e=>{e.preventDefault(),e.stopImmediatePropagation(),n.classList.contains("is-active")?(localStorage.removeItem(`BSP.ContentEdit.suggestionCollapsible.${o}`),n.classList.remove("is-active"),t.style.display="none"):(localStorage.setItem(`BSP.ContentEdit.suggestionCollapsible.${o}`,1),n.classList.add("is-active"),t.style.display="block")}),localStorage.getItem(`BSP.ContentEdit.suggestionCollapsible.${o}`)&&(n.classList.add("is-active"),t.style.display="block")}),(0,o.A)(".Revisions-statusLabel",e=>{const n=e.dataset.statusColor,t=e.style;!n||e.closest(".Revisions-listItem-children")?t.setProperty("--workflow-color","var(--color-gray6)"):t.setProperty("--workflow-color",n)}),(0,o.A)(".message.is-revision",e=>{const n=e.querySelector(".Message-icon"),t=e.dataset.statusColor;if(!t)return;const o=n?.style;o.setProperty("--Revision-revisionColor",t)})},16890(e,n,t){"use strict";t.d(n,{WA:()=>r,cX:()=>o});const o=!("undefined"==typeof navigator)&&(/Mac/.test(navigator.platform)||/macOS/.test(navigator.userAgentData?.platform)),i=o?"Alt+Tab":"F6";function r(e){return e.replace(/Alt\+Tab/g,i)}},75230(e,n,t){"use strict";t.d(n,{A:()=>p}),t(86634),t(57573);var o=t(43386),i=t(95408),r=(t(62953),t(94286));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,n,t){e&&(this._requests.push({message:e,callback:n,wait:t}),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:n,callback:t,wait:o}=e,i=new URLSearchParams;i.append("sessionId",this._sessionId),i.append("message",JSON.stringify(n));const r=n.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=>{t&&t(e?JSON.parse(e):null)}).catch(()=>{this._requests.unshift(e),this.reconnect()}).finally(()=>{this._processRequests()}),o){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 n=JSON.parse(e.data);n._first?("string"==typeof n.sessionId&&(this._sessionId=n.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)):n._ping||this._onReceive(n)},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,d=["com.psddev.cms.tool.page.content.PublishBroadcast","com.psddev.assign.AssignmentRtcBroadcast","com.psddev.cms.conversation.PostBroadcast","brightspot.liveblog.LiveBlogPostRtcBroadcast"];let l;if(window.DISABLE_RTC||!document.documentElement.dataset.userId)l={initialize:function(){},restore:function(){},receive:function(){},receiveOnce:function(){},execute:function(){}};else{const e="broadcast",n="callback",t="connect",r="connect",p="execute",M="restore",u={},b=(e,n)=>{if(!s||c||!d.includes(e))for(const t of u[e]??[])t(n)},h=(e,n)=>{for(const{broadcast:e,data:t}of n??[])b(e,t);e&&e(n)},z=`${(0,i.A)()}-`;let O=0;const f=new o.X2("brightspot-rtc"),m=(e,t)=>{const o=z+ ++O,i=({type:e,callbackId:r,broadcasts:a})=>{e===n&&r===o&&(f.removeEventListener("message",i),h(t,a))};f.addEventListener("message",i),f.postMessage({type:M,message:e,callbackId:o})},g=[],A={};let w;f.addEventListener("message",({type:n,broadcast:o,data:i})=>{if(n===t)for(const{message:e,callback:n}of g)m(e,n);else n===e&&b(o,i)});const v=(e,n)=>{w.send(e,e=>{h(n,e)})};(0,o.XS)(f).awaitLeadership().then(()=>{w=new a(`${window.ROOT_PATH}/_rtc`),f.addEventListener("message",({type:e,message:t,callbackId:o})=>{e===r||e===p?w.send(t):e===M&&w.send(t,e=>{f.postMessage({type:n,callbackId:o,broadcasts:e})})}),w.connect({onConnect:()=>{f.postMessage({type:t});for(const{message:e,callback:n}of g)v(e,n)},onReceive:({broadcast:n,data:t})=>{if(n&&t&&(f.postMessage({type:e,broadcast:n,data:t}),b(n,t),!s||c||!d.includes(n)))for(const e of A[n]??[])e(t)}})}),l={initialize:function(e,n,t){l.restore(e,n,t),window.addEventListener("unload",()=>{const o={type:"disconnect",className:e,data:n};w?w.send(o,t,!0):f.postMessage({type:r,message:o})})},restore:function(e,n,t){const o={type:"restore",className:e,data:n};g.push({type:M,message:o,callback:t}),w?v(o,t):m(o,t)},receive:function(e,n){n&&(u[e]??=[]).push(n)},receiveOnce:function(e,n){n&&(A[e]??=[]).push(n)},execute:function(e,n){const t={type:"execute",className:e,data:n};w?w.send(t):f.postMessage({type:p,message:t})}}}const p=l},37180(e,n,t){"use strict";t.d(n,{A:()=>f}),t(57573),t(49371),t(96648),t(56065);var o=t(71224),i=t(98474),r=t(67324),a=t(67102);function s(){s=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,n){["method","field"].forEach(function(t){n.forEach(function(n){n.kind===t&&"own"===n.placement&&this.defineClassElement(e,n)},this)},this)},initializeClassElements:function(e,n){var t=e.prototype;["method","field"].forEach(function(o){n.forEach(function(n){var i=n.placement;if(n.kind===o&&("static"===i||"prototype"===i)){var r="static"===i?e:t;this.defineClassElement(r,n)}},this)},this)},defineClassElement:function(e,n){var t=n.descriptor;if("field"===n.kind){var o=n.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===o?void 0:o.call(e)}}Object.defineProperty(e,n.key,t)},decorateClass:function(e,n){var t=[],o=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!l(e))return t.push(e);var n=this.decorateElement(e,i);t.push(n.element),t.push.apply(t,n.extras),o.push.apply(o,n.finishers)},this),!n)return{elements:t,finishers:o};var r=this.decorateConstructor(t,n);return o.push.apply(o,r.finishers),r.finishers=o,r},addElementPlacement:function(e,n,t){var o=n[e.placement];if(!t&&-1!==o.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");o.push(e.key)},decorateElement:function(e,n){for(var t=[],o=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=n[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,n),c.finisher&&o.push(c.finisher);var d=c.extras;if(d){for(var l=0;l<d.length;l++)this.addElementPlacement(d[l],n);t.push.apply(t,d)}}return{element:e,finishers:o,extras:t}},decorateConstructor:function(e,n){for(var t=[],o=n.length-1;o>=0;o--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,n[o])(i)||i);if(void 0!==r.finisher&&t.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:t}},fromElementDescriptor:function(e){var n={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(n.initializer=e.initializer),n},toElementDescriptors:function(e){if(void 0!==e)return(n=e,function(e){if(Array.isArray(e))return e}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return b(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(e,n):void 0}}(n)||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 n=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),n},this);var n},toElementDescriptor:function(e){var n=e.kind+"";if("method"!==n&&"field"!==n)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+n+'"');var t=u(e.key),o=e.placement+"";if("static"!==o&&"prototype"!==o&&"own"!==o)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 "'+o+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:n,key:t,placement:o,descriptor:Object.assign({},i)};return"field"!==n?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:M(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var n={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),n},toClassDescriptor:function(e){var n=e.kind+"";if("class"!==n)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+n+'"');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 t=M(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,n){for(var t=0;t<n.length;t++){var o=(0,n[t])(e);if(void 0!==o){if("function"!=typeof o)throw new TypeError("Finishers must return a constructor.");e=o}}return e},disallowProperty:function(e,n,t){if(void 0!==e[n])throw new TypeError(t+" can't have a ."+n+" property.")}};return e}function c(e){var n,t=u(e.key);"method"===e.kind?n={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?n={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?n={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(n={configurable:!0,writable:!0,enumerable:!0});var o={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:n};return e.decorators&&(o.decorators=e.decorators),"field"===e.kind&&(o.initializer=e.value),o}function d(e,n){void 0!==e.descriptor.get?n.descriptor.get=e.descriptor.get:n.descriptor.set=e.descriptor.set}function l(e){return e.decorators&&e.decorators.length}function p(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function M(e,n){var t=e[n];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+n+"' to be a function");return t}function u(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function b(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function h(e,n,t,o){var i=z(O(1&o?e.prototype:e),n,t);return 2&o&&"function"==typeof i?function(e){return i.apply(t,e)}:i}function z(){return z="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,n,t){var o=function(e,n){for(;!{}.hasOwnProperty.call(e,n)&&null!==(e=O(e)););return e}(e,n);if(o){var i=Object.getOwnPropertyDescriptor(o,n);return i.get?i.get.call(arguments.length<3?e:t):i.value}},z.apply(null,arguments)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}let f=(m=[(0,i.EM)("btu-table")],g=(0,r.m)((0,a.s)(o.WF)),A=s(),w=function(e,n){class t extends n{constructor(...n){super(...n),e(this)}}return{F:t,d:[{kind:"field",decorators:[(0,i.nJ)("table")],key:"_table",value:void 0},{kind:"method",key:"connectedCallback",value:function(){h(t,"connectedCallback",this,3)([]),this._table.then(e=>{const n=e.querySelector(':scope th > input[type="checkbox"]');n?.addEventListener("click",this._updateCheckAll),e.querySelectorAll(':scope > tbody input[type="checkbox"]').forEach(e=>{e.addEventListener("click",this._updateSelectAll)})})}},{kind:"method",key:"disconnectedCallback",value:function(){h(t,"disconnectedCallback",this,3)([]),this._table.then(e=>{const n=e.querySelector(':scope th > input[type="checkbox"]');n?.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 n=e.querySelector(':scope th > input[type="checkbox"]'),t=e.querySelectorAll(':scope > tbody input[type="checkbox"]'),o=e.querySelectorAll(':scope > tbody input[type="checkbox"]:checked');n&&(n.checked=t.length>0&&o.length===t.length,this.emit("btu-table-checked-all"))})}}},{kind:"field",key:"_updateCheckAll",value(){return e=>{this._table.then(n=>{const t=e.target;t instanceof HTMLInputElement&&(n.querySelectorAll(':scope > tbody input[type="checkbox"]').forEach(e=>{e.checked=t.checked}),this.emit("btu-table-checked-all"))})}}},{kind:"method",key:"render",value:function(){return o.s6}}]}}(function(e){A.initializeInstanceElements(e,v.elements)},g),v=A.decorateClass(function(e){for(var n=[],t=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},o=0;o<e.length;o++){var i,r=e[o];if("method"===r.kind&&(i=n.find(t)))if(p(r.descriptor)||p(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}d(r,i)}else n.push(r)}return n}(w.d.map(c)),m),A.initializeClassElements(w.F,v.elements),A.runClassFinishers(w.F,v.finishers));var m,g,A,w,v},13904(e,n,t){"use strict";t.d(n,{A:()=>M}),t(49371),t(96648),t(56065);var o=t(36450),i=t.n(o),r=t(25936),a=t(91762);const s=[90,81,72,38,14,8,4],c=[3,5,7,14,26,42,65],d={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 l(e){const[n,t,o]=e.map(e=>e/255).map(e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return 100*(.2126*n+.7152*t+.0722*o)}const p=new class{constructor(e){this._element=void 0,this._dark=!1,this._theme=void 0,this.createTable=(e,n,t)=>{const o=(0,r.A)("table",{className:"Theme-colors"}),i=(0,r.A)("tr");o.appendChild(i),i.appendChild((0,r.A)("td",{colspan:2}));const a=this._dark?t:n,s=a?JSON.parse(a):this._theme[this._dark?"darkLuminances":"luminances"],c=e?JSON.parse(e):this._theme.colors;return s.forEach((e,n)=>{i.appendChild((0,r.A)("td",(0,r.A)("input",{type:"text",name:"luminance-"+n,value:e,oninput:e=>{e.target instanceof HTMLInputElement&&(s[n]=parseInt(e.target.value,10)),this._updateColorAccent(),this._updateUI()},onkeydown:e=>{if(!(e.target instanceof HTMLInputElement))return;let t=parseInt(e.target.value,10);switch(e.key){case"ArrowUp":t++,e.target.value=t.toString(),s[n]=t,this._updateColorAccent(),this._updateUI();break;case"ArrowDown":t--,e.target.value=t.toString(),s[n]=t,this._updateColorAccent(),this._updateUI()}}})))}),Object.keys(c).forEach(e=>{if("accent"===e)return;const n=(0,r.A)("tr",(0,r.A)("td",e.charAt(0).toUpperCase()+e.slice(1)));n.appendChild((0,r.A)("td",(0,r.A)("input",{className:"color",type:"text",name:"color-"+e,value:c[e],onchange:n=>{n.target instanceof HTMLInputElement&&(c[e]=n.target.value),this._updateColorAccent(),this._updateUI()}})));for(let t=0;t<s.length;t++)n.appendChild((0,r.A)("td",{style:`background:var(--color-${e}${t+1});`}));o.appendChild(n)}),o},this._element=e,(0,a.A)(this._element,".themeColorContainer",e=>{const n=e.dataset.colors,t=e.dataset.luminances,o=e.dataset.darkLuminances,i=e.querySelector("input.appearance");i&&(i.value=this._dark.toString());const r=this.createTable(n,t,o);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 n=e.closest(".CIG-row");if(!n)return;const t=n.nextElementSibling;t&&("true"==e.getAttribute("aria-selected")?t.classList.remove("is-hidden"):t.classList.add("is-hidden"),new MutationObserver(e=>{e.forEach(e=>{if("attributes"===e.type){const n=e.target;n instanceof Element&&"true"==n.getAttribute("aria-selected")?t.classList.remove("is-hidden"):t.classList.add("is-hidden")}})}).observe(e,{attributes:!0}))});const n=window.localStorage.getItem("BSP.Theme");let t=!1;const o=document.documentElement.dataset.theme??"";try{JSON.parse(o),t=!0}catch(e){t=!1}this._theme=t?JSON.parse(o):n?JSON.parse(n):function(){const e=d.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 n of e)n.classList.toggle("is-dark",this._dark),n.classList.toggle("is-boxedInput",!!this._theme.boxedInput),n.classList.toggle("is-compact",!!this._theme.compact),n.classList.toggle("is-compactRails",!!this._theme.compactRails),n.classList.toggle("is-highContrast",!!this._theme.highContrast),"more"===this._theme.contrastChoices?n.classList.add("is-moreContrast"):"normal"===this._theme.contrastChoices&&n.classList.add("is-normalContrast");const n=this._element.style,t=this._theme.headerBackground;if(t){n.setProperty("--Page-headerBackground",t);for(const n of e)n.classList.toggle("is-lightHeader",l(i().hex.rgb(t))>Math.sqrt(100)!=this._dark)}else if(this._dark){n.setProperty("--Page-headerBackground","var(--color-dominant1)");for(const n of e)n.classList.add("is-lightHeader")}else{n.setProperty("--Page-headerBackground","var(--color-dominant7)");for(const n of e)n.classList.remove("is-lightHeader")}const o=i().hex.hsl(this._theme.colors.gray),r=this._guessColor(o[0],o[1],1),a=this._guessColor(o[0],o[1],100);this._dark?(this._setColorProperty(n,"black",a),this._setColorProperty(n,"white",r),n.setProperty("--color-iconHoverBackground","rgba(255, 255, 255, 0.08)")):(this._setColorProperty(n,"black",r),this._setColorProperty(n,"white",a),n.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,t]=i().hex.hsl(this._theme.colors[c]);s?.forEach((o,i)=>{this._setColorProperty(n,`${c}${i+1}`,this._guessColor(e,t,this._theme.highContrast&&3==i?this._dark?4.5*(o+5)-5:(o+5)/4.5-5:o))})}}_guessColor(e,n,t){let o=100,r=0;for(let a=0;a<=100;a+=.1){const s=Math.abs(t-l(i().hsl.rgb([e,n,a])));o>s&&(o=s,r=a)}return i().hsl.rgb([e,n,r])}_setColorProperty(e,n,t){e.setProperty(`--color-${n}`,"#"+i().rgb.hex(t)),e.setProperty(`--rgb-${n}`,t.join(" "))}_updateColorAccent(){this._theme.colors.accent=this._theme.colors.dominant}getColor(e,n){return this._element.style.getPropertyValue(`--color-${e}${n}`)}}(document.documentElement);function M(){return p}},39979(e,n,t){"use strict";function o(e,n){if(e<=0)return n;let t;return function(){clearTimeout(t),t=setTimeout(()=>{t=void 0,n.apply(this,[...arguments])},e)}}t.d(n,{A:()=>o})},44508(e,n,t){"use strict";function o(e,n){const t=e.closest(".ContentEdit")||e.closest("btu-widget");if(!t)return null;let o,i;if(t.classList.contains("ContentEdit")){if(o=t.getAttribute("data-type-id"),i=e.getAttribute(n),!o||!i)return null}else if(t instanceof HTMLElement&&(o=t.getAttribute("widgetid"),i=t.getAttribute("internalname"),!o||!i))return null;return o&&i?`BSP.ContentEdit.widgetCollapsed.${o}.${i}`:null}t.d(n,{A:()=>o})},39403(e,n,t){"use strict";function o(e){let n;return function(){n&&window.cancelAnimationFrame(n),n=window.requestAnimationFrame(()=>{n=void 0,e.apply(this,[...arguments])})}}t.d(n,{A:()=>o})},71669(e,n,t){"use strict";t.d(n,{A:()=>i});const o=window.localStorage,i={get:e=>o.getItem(e),set:(e,n)=>o.setItem(e,n),toggle:(e,n)=>(void 0===n&&(n=!o.getItem(e)),n?o.setItem(e,"1"):o.removeItem(e),n)}},98376(e,n,t){"use strict";t.d(n,{OK:()=>i,eu:()=>r,lj:()=>a});const o=/[\r\n%#()<>?[\\\]^`{|}]/g;function i(e){return e.indexOf("http://www.w3.org/2000/svg")<0&&(e=e.replace(/<svg/g,"<svg xmlns='http://www.w3.org/2000/svg'")),e}function r(e,n){const t=e.match(/<svg[^>]*>/);if(!t)return e;const o=t[0],i=`<mask id="${n}">`,r=e.indexOf(o)+o.length,a=e.lastIndexOf("</svg>");return e.slice(0,r)+i+e.slice(r,a)+"</mask>"+e.slice(a)}function a(e){return(e=(e=(e=e.replace(/"/g,"'")).replace(/>\s{1,}</g,"><")).replace(/\s{2,}/g," ")).replace(o,encodeURIComponent)}},94286(e,n,t){"use strict";function o(e,n){if(e<=0)return n;let t,o=0;return function(){if(t)return;const i=Date.now(),r=e-i+o;r<=0?(o=i,n.apply(this,[...arguments])):t=setTimeout(()=>{o=i,t=void 0,n.apply(this,[...arguments])},r)}}t.d(n,{A:()=>o}),Object.defineProperty(o,"name",{value:"default",configurable:!0})},12471(e,n,t){"use strict";function o(e){return Promise.allSettled(e.getAnimations().map(e=>e.finished))}t.d(n,{W:()=>o}),t(49371),t(56065)},77172(e,n,t){"use strict";t.a(e,async(e,n)=>{try{t(86634),t(49371),t(26780),t(96648);var o=t(88646),i=(t(29819),t(25421)),r=t(91762),a=t(25936),s=t(90127),c=t(71669),d=(t(96989),t(1356),t(61692),t(83046)),l=t(76375),p=(t(59909),t(12471)),M=(t(44479),t(35083)),u=(t(16918),t(63882)),b=t(94286),h=t(49309),z=t(66e3),O=(t(27802),e([o]));function f(e,n){const t=(window.BRIGHTSPOT?.icons?.materialToLucide??{})[e]??e,o=(0,l.s)(t,n);n.style.setProperty("--compat-icon",`'${o?.compat??""}'`),o?.encodedSvg?n.style.setProperty("--compat-icon-via-mask",`url("data:image/svg+xml,${o.encodedSvg}")`):n.style.removeProperty("--compat-icon-via-mask")}o=(O.then?(await O)():O)[0],(0,r.A)("html",e=>{for(let n=e.style.length-1;n>=0;n--){const t=e.style[n];(t?.startsWith("--color")||t?.startsWith("--rgb"))&&e.style.removeProperty(t)}}),(0,r.A)(".Page-nav",e=>{e.removeAttribute("inert");const n=document.querySelector(".Page-navToggle");n&&document.querySelector(".Page-header")?.insertAdjacentElement("afterbegin",n)}),(0,r.A)(".Page-navItemToggle",e=>{const n=new u.A;n.symbol="chevron-down",e?.prepend(n)}),(0,r.A)(".Page-navToggle",e=>{function n(n){const t=n?window.BRIGHTSPOT?.ui.tooltips.menu.close:window.BRIGHTSPOT?.ui.tooltips.menu.open;e.title=t,e.ariaLabel=t}e.onclick=()=>{const t="false"===e.ariaExpanded;e.ariaExpanded=t?"true":"false",n(t),(0,i.L)(t?"ON":"OFF");const o=document.querySelectorAll(".Page-main > btu-nav-rail a"),r=e.closest(".Page"),a=document.querySelector(".Page-main > btu-nav-rail");r?.classList.add("is-nav-animating"),a?(0,p.W)(a).then(()=>r?.classList.remove("is-nav-animating")):r?.classList.remove("is-nav-animating"),t?o.forEach(e=>{e.parentElement?.hasAttribute("aria-expanded")?e.title=e.parentElement?.classList.contains("is-expanded")?window.BRIGHTSPOT?.ui.tooltips.collapse:window.BRIGHTSPOT?.ui.tooltips.expand:e.title=""}):o.forEach(e=>{e.title=e.querySelector(":scope > span")?.textContent??""})};const t=(0,i.J)();window.matchMedia("not all and (min-width: 768px)").matches?e.setAttribute("aria-expanded","false"):null!==t&&e.setAttribute("aria-expanded","ON"===t?"true":"false"),n("true"===e.ariaExpanded),"false"===e.getAttribute("aria-expanded")&&document.querySelectorAll(".Page-main > btu-nav-rail a").forEach(e=>{e.title=e.querySelector(":scope > span")?.textContent??""})}),(0,r.A)(".toolUserDisplay",e=>{const n=e.querySelector(".toolUserSite");if(n){const e=document.querySelector(".toolTitle");e?.append(n)}}),(0,r.A)(".ContentEdit-top",e=>{const n=e.closest(".ContentEdit");e.querySelector(".WorkInProgressSaveStatus")&&e.classList.add("has-wips");const t=n?.querySelector(":scope .ContentEdit-main > .Message");if(t&&(e.insertAdjacentElement("afterend",t),!t.closest(".LiveBlogGrid"))){const e=t.closest(".Popup-content, .Page-content");e?.classList.add("has-message")}const o=n?.querySelector(".ContentEdit-title");if(!o)return;const i=o.querySelector("button.ContentEdit-overlay:not(empty)");i&&(e.prepend(i),e.classList.add("has-overlay"))}),(0,r.A)(".Page-header.mobile",e=>{const n=e.closest(".Page-header"),t=n?.querySelector(".Page-search");t&&(t.querySelector(":scope > button")?.removeAttribute("hidden"),t.querySelector("btu-search-input")?.setAttribute("hidden","true"))}),(0,r.A)(".Page .Page-search",e=>{e.querySelector(":scope > button")?.addEventListener("click",()=>{e.setAttribute("aria-expanded","true"===e.getAttribute("aria-expanded")?"false":"true"),"true"===e.getAttribute("aria-expanded")&&(e.querySelector("btu-search-input")?.removeAttribute("hidden"),e.querySelector(":scope > button")?.setAttribute("hidden","true"),e.querySelector("btu-search-input > btu-input > input")?.click())})}),(0,r.A)(".Page .Page-search > btu-search-input > btu-input > input",e=>{e.addEventListener("click",()=>{e.closest('.Page:has( .Popup[name="miscSearch"])')||(e.closest(".Page")?.classList.add("is-searchOpening"),(0,r.A)(".Page dialog:not(:modal)[open] .Popup.loaded.is-ready.is-visible .SearchWidget.is-transitioned",e=>{e.closest(".Page")?.classList.remove("is-searchOpening")}))})}),(0,r.A)("btu-dialog:has(.SearchWidget.is-global)",e=>{e.addEventListener("btu-dialog-closed",()=>{document.querySelector(".Page .Page-search")?.setAttribute("aria-expanded","false");const e=document.querySelector(".Page-header.mobile .Page-search");e?.querySelector("btu-search-input")?.setAttribute("hidden","true"),e?.querySelector(":scope > button")?.removeAttribute("hidden")})}),(0,r.A)(".Page-content:has(.SearchWidget-query)",e=>{e.previousElementSibling?.querySelector(".Page-search")?.setAttribute("aria-expanded","false")}),(0,r.A)(".siteSwitch-logo",e=>{const n=document.querySelector(".Page-title > a > img");n&&e.append(n.cloneNode())}),(0,r.A)(".TabBar.is-menuOnly",e=>{const n=e.querySelector(".TabBar-menu");if(!n)return;const t=n.querySelector(":scope .TabBar-menuList > .TabBar-menuItem.is-selected"),o=(0,a.A)("div",{className:"TabBar-selected-text",innerText:t?.dataset.tab});n.insertBefore(o,n.firstElementChild),n.querySelectorAll(".TabBar-menuItem").forEach(e=>{e.addEventListener("click",n=>{n?.preventDefault(),o.innerText=e.dataset.tab??""})})}),(0,r.A)(".SearchResult-views > ul",e=>{e.querySelectorAll(":scope > li > a").forEach(e=>{const n=e.textContent?.toLowerCase()??"";e.dataset.label=n,e.ariaLabel=n,e.title=n})}),(0,r.A)(".Guide-field > .Guide-embedded:empty",e=>{const n=(0,a.A)("a",{className:"Guide-edit",href:"#",disabled:!0,"aria-disabled":!0});e.append(n)}),(0,r.A)('.Popup[name="edit-guide"] .RCIG-item > btu-legacy-dropdown:not(:empty)',e=>{e?.closest(".RCIG-item")?.classList.add("has-dropdown-actions")}),(0,r.A)("table",e=>{if(["LinkList","LinkTable","term-results"].some(n=>e.classList.contains(n))&&!e.classList.contains("is-static")){const n=e.querySelector(":scope > thead > tr"),t=e.querySelectorAll("tbody > tr"),o=e.querySelector(".LinkTable-main, .LinkList-main, .term-stats-head"),i=o?.closest("tr");if(!i||!o)return;const r=e.querySelector('th > input[type="checkbox"], td > input[type="checkbox"]');if(n){const e=Array.from(i.children).indexOf(o);let t=e;for(let o=0;o<e;o++){const e=n.children[o];e instanceof HTMLTableCellElement&&e.colSpan>1&&(t=t-e.colSpan+1)}const a=n.children[t];r?n.insertBefore(a,n.children[1]):n.insertBefore(a,n.firstElementChild)}t.forEach(e=>{const n=e.querySelector(":scope > td.LinkTable-main, :scope > td.LinkList-main");n&&(r?e.insertBefore(n,e.children[1]):e.insertBefore(n,e.firstElementChild))})}if(e.closest(".DashboardWidget:not(.widget-scheduledEvents), .SearchWidget-result, #term-finder-result")){const n=e.querySelectorAll("tbody tr:first-child > td").length;if(1===n||2===n&&e.querySelector("tr td.LinkList-viewers"))return;const t=e.parentElement;if(!t)return;if(t.childElementCount>1){const n=(0,a.A)("div",{className:"LinkList-wrapper"});t.insertBefore(n,e),n.appendChild(e)}else t.classList.add("LinkList-wrapper")}}),(0,r.A)(".Notification-pagination",e=>{e.closest(".ToolUserNotifications")?.querySelector(".Notification")?.insertAdjacentElement("beforeend",e)}),(0,r.A)(".PR-pagination",e=>{e.closest(".PR")?.querySelector(".LinkList-wrapper, .LinkTable")?.insertAdjacentElement("afterend",e)}),(0,r.A)(".DashboardWidget-pagination",e=>{e.closest(".p-workStreams")?e.closest(".p-workStreams")?.querySelector(".block:not(:has(+ .block))")?.insertAdjacentElement("afterend",e):e.closest(".DashboardWidget:not(.widget-scheduledEvents)")?.querySelector(".LinkList-wrapper, .LinkTable, .LinkList")?.insertAdjacentElement("afterend",e)}),(0,r.A)('.LookingGlass-actions[data-action="copy"]',e=>{const n=document.createElement("btu-copy-to-clipboard");n.classList.add(...e.classList);const t=e.querySelector(":scope > a")?.getAttribute("href"),o=e.querySelector(":scope > a")?.textContent??"",i=e.querySelector(":scope > span")?.textContent??"";t&&(n.copydata=t,n.title=o,n.label=o,e.parentNode?.insertBefore(n,e),e.remove(),n.addEventListener("btu-copy-to-clipboard-copied",e=>{if(e.target instanceof HTMLElement){const n=e.target.querySelector("button");n&&(n.dataset.successLabel=i)}i&&(0,s.iP)(i)}))}),(0,r.A)(".Page-header",e=>{const n=window.matchMedia("not all and (min-width: 768px)");function t(n){const t=e.querySelector(".Page-search");n?(e.classList.add("mobile"),document.body.classList.remove("has-navrail-expanded"),t&&(t.setAttribute("aria-expanded","false"),t.querySelector(":scope > button")?.removeAttribute("hidden"),t.querySelector("btu-search-input")?.setAttribute("hidden","true"))):(e.classList.remove("mobile"),document.body.classList.toggle("has-navrail-expanded","ON"===(0,i.J)()),t&&(t.querySelector("btu-search-input")?.removeAttribute("hidden"),t.querySelector(":scope > button")?.setAttribute("hidden","true")))}t(n.matches),n.addEventListener("change",e=>t(e.matches))}),(0,r.A)([".DateStringCalendar .Month-dowLabel",".Week-day > .Week-dow"],e=>{const n=e.innerText.substring(0,2);e.innerText=n}),(0,r.A)(".Revisions-statusLabel, .Message.is-revision, .ContentSummary-link > .Label, .ComboInput-selected .Label, .ContentSelector-search > .Label, .LinkTable-label > .Label",e=>{const n=e.dataset.statusColor,t=e.style,o=n??t.getPropertyValue("background");o?(t.setProperty("--status-color",o),e.dataset.statusColor=o,t.removeProperty("background"),t.removeProperty("color")):t.removeProperty("--workflow-color")}),(0,r.A)(".Conversation-post .Conversation-reply",e=>{e.innerText?e.innerText=e.title+" ("+e.innerText+")":e.innerText=e.title;const n=e.closest(".Conversation-post");n?.append(e)}),(0,r.A)("ul.LinkTable",e=>{e.querySelectorAll(":scope > li").forEach(e=>{(e=e.querySelector(".ViewWatchers-item-name")||e).title=e.textContent||""})}),(0,r.A)(".DashboardWidget-maximize",e=>{e.closest(".DashboardRow-cell")?.matches(".is-maximized")&&e.setAttribute("aria-expanded","true"),e.addEventListener("click",async n=>{const t=n.target;if(!(t instanceof HTMLElement))return;const o=n=>{n instanceof HTMLElement&&(e.toggleAttribute("aria-expanded")?(n.classList.add("is-maximized"),document.body.classList.add("has-dashboardWidgetMaximized")):(n.classList.remove("is-maximized"),document.body.classList.remove("has-dashboardWidgetMaximized")))},i=t.closest(".DashboardRow-cell");if(i){if(i.classList.contains("is-maximized"))document.body.classList.remove("transition-backdrop"),o(i);else{document.body.classList.add("transition-backdrop"),i.classList.add("transition-dashboard-widget");const e=document.startViewTransition(()=>o(i));await e.finished,i.classList.remove("transition-dashboard-widget")}e.focus()}})}),(0,r.A)(".ImageEditor-groups",e=>{const n=(0,a.A)("button",{className:"ImageEditor-focusToggle",type:"button"});let t=null;e.prepend(n),n.addEventListener("click",n=>{const o=e.classList.toggle("is-focus-active");t||(t=e.querySelector(":scope > .ComboInput")),t&&(t.tabIndex=o?0:-1)})}),(0,r.A)(".SearchWidget-reset",e=>{e.innerText=e.title?.split(" ")[0]}),(0,r.A)(".SearchResult-images a[data-label-html] > figcaption > .contentTitle--v5 > .Label",e=>{e.classList.add("contentStatus--v5"),e.parentElement?.insertBefore(e,e.parentElement.firstChild)}),(0,r.A)(".SearchResult-images[data-height]",e=>{e.style.setProperty("--image-height",e.dataset.height+"dvh"),new MutationObserver(n=>{for(const t of n)"attributes"===t.type&&"data-height"===t.attributeName&&e.dataset.height&&e.style.setProperty("--image-height",e.dataset.height+"dvh")}).observe(e,{attributes:!0,attributeFilter:["data-height"]})}),(0,r.A)(".SearchResult-imageHeightInput",e=>{const n=(0,a.A)("button",{className:"SearchResult-imageHeightToggle v5-only",type:"button",ariaExpanded:"false",title:window.BRIGHTSPOT?.ui.tooltips.imageHeightOpen,ariaLabel:window.BRIGHTSPOT?.ui.tooltips.imageHeightOpen}),t=(0,a.A)("div",{className:"SearchResult-imageHeightContainer v5-only"});e.insertAdjacentElement("beforebegin",t),t.append(e),t.prepend(n),n?.addEventListener("click",()=>{"false"===n.ariaExpanded?(n.ariaExpanded="true",n.title=window.BRIGHTSPOT?.ui.tooltips.imageHeightClose,n.ariaLabel=window.BRIGHTSPOT?.ui.tooltips.imageHeightClose,e?.classList.add("is-open")):(n.ariaExpanded="false",n.title=window.BRIGHTSPOT?.ui.tooltips.imageHeightOpen,n.ariaLabel=window.BRIGHTSPOT?.ui.tooltips.imageHeightOpen,e?.classList.remove("is-open"))})}),(0,r.A)(".Page-askAi",e=>{document.querySelector(".Page-container")?.insertAdjacentElement("beforebegin",e),document.body.classList.add("has-ask-ai")}),(0,r.A)(".Page-notifications",e=>{const n=e.querySelector("a"),t=new u.A;t.symbol="bell",t.fill="gradient";const o=document.createElement("span");o.textContent=window.BRIGHTSPOT?.ui.tooltips.notifications,n?.appendChild(t),n?.appendChild(o);const i=document.querySelector("btu-nav-rail");if(!i)return;const r=i.querySelector(".Page-avatar"),a=r?.closest("li");if(a){const n=document.createElement("li");n.appendChild(e),i.querySelector("ul")?.insertBefore(n,a)}else i.addItem(e)}),(0,r.A)(".Widget-title + .AIChat-frame",e=>{const n=document.createElement("div");n.classList.add("AIChat-wrapper"),n.classList.add("!px-0"),e.parentElement?.insertBefore(n,e),n.appendChild(e)}),(0,r.A)(".SearchResult-board-fields",e=>{const n=e.closest(".SearchResult");if(!n)return;const t=n.querySelector(".SearchResult-sorts");t&&e.prepend(t)}),(0,r.A)(".ContentEdit-workstreamProgress .progressBar",e=>{e.classList.remove("hidden"),e.removeAttribute("hidden");const n=e.style.width;e.style.removeProperty("width"),e.style.setProperty("--progressPct",n)}),(0,r.A)(".ContentEditDrawer-widget-filters",e=>{const n="EXPANDED"===c.A.get("BSP.ContentEdit.shelfFilters"),t=e.closest(".ContentEditDrawer"),o=e.closest(".ContentEditDrawer-widget");if(!t||!o)return;const i=n?window.BRIGHTSPOT?.ui.tooltips.filtersHide:window.BRIGHTSPOT?.ui.tooltips.filtersShow,r=(0,a.A)("button",{className:"ContentEditDrawer-filtersToggle v5-only",type:"button",title:i,ariaLabel:i,ariaExpanded:n?"true":"false"});e?.classList.toggle("is-visible",n);const s=t?.querySelector(".closeButton"),d=t?.querySelector(".ContentEditDrawer-filtersToggle");d?.remove(),s?.parentNode?.insertBefore(r,s),o.classList.contains("is-loading")&&o.classList.remove("is-loading"),r.addEventListener("click",()=>{e?.classList.toggle("is-visible");const n=e?.classList.contains("is-visible"),t=n?window.BRIGHTSPOT?.ui.tooltips.filtersHide:window.BRIGHTSPOT?.ui.tooltips.filtersShow;c.A.set("BSP.ContentEdit.shelfFilters",n?"EXPANDED":"COLLAPSED"),r.title=t,r.ariaLabel=t,r.ariaExpanded=n?"true":"false"}),e.addEventListener("change",()=>{o.classList.add("is-loading")})}),(0,r.A)(".LiveBlogPostListNav.loaded",e=>{const n=e.closest(".Page-main"),t=n?.querySelector(".LiveBlogGrid");if(!t)return;const o=e.querySelector(".LiveBlogPostList-controls a:not(.LiveBlogPostListNav-refresh)");if(!o)return;const i=n=>{const t=e.querySelector("a.is-selected, tr.is-selected");t&&t.classList.remove("is-selected"),n.classList.add("is-selected")};(0,r.A)(".LiveBlogGrid .ContentEdit",n=>{const r=n?.classList.contains("is-new"),a=n?.dataset.objectId;t.classList.add("is-visible");const s=n.querySelector(".ContentEdit-right.is-visible");if(s&&s.classList.remove("is-visible"),r)i(o);else{if(!a)return;const n=e.querySelector(`tr[data-post-id="${a}"]`);n&&i(n)}});let s=t.querySelector(".LiveBlogPostList-open");s||(s=(0,a.A)("button",{className:"LiveBlogPostList-open",ariaLabel:window.BRIGHTSPOT?.ui.tooltips.listOpen,title:window.BRIGHTSPOT?.ui.tooltips.listOpen,type:"button",onclick:()=>{t.classList.remove("is-visible"),e.classList.add("is-visible")}}),t.insertBefore(s,t.firstElementChild)),e.addEventListener("click",n=>{if(n.target instanceof HTMLAnchorElement){const o=n.target;"postedit"===o.target&&(o.closest(".LiveBlogPostList-controls")||o.closest("tr[data-post-id]"))&&(t.classList.add("is-visible"),e.classList.remove("is-visible"))}})}),(0,r.A)(["[data-icon]","[data-icon-name]","[data-icon-button-name]"],e=>{const n=e.dataset.icon||e.dataset.iconName||e.dataset.iconButtonName;n&&f(n,e)}),document.addEventListener("btu-resolve-icon",e=>{const{name:n,element:t}=e.detail;n&&t&&f(n,t)});const m=e=>{const n=e.querySelector(".ContentLabel");if(!n)return;const t=e.closest(".ContentEdit");if(!t)return;const o=t.querySelector(".ContentEdit-top");if(!o)return;const i=()=>(n.textContent??"").replace(/(\r\n|\n|\r)/gm," "),a=()=>{const n=e.querySelector(".ContentEdit-typeName")?.textContent?.trim()||e.querySelector("select")?.selectedOptions[0]?.text||"",r=e.querySelector(".Label"),a=document.createElement("div");a.classList.add("ContentEdit-title--v5");const s=document.createElement("span");s.innerText=n,s.classList.add("ContentEdit-contentType--v5");const c=document.createElement("span");c.innerText=i(),c.classList.add("ContentEdit-contentTitle--v5");const d=document.createElement("span");d.classList.add("ContentEdit-status--v5");const l=e.querySelector("span.Label");if(d.innerText=l?.innerText??"",l){const e=Array.from(l.classList).find(e=>e.startsWith("is-"));e&&d.classList.add(e)}const p=r?.style?.getPropertyValue("background");p&&(d.dataset.statusColor=p,d.style.setProperty("--status-color",p));const M=t.querySelector(".Message.is-revision"),u=M?.querySelector(".ContentEdit-revisionLabel");if(u){d.innerText=u.innerText;const e=M?.dataset.statusColor||M?.style.getPropertyValue("--status-color")||M?.style.getPropertyValue("background");e&&(d.dataset.statusColor=e,d.style.setProperty("--status-color",e))}d.innerText&&""!=d.innerText||(t.classList.contains("is-notNew")&&(d.innerText=window.BRIGHTSPOT?.ui.workflow.published),t.classList.contains("is-new")&&(d.innerText=window.BRIGHTSPOT?.ui.tooltips.new)),a.replaceChildren(c,s,d);const b=o.querySelector(".ContentEdit-title--v5");b?o.replaceChild(a,b):o.prepend(a)},s=new MutationObserver(()=>{const e=o.querySelector(".ContentEdit-contentTitle--v5");e?e.innerText=i():a()});s.observe(n,{attributes:!0}),(0,M.A)(t,()=>s.disconnect()),a(),(0,r.A)(t,".Message.is-revision",e=>{const n=e.dataset.statusColor||e.style.getPropertyValue("--status-color")||e.style.getPropertyValue("background");if(!n)return;const t=o.querySelector(".ContentEdit-status--v5");if(!t)return;const i=e.querySelector(".ContentEdit-revisionLabel");i&&(t.innerText=i.innerText),t.dataset.statusColor=n,t.style.setProperty("--status-color",n)})};if("loading"===document.readyState)window.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector(".ContentEdit-title");e&&m(e)});else{const q=document.querySelector(".ContentEdit-title");q&&m(q)}(0,r.A)([".Popup.loaded .ContentEdit-title",".LiveBlogGrid .ContentEdit-title"],e=>{m(e)}),(0,r.A)('[aria-haspopup][aria-controls]:not([aria-controls=""])',e=>{const n=document.getElementById(e.getAttribute("aria-controls"));null!==n&&(n.setAttribute("popover",""),e.addEventListener("click",()=>{n.showPopover()}))});const g=(e,n,t=!0)=>{if(null===e)return void console.warn("root element provided to `Dialog._renderTitle` is null. Skipping render.");const o=e.querySelector(`:scope > :where(${n})`),i=e.querySelector(`:scope > * :where(${n})`);if(i&&!o){const n=i.cloneNode(!0);n.classList.remove("!hidden"),e.closest(".Popup-content")?.prepend(n),t&&i.classList.add("!hidden")}},A=e=>{if(!e)return;const n=e.closest(".Popup"),t=e.closest("dialog[open]");if(!n||!t)return;const o=n.ariaLabel;let i=t.ariaLabel;if(!i||o&&i!==o){if(o&&(i=o,n.removeAttribute("aria-label")),!i){const e=n.querySelector(":scope > .Popup-content > .Widget-title");i=e?.querySelector(":scope > span")?.textContent||e?.textContent||null}i&&(t.ariaLabel=i)}else n.removeAttribute("aria-label")};function w(e){const n=document.querySelector(".Page-askAiButton");n&&n.setAttribute("aria-expanded",e?"true":"false")}function v(e){const n=e.target;if(n instanceof HTMLElement&&n.classList.contains("AskAi-close")){const e=document.getElementById("askAi-container");e?.classList.remove("is-loaded"),w(!1)}}(0,r.A)("btu-dialog dialog[open] .Popup-content:not(:has(> .frame))",e=>{g(e,"h1,h2,h3,.Widget-title"),A(e)}),(0,r.A)("btu-dialog dialog[open] .Popup.loaded .frame.plugin-popup.loaded",async e=>{await(0,p.W)(e.closest("dialog[open]")),e.classList.add("is-transitioned"),e.querySelector(".SearchInput input:not([hidden]), [class^=Search] > btu-input input:not([hidden])")?.focus(),[".SearchWidget.is-global",'.Widget[name="diff"]','.Widget[name^="create-new-" i]','.Widget[name^="objectId-" i]:not(:has(.ContentReporting-status))','.Widget[name^="_copy" i]','.Widget[name^="DateStringCalendarFrame" i]'].some(n=>e.matches(n))||(g(e.closest(".Popup-content"),"h1,h2,h3,.Guide-title,.Widget-title"),A(e.closest(".Popup-content")))}),(0,r.A)('btu-dialog dialog[open] .Popup.loaded .plugin-popup.loaded.Widget[name^="objectId-" i]:has(.Admin > :where(.Admin-nav, .Admin-main))',e=>{g(e.closest(".Popup-content"),".Admin .Widget-title",!1),A(e.closest(".Popup-content"))}),(0,r.A)('.Popup:not(.PrePublish, [name="queryField"]), .PrePublishPopup',e=>{if(e.classList.contains("is-local")&&(n=e,!n.dataset?.popupSourceClass||!["rte2-toolbar-add-table"].includes(n.dataset.popupSourceClass)))return e.setAttribute("popover",""),e.addEventListener("toggle",n=>{"closed"===n.newState&&(e.dispatchEvent(new CustomEvent("legacy-popup-closed",{bubbles:!0,composed:!0})),e.remove())}),void e.showPopover();var n;const t=new d.A;t.addEventListener("btu-dialog-ready",()=>{M.A.resume()}),M.A.pause(),e.parentNode?.insertBefore(t,e),e.removeAttribute("role"),t.append(e)}),(0,r.A)(".PrePublish:has(.Popup-content)",async e=>{setTimeout(()=>e.classList.add("PrePublishPopup"),0)}),(0,r.A)(".ContentEdit-workflowToggle",e=>{const n=e.parentElement?.querySelector(".ContentEdit-workflow");if(!n)return;const t=new d.A;t.removeOnClose=!1,t.autoOpen=!1,t.addEventListener("btu-dialog-ready",()=>{M.A.resume()}),M.A.pause(),n.parentNode?.insertBefore(t,n),t.append(n),e.addEventListener("click",n=>{e.classList.contains("is-open")?t.show():t.close(n)})}),(0,r.A)(".QueryField-toggle",e=>{const n=e.parentElement?.querySelector(".QueryField");if(!n)return;const t=n.frame;if(!t)return;if(t._bspDialogSetup)return;t._bspDialogSetup=!0;const o=new d.A;o.removeOnClose=!1,o.autoOpen=!1;const i=()=>{const n=t.querySelector(".Popup");if(!n)return;t.removeEventListener("brightspot-frame-load",i),o.addEventListener("btu-dialog-ready",()=>{M.A.resume()}),M.A.pause(),t.parentNode?.insertBefore(o,t),o.append(t),e.addEventListener("click",e=>{o.show()}),o.addEventListener("btu-dialog-closed",e=>{n.classList.remove("is-visible")});const r=t.querySelector(".QueryField-button");r&&r.addEventListener("click",e=>{o.close(e)})};t.addEventListener("brightspot-frame-load",i)}),(0,r.A)("dialog btu-input > .sp-replacer",e=>{const n=e.getAttribute("aria-controls");if(!n)return;const t=document.querySelector(`#${n}`);t&&(t.setAttribute("popover",""),e.addEventListener("click",()=>{t.showPopover()}))}),(0,r.A)(".ProseMirror-spellcheck-suggestions.is-opening",e=>{e.setAttribute("popover",""),e.showPopover()}),document.addEventListener("click",e=>{const n=e.target;if(n instanceof HTMLDialogElement&&"DIALOG"===n.nodeName){const t=n.parentElement;if(t&&t.tagName===d.A.tagName){if(t.querySelector(".Popup.is-fromTop, .Popup.is-noGap"))return;t.close(e)}}}),document.addEventListener("legacy.popup.close",e=>{const n=e.target;if(n instanceof HTMLElement){const t=n.closest("btu-dialog");t?.close(e)}}),document.addEventListener("page-nav-rail-toggled",e=>{const n=document.querySelector('btu-dialog:has(dialog[open] .Popup[name="miscSearch"])');n?.closest(".Page")?.classList.remove("is-searchOpening"),n?.close(e)}),(0,r.A)(".Month-day:has(a.calendarEvents)",e=>{e.addEventListener("click",()=>{e.querySelector("a.calendarEvents")?.click()})}),(0,r.A)("#askAi-container .frame.loaded",e=>{e.parentElement?.classList.add("is-loaded"),w(!0),(e.closest(".AskAi")||e).addEventListener("click",v)}),(0,r.A)(".AskAi",e=>{e.addEventListener("click",v)}),(0,r.A)(".Page-header .Page-askAiLink",e=>{e.classList.remove("IconButton"),(0,r.A)(".Page-header + btu-nav-rail",n=>{const t=document.createElement("li");t.appendChild(e);const o=n.querySelector("li:has(> .Page-guideLink)");o?n.querySelector("ul")?.insertBefore(t,o):n.querySelector("ul > li")?.insertAdjacentElement("afterend",t)})}),(0,r.A)(".Page-header.mobile ~ .Page-container:not(:has(.ContentEdit-right.is-visible)) .ContentEdit-left",e=>{const n=document.querySelector(".Page-header.mobile");n&&e.addEventListener("scroll",(0,b.A)(100,()=>{const t=e.scrollTop,o=e.scrollHeight-e.clientHeight;t>10&&o>n.offsetHeight+10&&!n.classList.contains("is-scrolled")?n.classList.add("is-scrolled"):t<=10&&n.classList.contains("is-scrolled")&&n.classList.remove("is-scrolled")}))}),(0,r.A)(['.ContentReportingWidget .CIG-row[data-field="getPastReportResults"] .ContentSelector-edit',".CollectionList-item-edit.ContentSelector-edit"],e=>{e.removeAttribute("data-popup-mode")}),(0,r.A)('.Popup[name="siteSwitch"]',e=>{document.getElementById("SiteSwitch-link")?.classList.add("is-active")}),(0,r.A)(".LiveBlogPostList",e=>{document.body.classList.add("has-liveBlog-postList")}),(0,r.A)(".ToolUserAvatar",e=>{e.parentElement?.classList.add("ToolUserAvatar-container")}),document.addEventListener("legacy-popup-closed",e=>{e.target instanceof HTMLElement&&"siteSwitch"===e.target.getAttribute("name")&&document.getElementById("SiteSwitch-link")?.classList.remove("is-active")}),(0,r.A)(".Workflow-state",e=>{e.addEventListener("click",n=>{e.classList.contains("is-dragging")&&n.stopPropagation()},!0)}),(0,r.A)(z.kV,e=>{z.eN.registerFromAttribute(e)}),(0,r.A)(".Page-guide",e=>{const n=e.closest(".Page");if(!n)return;const t=n?.querySelector(".Page-container");function o(){const n=e.querySelector(".Guide-title-text");n?(n.id="Guide-title",e.setAttribute("aria-labelledby","Guide-title")):e.removeAttribute("aria-labelledby")}t&&t.parentNode?.insertBefore(e,t),z.eN.register({id:z.yy.PageGuide,element:e,isHidden:()=>!n.classList.contains("is-guideOpen")});const i=new MutationObserver(e=>{e.forEach(e=>{"childList"===e.type&&o()})});o(),i.observe(e,{childList:!0,subtree:!0})}),(0,r.A)(".Page-header",e=>{z.eN.register({id:z.yy.PageHeader,element:e,label:window.BRIGHTSPOT?.ui.tooltips.skipLinks.pageHeader})}),(0,r.A)('btu-nav-rail[role="navigation"]',e=>{z.eN.register({id:z.yy.PageNav,element:e,label:window.BRIGHTSPOT?.ui.tooltips.skipLinks.pageNavigation})}),(0,r.A)(".Page-content:not(:has(> .content-edit), :has(> .Admin))",e=>{z.eN.register({id:z.yy.PageMain,element:e,label:window.BRIGHTSPOT?.ui.tooltips.skipLinks.mainContent})}),(0,r.A)("dialog[open] .Popup-content > .Popup-close",e=>{z.eN.register({id:z.yy.ModalClose,element:e})}),(0,r.A)('.ContentEdit-right[role="region"]',e=>{const n=()=>{const n="chat_bubble"===e.dataset.rightTab;z.eN.register({id:z.yy.ContentEditRight,element:e,preferredFocus:()=>n?e.querySelector(".Conversation-newPost .ProseMirror"):null,isHidden:()=>!e.classList.contains("is-visible")})};e.classList.contains("is-visible")&&n(),new MutationObserver(t=>{for(const o of t)e.classList.contains("is-visible")&&n()}).observe(e,{attributeFilter:["class"]})}),(0,r.A)("section > .ContentEdit-toolbar",e=>{z.eN.register({id:z.yy.ContentEditToolbar,element:e})}),(0,r.A)('.ContentEdit-left[role="region"]',e=>{z.eN.register({id:z.yy.PageMain,element:e})}),(0,r.A)('.ContentEdit-top[role="region"]',e=>{z.eN.register({id:z.yy.ContentEditTop,element:e})}),(0,r.A)('.ContentEdit-preview[role="region"]:not([inert])',e=>{z.eN.register({id:z.yy.ContentEditPreview,element:e,isHidden:()=>e.hasAttribute("inert")})}),(0,r.A)('.ContentEditDrawer[role="region"].is-open',e=>{z.eN.register({id:z.yy.ContentEditDrawer,element:e,isHidden:()=>!e.classList.contains("is-open")})}),(0,r.A)("#ContentEditDrawer-title",e=>{const n=e.closest('.ContentEditDrawer[role="region"]');if(!n)return;const t=`ContentEditDrawer-title-${(0,h.A)().replace(/-/g,"")}`;e.id=t,n.setAttribute("aria-labelledby",t)}),(0,r.A)(".ContentEdit-right-title",e=>{const n=e.closest('[role="region"][data-right-tab]');if(!n)return;const t=`${e.id}-${(0,h.A)().replace(/-/g,"")}`;e.id=t,n.setAttribute("aria-labelledby",t)}),(0,r.A)('.Admin-nav[role="navigation"]',e=>{const n=e.getAttribute("aria-labelledby"),t=n?document.getElementById(n)?.textContent?.trim():null,o=t?`${t} ${window.BRIGHTSPOT?.ui.tooltips.skipLinks.navigation}`:window.BRIGHTSPOT?.ui.tooltips.skipLinks.navigation;z.eN.register({id:z.yy.LeftNav,element:e,label:o});const i=e.nextElementSibling;if(!i||!i.classList.contains("Admin-main"))return;z.eN.register({id:z.yy.PageMain,element:i,label:window.BRIGHTSPOT?.ui.tooltips.skipLinks.mainContent});const r=i.getAttribute("aria-labelledby");r&&(document.getElementById(r)||i.querySelector(".Widget-title")?.setAttribute("id",r))}),(0,r.A)(".ActionBar",e=>{const n=e.closest(".Widget");if(!n)return;const t=n.querySelector(".Widget-title");let o="";const i=e=>{o=e.pointerType,setTimeout(()=>{o=""},0)},r=n=>{if(o)return;const i=n.target;i instanceof HTMLElement&&requestAnimationFrame(()=>{const n=i.getBoundingClientRect();(n.bottom>e.getBoundingClientRect().top||n.top<(t?.getBoundingClientRect().bottom||0))&&i.scrollIntoView({block:"nearest",behavior:"smooth"})})};n.addEventListener("pointerdown",i,{passive:!0}),n.addEventListener("focusin",r,{passive:!0}),(0,M.A)(n,()=>{n.removeEventListener("pointerdown",i),n.removeEventListener("focusin",r)})}),n()}catch(k){n(k)}})},9818(e,n,t){"use strict";t.d(n,{A:()=>A}),t(57573),t(49371),t(96648),t(56065);var o=t(71224),i=t(98474),r=t(67324),a=t(44508),s=t(44209);function c(){c=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,n){["method","field"].forEach(function(t){n.forEach(function(n){n.kind===t&&"own"===n.placement&&this.defineClassElement(e,n)},this)},this)},initializeClassElements:function(e,n){var t=e.prototype;["method","field"].forEach(function(o){n.forEach(function(n){var i=n.placement;if(n.kind===o&&("static"===i||"prototype"===i)){var r="static"===i?e:t;this.defineClassElement(r,n)}},this)},this)},defineClassElement:function(e,n){var t=n.descriptor;if("field"===n.kind){var o=n.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===o?void 0:o.call(e)}}Object.defineProperty(e,n.key,t)},decorateClass:function(e,n){var t=[],o=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!p(e))return t.push(e);var n=this.decorateElement(e,i);t.push(n.element),t.push.apply(t,n.extras),o.push.apply(o,n.finishers)},this),!n)return{elements:t,finishers:o};var r=this.decorateConstructor(t,n);return o.push.apply(o,r.finishers),r.finishers=o,r},addElementPlacement:function(e,n,t){var o=n[e.placement];if(!t&&-1!==o.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");o.push(e.key)},decorateElement:function(e,n){for(var t=[],o=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=n[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,n),c.finisher&&o.push(c.finisher);var d=c.extras;if(d){for(var l=0;l<d.length;l++)this.addElementPlacement(d[l],n);t.push.apply(t,d)}}return{element:e,finishers:o,extras:t}},decorateConstructor:function(e,n){for(var t=[],o=n.length-1;o>=0;o--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,n[o])(i)||i);if(void 0!==r.finisher&&t.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:t}},fromElementDescriptor:function(e){var n={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(n.initializer=e.initializer),n},toElementDescriptors:function(e){if(void 0!==e)return(n=e,function(e){if(Array.isArray(e))return e}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return h(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,n):void 0}}(n)||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 n=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),n},this);var n},toElementDescriptor:function(e){var n=e.kind+"";if("method"!==n&&"field"!==n)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+n+'"');var t=b(e.key),o=e.placement+"";if("static"!==o&&"prototype"!==o&&"own"!==o)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 "'+o+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:n,key:t,placement:o,descriptor:Object.assign({},i)};return"field"!==n?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 n={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),n},toClassDescriptor:function(e){var n=e.kind+"";if("class"!==n)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+n+'"');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 t=u(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,n){for(var t=0;t<n.length;t++){var o=(0,n[t])(e);if(void 0!==o){if("function"!=typeof o)throw new TypeError("Finishers must return a constructor.");e=o}}return e},disallowProperty:function(e,n,t){if(void 0!==e[n])throw new TypeError(t+" can't have a ."+n+" property.")}};return e}function d(e){var n,t=b(e.key);"method"===e.kind?n={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?n={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?n={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(n={configurable:!0,writable:!0,enumerable:!0});var o={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:n};return e.decorators&&(o.decorators=e.decorators),"field"===e.kind&&(o.initializer=e.value),o}function l(e,n){void 0!==e.descriptor.get?n.descriptor.get=e.descriptor.get:n.descriptor.set=e.descriptor.set}function p(e){return e.decorators&&e.decorators.length}function M(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function u(e,n){var t=e[n];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+n+"' to be a function");return t}function b(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function h(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function z(){return z="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,n,t){var o=function(e,n){for(;!{}.hasOwnProperty.call(e,n)&&null!==(e=O(e)););return e}(e,n);if(o){var i=Object.getOwnPropertyDescriptor(o,n);return i.get?i.get.call(arguments.length<3?e:t):i.value}},z.apply(null,arguments)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}const f=window.localStorage,m=window.BRIGHTSPOT?.ui.tooltips.collapse,g=window.BRIGHTSPOT?.ui.tooltips.expand;let A=(w=[(0,i.EM)("btu-widget")],v=(0,r.m)(o.WF),q=c(),k=function(e,n){class t extends n{constructor(...n){super(...n),e(this)}}return{F:t,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 n=(0,a.A)(this,"data-internal-name");n&&(e?f.setItem(n,"1"):f.removeItem(n)),this.requestUpdate(),this.emit("btu-widget-toggle")}},{kind:"get",key:"collapsed",value:function(){return this._collapsed}},{kind:"method",key:"connectedCallback",value:function(){var e,n,o,i,r;if((e=t,n="connectedCallback",o=this,r=z(O(1&(i=3)?e.prototype:e),n,o),2&i&&"function"==typeof r?function(e){return r.apply(o,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"),n=this.firstChild;n instanceof Element&&!n.classList.contains("Widget-title")&&e&&this.insertBefore(e,n),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?o.qy`<h2
72
+ </btu-input>`}}]},w=g.decorateClass(function(e){for(var n=[],t=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},o=0;o<e.length;o++){var i,r=e[o];if("method"===r.kind&&(i=n.find(t)))if(p(r.descriptor)||p(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}d(r,i)}else n.push(r)}return n}(A.d.map(c)),z),g.initializeClassElements(A.F,w.elements),g.runClassFinishers(A.F,w.finishers));var z,O,f,m,g,A,w},4143(e,n,t){"use strict";t.a(e,async(e,o)=>{try{t.d(n,{A:()=>W}),t(57573),t(49371),t(96648),t(56065);var i=t(71224),r=t(98474),a=t(67102),s=t(19985);function c(e,n,t,o){var i=d();if(o)for(var r=0;r<o.length;r++)i=o[r](i);var a=n(function(e){i.initializeInstanceElements(e,s.elements)},t),s=i.decorateClass(M(a.d.map(l)),e);return i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}function d(){d=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,n){["method","field"].forEach(function(t){n.forEach(function(n){n.kind===t&&"own"===n.placement&&this.defineClassElement(e,n)},this)},this)},initializeClassElements:function(e,n){var t=e.prototype;["method","field"].forEach(function(o){n.forEach(function(n){var i=n.placement;if(n.kind===o&&("static"===i||"prototype"===i)){var r="static"===i?e:t;this.defineClassElement(r,n)}},this)},this)},defineClassElement:function(e,n){var t=n.descriptor;if("field"===n.kind){var o=n.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===o?void 0:o.call(e)}}Object.defineProperty(e,n.key,t)},decorateClass:function(e,n){var t=[],o=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!u(e))return t.push(e);var n=this.decorateElement(e,i);t.push(n.element),t.push.apply(t,n.extras),o.push.apply(o,n.finishers)},this),!n)return{elements:t,finishers:o};var r=this.decorateConstructor(t,n);return o.push.apply(o,r.finishers),r.finishers=o,r},addElementPlacement:function(e,n,t){var o=n[e.placement];if(!t&&-1!==o.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");o.push(e.key)},decorateElement:function(e,n){for(var t=[],o=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=n[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,n),c.finisher&&o.push(c.finisher);var d=c.extras;if(d){for(var l=0;l<d.length;l++)this.addElementPlacement(d[l],n);t.push.apply(t,d)}}return{element:e,finishers:o,extras:t}},decorateConstructor:function(e,n){for(var t=[],o=n.length-1;o>=0;o--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,n[o])(i)||i);if(void 0!==r.finisher&&t.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:t}},fromElementDescriptor:function(e){var n={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(n.initializer=e.initializer),n},toElementDescriptors:function(e){if(void 0!==e)return(n=e,g(n)||m(n)||O(n)||z()).map(function(e){var n=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),n},this);var n},toElementDescriptor:function(e){var n=e.kind+"";if("method"!==n&&"field"!==n)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+n+'"');var t=q(e.key),o=e.placement+"";if("static"!==o&&"prototype"!==o&&"own"!==o)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 "'+o+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:n,key:t,placement:o,descriptor:Object.assign({},i)};return"field"!==n?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:h(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var n={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),n},toClassDescriptor:function(e){var n=e.kind+"";if("class"!==n)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+n+'"');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 t=h(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,n){for(var t=0;t<n.length;t++){var o=(0,n[t])(e);if(void 0!==o){if("function"!=typeof o)throw new TypeError("Finishers must return a constructor.");e=o}}return e},disallowProperty:function(e,n,t){if(void 0!==e[n])throw new TypeError(t+" can't have a ."+n+" property.")}};return e}function l(e){var n,t=q(e.key);"method"===e.kind?n={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?n={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?n={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(n={configurable:!0,writable:!0,enumerable:!0});var o={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:n};return e.decorators&&(o.decorators=e.decorators),"field"===e.kind&&(o.initializer=e.value),o}function p(e,n){void 0!==e.descriptor.get?n.descriptor.get=e.descriptor.get:n.descriptor.set=e.descriptor.set}function M(e){for(var n=[],t=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},o=0;o<e.length;o++){var i,r=e[o];if("method"===r.kind&&(i=n.find(t)))if(b(r.descriptor)||b(i.descriptor)){if(u(r)||u(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(u(r)){if(u(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 n.push(r)}return n}function u(e){return e.decorators&&e.decorators.length}function b(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function h(e,n){var t=e[n];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+n+"' to be a function");return t}function z(){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 O(e,n){if(e){if("string"==typeof e)return f(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,n):void 0}}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function m(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e){if(Array.isArray(e))return e}function A(e,n,t,o){return A="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(e,n,t,o){var i,r=_(e,n);if(r){if((i=Object.getOwnPropertyDescriptor(r,n)).set)return i.set.call(o,t),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(o,n)){if(!i.writable)return!1;i.value=t,Object.defineProperty(o,n,i)}else v(o,n,t);return!0},A(e,n,t,o)}function w(e,n,t,o,i){if(!A(e,n,t,o||e)&&i)throw new TypeError("failed to set property");return t}function v(e,n,t){return(n=q(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function q(e){var n=k(e,"string");return"symbol"==typeof n?n:n+""}function k(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function _(e,n){for(;!{}.hasOwnProperty.call(e,n)&&null!==(e=y(e)););return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}window.BRIGHTSPOT?.ui.cms.enableV5UI||await t.e(1946).then(t.bind(t,51946));let W=c([(0,r.EM)("btu-textarea-input")],function(e,n){class t extends n{constructor(...n){super(...n),e(this)}}return{F:t,d:[{kind:"method",key:"find",value:function(){return this.querySelector(":scope > textarea")}},{kind:"set",key:"child",value:function(e){var n;n=e,w(y(t.prototype),"_child",n,this,1),this.input=e}},{kind:"method",key:"createRenderRoot",value:function(){return this}}]}},(0,s.r)((0,a.s)(i.WF)));o()}catch(x){o(x)}},1)},20008(e,n,t){"use strict";var o=t(91762),i=t(55408);(0,o.A)(".GraphQL",e=>{e.addEventListener("onegraph-click",()=>{e.dispatchEvent(new Event("mousedown",{bubbles:!0})),e.dispatchEvent(new Event("click",{bubbles:!0}))})}),(0,o.A)(".GraphQL-controls-toggle",e=>{const n=e.closest(".GraphQL-controls-menu"),t=n?.querySelector(".GraphQL-controls-list");t&&n&&e.addEventListener("click",o=>{i.A.toggle(e,t,()=>n.classList.toggle("is-open"))})}),(0,o.A)(".GraphQL-copy",e=>{e.addEventListener("click",n=>{n.stopPropagation(),n.preventDefault();const t=e.getAttribute("data-code");t&&window.navigator.clipboard.writeText(t),e.setAttribute("data-copied","");const o=e.nextElementSibling;o&&(o.removeAttribute("hidden"),setTimeout(()=>{o.setAttribute("hidden",""),e.removeAttribute("data-copied")},1500))})})},96580(e,n,t){"use strict";(0,t(91762).A)("div.GraphQL-previewControls",e=>{const n=e.querySelector("form[id]");if(!n)return;const t=n.querySelector(".deviceWidthSelect");t&&t.addEventListener("change",e=>{const t=document.querySelector("iframe[name='"+n.target+"']");t&&e?.currentTarget instanceof HTMLSelectElement&&(t.style.width=e?.currentTarget?.selectedOptions[0].value+"px"),window.dispatchEvent(new Event("resize")),n.submit()})})},45383(e,n,t){"use strict";var o=t(60021);(0,t(45055).A)(".Admin-main.is-miller .Widget",e=>{setTimeout(()=>{e.scrollIntoView({block:"end"})},0);const n=(0,o.A)(e,".is-selected");n&&setTimeout(()=>{n.scrollIntoView({block:"center"})},0)})},90871(e,n,t){"use strict";var o=t(18101),i=t(39242),r=t(97204);const a=CSS.supports("field-sizing: content");(0,r.A)("textarea",e=>{const n=e.parentNode;if(a)return void(n.classList.contains("AutoExpand")&&n.classList.add("is-noShim"));const t=()=>`${e.value||e.placeholder} `;let r;if(n.classList.contains("AutoExpand"))r=()=>{n.dataset.value=t();const o=e.style.opacity;e.style.opacity=.99999999,e.style.opacity=o};else{e.rows=1;const n=(0,o.A)("div",{className:"AutoExpand"}),a=(0,o.A)("div",{className:"AutoExpand-shim"});r=()=>a.innerText=t();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)(n,e),n.appendChild(a),n.appendChild(e)}const s=()=>e.parentNode.classList.toggle("is-noShim",0===e.getClientRects().length);r(),s(),new MutationObserver(e=>{for(const{attributeName:n}of e)"class"===n||"style"===n?s():r()}).observe(e,{attributes:!0,attributeFilter:["class","placeholder","style"]}),e.addEventListener("change",r),e.addEventListener("input",r)})},70175(e,n,t){"use strict";t.d(n,{A:()=>a}),t(62953),t(49371),t(26780);var o=t(88630),i=t.n(o),r=t(39979);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 n of e===this._form?e.querySelectorAll("input, select, textarea"):[e])n.autocomplete="off";const n=this._form.target;n&&document.querySelector(`.frame[name="${n}"]:not(.loading):not(.loaded)`)&&this._form.requestSubmit()}submit({target:e}){const n=this._form;if(n&&e.name)if(n instanceof HTMLFormElement){const t=new FormData(n);this._lastData&&JSON.stringify([...this._lastData.entries()])===JSON.stringify([...t.entries()])||(window.BRIGHTSPOT.ajaxInitiator={action:n.action,id:e.name,nodeName:e.nodeName.toLowerCase(),shadowField:e.shadowField},n.requestSubmit()),this._lastData=t}else{const e=i()(n),t=e.find(":input").serialize();this._lastData!==t&&(this._lastData=t,e.trigger("submit"))}}}},85945(e,n,t){"use strict";t(49371),t(96648);var o=t(23707),i=t.n(o),r=t(45055),a=t(88630);const s=document.createElement("style");s.className="Bridge",document.head.appendChild(s);const c=s.sheet,d={};function l(e,n){"function"==typeof n||n.startsWith("RichTextEditor-")||(Array.isArray(e)?e:[e]).forEach(e=>{e.indexOf(",")<0&&c.insertRule(`${e}:not(.${n}) { display: none; }`)}),(0,r.A)(e,e=>{"function"==typeof n?n(e):e.classList.contains(n)||(d[n]||(d[n]=!0,i().debug(`Bridged to ${n}`,e)),e.classList.add(n))})}l([".actions",".buttons"],"ActionBar"),l(".withLeftNav","Admin"),l(".withLeftNav > .leftNav","Admin-nav"),l(".withLeftNav > .main","Admin-main"),l(".ToolUserAvatar","Avatar"),l(".MimeTypeCount","Badge"),l(".button","Button"),l(".contentForm","ContentEdit"),l(".ContentFormCreate","ContentForm-create"),l('.ContentEdit[data-content-locked-out="true"]',"is-locked"),l(".contentForm-aside > .widget-publishing","ContentEdit-bar"),l(".OverlayProviderSelect","ContentEdit-overlayList"),l(".widget-publishingWorkflow","ContentEdit-workflow"),l(".widget-publishingPublish","ContentEdit-publish"),l(".widget-publishingWorkflowLog","ContentEdit-workflowLog"),l('.widget-publishing > .widget-publishingPublish > button[name="action-publish"]',"ContentEdit-publishButton"),l(".contentForm-main","ContentEdit-left"),l(".contentForm-main > .widget-content","ContentEdit-main"),l(".contentForm-main > .widget-content > h1","ContentEdit-title"),l(".contentForm-aside > .contentWidgets","ContentEdit-right"),l(".contentForm-main > .contentWidgets","ContentEdit-bottom"),l(['.ContentEdit-bar > button[name="action-draft"]','.ContentEdit-bar > button[name="action-newDraft"]'],"ContentEdit-saveButton"),l(['.ContentEdit-controls button[name="action-restore"]','.ContentEdit-controls button[name="action-restore-draft"]'],"ContentEdit-restoreButton"),l([".objectInputs:not(.BulkUploadProcessor)",".SocialPublishContentEditWidget-inputs"],"CIG"),l("form > .inputContainer","CIG-row"),l("form > .inputContainer > .inputSmall","CIG-small"),l("form > .inputContainer > .inputLabel","CIG-label"),l(".cms-contentTools","ContentTools"),l(".CIG .inputContainer","CIG-row"),l([".objectInputs-readOnly",".CIG .inputContainer-readOnly"],"is-readOnly"),l(".CIG .inputContainer-unlabeled","is-unlabeled"),l(".CIG .inputLabel","CIG-label"),l(".CIG .inputLabel > .icon-object-guide","CIG-help"),l(".CIG .inputPending","CIG-pending"),l(".CIG .inputUpdated","CIG-updated"),l(".CIG .inputNote","CIG-note"),l(".CIG .inputSmall","CIG-small"),l(".CIG .inputLarge","CIG-large"),l(".objectId-select","ContentSelector-search"),l(".objectId-edit","ContentSelector-edit"),l(".objectId-clear","ContentSelector-clear"),l(".objectId-placeholder","ContentSelector-placeholder"),l(".dashboard-columns","DashboardRow"),l(".dashboard-column","DashboardRow-column"),l(".dashboard-widget","DashboardRow-cell"),l(".dashboard-widget > .widget","DashboardWidget"),l(".DashboardWidget > h1","DashboardWidget-title"),l([".DashboardWidget > .scheduledEvents-controls",".DashboardWidget > .widget-controls",".DashboardWidget > .widgetControls"],"DashboardWidget-controls"),l([".DashboardWidget > .pagination",".DashboardWidget .scheduledEvents-datePagination",".PR > .pagination"],"DashboardWidget-pagination"),l([".DashboardWidget > .widget-filters",".DashboardWidget > div > .widget-filters",".DashboardWidget .scheduledEvents-dateDisplay"],"DashboardWidget-filters"),l(".table-striped:not(.links)","DT"),l(".calendarButton","DateTimeInput"),l(".UploadChooser","FileInput"),l(".imageEditor","ImageEditor"),l(".imageEditor-image","ImageEditor-main"),l(".imageEditor-aside","ImageEditor-aside"),l(".imageEditor-focus","ImageEditor-focus"),l(".imageEditor-edit","ImageEditor-edit"),l(".imageEditor-adjustment","ImageEditor-adjustment"),l(".imageEditor-sizes","ImageEditor-sizes"),l(".imageEditor-sizeButton","ImageEditor-size"),l(".imageEditor-sizePreview","ImageEditor-sizePreview"),l(".imageEditor-sizeLabel","ImageEditor-sizeLabel"),l(".imageEditor-resetCrop","ImageEditor-sizeReset"),l('.objectInputs[data-type="com.psddev.theme.Theme"]',"ThemeBundle"),l('.objectInputs[data-type="com.psddev.theme.Theme"] .TabBar-item[data-tab="Overrides"]',"ThemeBundle-tabOverrides"),l('[data-field="bundle"] .objectId-edit',"ThemeBundle-edit"),l('.Tab[data-tab-class="com.psddev.theme.ThemeFieldsTab"]',"ThemeBundle-inputs"),l([".ContentEditSites-owner",".ContentEditSites-access",".widget-urlsItem"],"InputRow"),l(".visibilityLabel","Label"),l(".link","Link"),l([".link.icon-action-delete",".link.icon-action-trash",".link.icon-action-cancel"],"is-red"),l(".links:not(.LinkList)","LinkTable"),l([".message",".message-info",".embargo-warning"],"Message"),l([".message.error",".message-error",".embargo-warning"],"is-error"),l([".message.warning",".message-warning"],"is-warning"),l([".message.success",".message-success"],"is-success"),l(".uploadable .message","is-upload"),l(".embargo-emphasis","is-emphasis"),l("body","Page"),l(".hasToolBroadcast","is-broadcasting"),l(".noToolUser","is-unauthenticated"),l(".toolBroadcast","Page-broadcast"),l(".toolHeader","Page-header"),l(".toolHeader-hasEnvironment","is-env"),l(".toolNav","Page-nav"),l(".toolTitle","Page-title"),l(".toolSearch","Page-search"),l(".toolUserSiteDisplay","Page-site"),l(".toolUserAvatarProfile","Page-avatar"),l(".toolUserWelcome","Page-user"),l(".toolEnv","Page-env"),l(".toolContent","Page-content"),l(".toolBackground","Page-background"),l(".widget-logIn","Page-login"),l(['[target="miscSearch"]','[target="profilePanel"]'],e=>e.setAttribute("data-popup-mode","noGap fromTop")),l([".objectId-select","rte2-enhancement-toolbar-change"],e=>e.setAttribute("data-popup-mode","fromRight")),l([".ContentSelector-create",".ContentSelector-edit",".rte2-enhancement-toolbar-edit",'form[target^="objectId-create-"]'],e=>e.setAttribute("data-popup-mode","noGap fromBottom")),l(".popup-objectId-edit-heading","Popup-heading"),l(".repeatableInputs","Repeatable"),l(".Repeatable > ul > li","Repeatable-item"),l(".Repeatable-item > .repeatableLabel","Repeatable-title"),l(".Repeatable > .addButtonContainer","Repeatable-controls"),l(".Repeatable-controls > .addButton","Repeatable-add"),l(".repeatableForm","RCIG"),l(".repeatableForm.addToTop","is-addToTop"),l(".repeatableForm-previewable","is-previewable"),l([".repeatableForm > ol",".repeatableForm > ul"],"RCIG-list"),l(".RCIG-list > li","RCIG-item"),l(".RCIG-item > .repeatableLabel","RCIG-title"),l(".RCIG-item > .removeButton","RCIG-remove"),l(".RCIG > .addButtonContainer","RCIG-controls"),l(".RCIG-controls > .addButton","RCIG-add"),l(".RCIG-controls > .addButtonSelectContainer","RCIG-addSelect"),l(".repeatableForm-weighted","is-weighted"),l(".repeatableForm-weightResetButton","RCIG-resetWeights"),l(".repeatableForm-itemWeights","RCIG-weightBar"),l(".repeatableForm-itemWeight","RCIG-weightBarItem"),l(".repeatableForm-itemWeight-marker","RCIG-weightBarMarker"),l(".repeatableForm-itemWeightHandle","RCIG-weightBarHandle"),l(".repeatableLabel-weightLabel","RCIG-weightLabel"),l(".repeatableLabel-color","RCIG-weightColor"),l([".repeatableObjectId",".repeatableDropdown"],"RCS"),l(".repeatableObjectId.addToTop","is-addToTop"),l([".repeatableObjectId > ol",".repeatableObjectId > ul",".repeatableDropdown > ol",".repeatableDropdown > ul"],"RCS-list"),l(".RCS-list > li","RCS-item"),l(".RCS-item > .removeButton","RCS-remove"),l([".repeatableObjectId > .addButtonContainer",".repeatableDropdown > .addButtonContainer"],"RCS-controls"),l(".RCS-controls > .addButton","RCS-add"),l(".repeatableText","RTI"),l([".repeatableText > ol",".repeatableText > ul"],"RTI-list"),l(".RTI-list > li > .removeButton","RTI-remove"),l(".repeatableText > .addButtonContainer","RTI-add"),l(".searchInput","SearchInput"),l([".Admin-nav .SearchInput",'.Popup[name="siteSwitch"] .SearchInput'],"is-filter"),l(".searchResult-container","SearchResult"),l(".searchResult-view","SearchResult-view"),l(".searchResult-views","SearchResult-views"),l(".searchResult-items","SearchResult-items"),l(".searchResult-pagination","SearchResult-pagination"),l(".searchResult-fields","SearchResult-fields"),l(".searchResult-sorts","SearchResult-sorts"),l(".searchResult-list","SearchResult-list"),l(".searchResult-mixed","SearchResult-mixed"),l(".searchResult-images","SearchResult-images"),l(".searchResult-selectionReset","SearchResult-selectionReset"),l(".searchResult-actions","SearchResult-actions"),l(".searchResult-actions-body","SearchResult-actions-body"),l(".searchResult-action-simple","SearchResult-action"),l(".searchPagination","SearchResult-pagination"),l(".searchSorter","SearchResult-sorts"),l(".searchResultImages","SearchResult-images"),l(".searchResultList","SearchResult-items"),l(".queryRestrictions","SearchResult-query"),l('.Popup[name="siteSearchTermAnalyticsPage"]',"SiteSearchTermAnalytics"),l('.Popup[name="siteSearchTermAnalyticsPage"] .Widget-controls',"SiteSearchTermAnalytics-controls"),l('.Popup[name="siteSearchTermAnalyticsPage"] .pagination',"SiteSearchTermAnalytics-results"),l(".queryField","QueryField"),l(".queryField_frame","QueryField-frame"),l(".queryField_frame .searchControls","QueryField-searchControls"),l(".queryField_frame .searchForm","QueryField-searchForm"),l(['.widget[name="searchAdvancedFull"]','.Widget[name="searchAdvancedFull"]'],"SearchWidget"),l('.SearchWidget[name="miscSearch"]',"is-global"),l(".SearchWidget > h1","SearchWidget-title"),l(".widget-queryField > h1","SearchWidget-title"),l(".searchForm","SearchWidget-form"),l(".searchHistory","SearchWidget-history"),l(".searchRecent","SearchWidget-recent"),l(".searchSaved","SearchWidget-saved"),l(".searchFilters","SearchWidget-controls"),l(".searchFilters .searchInput","SearchWidget-query"),l(".searchFiltersType","SearchWidget-type"),l([".searchFilters > .search-reset",".searchFilters > .action-cancel"],"SearchWidget-reset"),l(".searchFilter","SearchWidget-filter"),l(".searchFilterItem","SearchWidget-filterItem"),l(".searchFilter-advancedQuery","is-advanced"),l(".searchFilter-date","is-date"),l(".searchFilter-record","is-record"),l(".searchCreate","SearchWidget-create"),l(".searchResult","SearchWidget-result"),l(".searchResultTable","SearchResult-table"),l(".WidgetSearchAdvancedQuery","SearchWidgetAdvanced"),l(".WidgetSearchAdvancedQuery .fixedScrollable","SearchWidgetAdvanced-scrollpane"),l(".standardForm","StandardForm"),l([".DashboardTabSelect > ul",".tabs"],"TabBar"),l(".TabBar > li:not(.TabBar-menu)","TabBar-item"),l([".objectInputs",".tabbed"],"TC"),l(".tabbed > [data-tab]","TC-panel"),l(".searchResultTaxonomy","Taxonomy"),l(".searchResultTaxonomyColumn","Taxonomy-column"),l(".searchResultTaxonomyChildren","Taxonomy-children"),l(".searchResultTaxonomyExpand","Taxonomy-expand"),l("input.secret","is-secret"),l(".widget-urlsRepeatable","UrlsWidget"),l(".widget-urlsItemLabel","UrlsWidget-itemLabel"),l(".EditFieldUpdateViewers","Viewers"),l(".EditFieldUpdateViewers-some","Viewers-some"),l(".EditFieldUpdateViewers-none","Viewers-none"),l(".EditFieldUpdateViewers-viewer","Viewers-viewer"),l(".calendar-week","Week"),l(".Week > .calendarRow","Week-row"),l(".Week-row > .calendarDay","Week-day"),l(".Week-day > .calendarDayOfWeek","Week-dow"),l(".Week-day > .calendarDayOfMonth","Week-dom"),l(".Week-row > .calendarCell","Week-content"),l(".calendar-month","Month"),l(".Month > .calendarRow","Month-row"),l(".Month-row > .calendarDay","Month-day"),l(".Month-day > .calendarDayOfWeek","Month-dow"),l(".Month-day > .calendarDayOfMonth","Month-dom"),l(".Popup-content > .frame.loaded",e=>{for(const n of e.children){if(n.classList.contains("Widget"))return;if(n.classList.contains("widget"))return void n.classList.add("Widget")}const n=e.getAttribute("name");e.classList.add("miscSearch"===n||n.startsWith("objectId-")&&n.endsWith("-select")?"SearchWidget":"Widget")}),window.DISABLE_VIDEO_EDITOR_UI||(l('[data-type="brightspot.elemental.AwsElementalVideoProvider"]',"VideoEditor"),l('[data-type="brightspot.elemental.AwsElementalVideoInputWrapper"]',"VideoEditor-fileContainer"),l('[data-type="brightspot.elemental.AwsElementalImageOverlayWrapper"]',"VideoEditor-InputOverlay"),l(".VideoEditor-fileContainer .filePreview > div:first-child","FilePreview-actions"),l('.CIG-row[data-field-name="colorCorrector"]',"VideoEditor-InputColors"),l('[data-type="brightspot.elemental.AwsElementalColorCorrector"]',"VideoEditor-InputColors-group")),l([".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"),l([".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"),l([".Widget > .widget-controls",".Widget > .widgetControls"],"Widget-controls"),l(".CommunityWidget .widget-filters","CommunityWidget-filters"),l(".PR > .widget-filters","PR-filters"),l(".PR > .pagination","PR-pagination"),l(".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}})},25351(e,n,t){"use strict";(0,t(45055).A)(['.ContentEdit-left input[type="checkbox"]','.SearchWidget-filter input[type="checkbox"]'],e=>{const n=()=>{e.setAttribute("title",e.checked?window.BRIGHTSPOT?.ui.tooltips.toggleOff:window.BRIGHTSPOT?.ui.tooltips.toggleOn)};n(),e.addEventListener("change",n)})},50401(e,n,t){"use strict";(0,t(53853).A)("input.color",async()=>{await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(1950),t.e(2882)]).then(t.bind(t,2784))})},82224(e,n,t){"use strict";t.d(n,{A:()=>M}),t(86634),t(57573),t(49371),t(42723),t(26780),t(96648),t(56065),t(56673);var o=t(18101),i=t(60021),r=t(76394),a=t(76752),s=t(22777),c=t(24510);let d,l=0;const p=window.BRIGHTSPOT?.ui?.tooltips;class M{constructor(e,n){this.handleIntersect=(e,n)=>{for(let n of e)!1===n.isIntersecting?this._list.style.display="none":this._list.style.display="block"},this._select=e,this._reorderSelectOptions(),this._getOptionsIndex=0,this._getOptionsUrl="function"==typeof n.getOptionsUrl&&n.getOptionsUrl,this._modifier=n.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,o.A)("ul",{id:"_cb"+l++,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 n=e.target.classList.contains("ComboInput-check")?e.target.parentElement:e.target;n.classList.contains("ComboInput-option")&&this.updateValue(n.getAttribute("data-value"),n.getAttribute("data-missing-option"))}},onmouseover:e=>{const n=e.target.getAttribute("data-create")?e.target.closest(".ComboInput-option"):e.target;n.classList.contains("ComboInput-option")&&this._highlightOption(n,0)}}),this._label=(0,o.A)("div",{className:"ComboInput-label",dataset:{placeholder:e.getAttribute("data-placeholder")||e.getAttribute("placeholder")||""}});let t=e.closest(".SearchWidget-filter");if(t){let e=(0,i.A)(t,'input[type="checkbox"]');e&&e.closest(".SearchWidget-filter")===t&&(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,o.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,o.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 n=this._getActiveOption(),t="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(!t)return this.showList(),void e.preventDefault();if(n){if(n.classList.contains("nested"))return e.preventDefault(),void this.toggleCreateNewList();if(n.dataset.sublist||n.dataset.create){const e=n.querySelector("a.objectId-create");e&&(e.click(),this.hideList())}else this.updateValue(n.getAttribute("data-value"),n.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(n||this._list.firstChild,-1),this.scrollList(),e.preventDefault(),void e.stopPropagation();case"ArrowDown":return this.showList(),this._highlightOption(n||this._list.lastChild,1),this.scrollList(),e.preventDefault(),void e.stopPropagation();case"ArrowRight":return void this.focusFavorite();case"Tab":return void this.hideList()}this===d||e.shiftKey||this.showList()}},this._label,this._filter,this._list,(0,o.A)("span",{class:"ComboInput-icon","aria-hidden":!0})),!this._container.getAttribute("aria-label")||"type"===this._container.getAttribute("aria-label").toLowerCase()){const n=e.closest(".CIG-small")||e.closest(".CIG-large");if(n){let e=n.previousElementSibling;if(e&&!e.classList.contains("CIG-label")&&e.classList.contains("CIG-note")&&(e=e.previousElementSibling),e&&e.classList.contains("CIG-label")){const n=e.querySelector("label");if(n){const e=n.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(n=>{let t;for(const o of n){for(const n of o.removedNodes)if(n===e)return void s.disconnect();"data-placeholder"!==o.attributeName&&"placeholder"!==o.attributeName||(t=!0)}t&&(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 n=e.closest("optgroup")||this._select;n.insertBefore(e,n.firstChild)}}scrollList(){const e=this._getActiveOption();if(!e)return;const n=this._list.getBoundingClientRect(),t=e.getBoundingClientRect();t.bottom>n.bottom?e.scrollIntoView(!1):t.top<n.top&&e.scrollIntoView(!0)}toggleSelection(e,n){e.classList.toggle("is-checked");const t=n.getAttribute("data-value"),o=(0,r.A)(this._list,`.ComboInput-option[data-source="${CSS.escape(t)}"]`);for(let n=0;n<o.length;n++)o[n].setAttribute("aria-selected",e.classList.contains("is-checked"));this.updateLabel()}updateSelection(e){if(e){const n=e.getAttribute("data-value"),t=CSS.escape(n);let o=(0,r.A)(this._list,`.ComboInput-option[data-source="${t}"]:not([data-is-hidden])`);if(0===o.length)return void e.setAttribute("data-hidden",!0);const a=(0,r.A)(this._list,`.ComboInput-option[data-source="${t}"][aria-selected="true"]`);(0,i.A)(e,".ComboInput-selectOption").classList.toggle("is-checked",o.length>0&&o.length===a.length)}}updateList(){if(this._select.dataset.collapseDuplicateOptions)if(this._select.hasAttribute("multiple")){const e=Array.from(this._select.childNodes);for(const n of e){if(this._duplicates.has(n.value))continue;const t=e.filter(e=>e.textContent===n.textContent);t.length>1&&t.forEach((e,n)=>{0===n?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,n,t,a){a||(a=0);for(const i of e.childNodes)switch(i.tagName){case"OPTGROUP":{const e=`${this._list.id}-g${a++}`,t=(0,o.A)("ul",{className:"ComboInput-optionGroup",role:"group","aria-labelledby":e}),r=(0,o.A)("div",{id:e,className:"ComboInput-heading"},i.label),s=(0,o.A)("li",r,t);i.getAttribute("data-select-option")&&(t.dataset.selectOption=i.dataset.selectOption,r.dataset.value=i.getAttribute("value"),r.appendChild((0,o.A)("span",{className:"ComboInput-selectOption",onclick:e=>{this.toggleSelection(e.target,r)}}))),this._list.appendChild(s),n=this._createOptions(i,n,t,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,o.A)("ul",{role:"listbox",hidden:"true"},e.map(e=>(0,o.A)("li",{className:"ComboInput-option","data-sublist":!0,role:"none",id:`${this._list.id}-o${n++}`},(0,o.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,o.A)("li",{className:"ComboInput-option nested","data-create":!0,role:"button","aria-expanded":!1,"aria-label":i.label,id:`${this._list.id}-o${n++}`,onclick:e=>{"A"!==e.target.tagName&&(e.preventDefault(),e.stopPropagation(),this.toggleCreateNewList(),this._filter.focus())}},(0,o.A)("span",{innerHTML:i.label||"",className:"ComboInput-option-nestedLabel","data-create":!0},(0,o.A)("span",{className:"ComboInput-option-arrow"},(0,o.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,o.A)("li",{id:`${this._list.id}-o${n++}`,className:"ComboInput-option",role:"option","aria-selected":!1,"data-create":!0},(0,o.A)("span",{class:"ComboInput-check","aria-hidden":!0}),(0,o.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,o.A)("li",{id:`${this._list.id}-o${n++}`,className:"ComboInput-option",role:"option","aria-selected":!(this._missing&&this._missing.checked)&&(i.selected||i.value===e.value),"data-value":i.value},(0,o.A)("span",{class:"ComboInput-check","aria-hidden":!0}),r?(0,o.A)("div",{className:"ComboInput-option-iframe",innerHTML:r}):i.label||"");if(a.textContent||!e.dataset.placeholder&&!e.getAttribute("placeholder")||a.appendChild((0,o.A)("div",{className:"ComboInput-option-iframe"},(0,o.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",p?.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",n=p?.action?.unfavorite;if(!i.parentElement.getAttribute("data-favorites")){const t=this._select.querySelector("optgroup[data-favorites]");t&&t.querySelector(`option[value="${CSS.escape(i.value)}"]`)||(e+=" is-unstarred",n=p?.action?.favorite)}const t=(0,o.A)("button",{className:e,type:"button","data-id":i.value,title:n,"aria-label":n,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 n;this._list.querySelectorAll(`\n .ComboInput-option-favorite[data-id="${CSS.escape(i.value)}"]`).forEach(e=>{const n=e.classList.contains("is-unstarred")?p?.action?.unfavorite:p?.action?.favorite;e.title=n,e.nextElementSibling.textContent=n,e.classList.toggle("is-unstarred"),e.setAttribute("aria-label",n)});let t=i.getAttribute("data-typeids");if(t){let e=t.split(",").join("&typeIds=");n=CONTEXT_PATH+"update-dropdown-favorites?action=update&typeIds="+e+"&id="+i.value}else n=CONTEXT_PATH+"update-dropdown-favorites?action=update&typeIds="+i.value;const o=new Headers;o.append("Brightspot-CSRF",c.A.get("bsp.csrf"));try{const e=await fetch(n,{method:"POST",headers:o});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,o.A)("span",{class:"ComboInput-option-favorite-icon","aria-hidden":!0}));a.appendChild(t),a.appendChild((0,o.A)("span",{"aria-live":"polite",class:"screen-reader-only"}))}i.getAttribute("data-source")&&a.setAttribute("data-source",i.getAttribute("data-source")),t?t.appendChild(a):this._list.appendChild(a)}break}}if(this._missing&&!(0,i.A)(this._list,"[data-missing-option=true]")){const e=(0,o.A)("li",{id:`${this._list.id}-o${n++}`,className:"ComboInput-option",role:"option","data-missing-option":!0,"aria-selected":this._missing.checked},(0,o.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,o.A)("li",{id:`${this._list.id}-o${n++}`,className:"ComboInput-option",role:"option","data-select-all":!0,"aria-selected":(0,r.A)(this._list,"[aria-selected=true]").length===this._getOptions().length},(0,o.A)("span",{class:"ComboInput-check","aria-hidden":!0}),this._select.getAttribute("data-select-all-label"));this._list.insertBefore(e,this._list.firstElementChild)}return n}_getOptions(){return(0,r.A)(this._list,".ComboInput-option")}_highlightOption(e,n){if(!e)return;const t=[];for(const e of this._getOptions())e.classList.remove("is-active"),e.hidden||e.parentElement.hidden||t.push(e);const o=t.length;let i;for(let n=0;n<o;++n)if(e===t[n]){i=n;break}for(i=(i+n)%o;i<0;)i+=o;const r=t[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 n=this._getOptions();for(;e<n.length&&n[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,o.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")),n=[];for(const t of e){const e=t.cloneNode(!0),o=this._select.closest(".SearchWidget-filterItem");let r;if(o&&this._select.classList.toggle("is-readOnly",o.parentNode.classList.contains("is-multiple")&&e.getAttribute("data-value")),e.querySelector("[data-id]")?.remove(),e.getAttribute("data-missing-option")){let n=(0,i.A)(this._list,'.ComboInput-option[data-value=""]');n||(n=(0,i.A)(this._list,".ComboInput-placeholder-option")),r=e.textContent+": "+n?.innerHTML}else r=e.innerHTML;r&&!n.some(e=>e===r)&&n.push(r)}let t;const r=n.length;r>0&&(this._select.closest(".CIG-row")?t=n.join(", "):(t=n[0],r>1&&(t+=" +"+(r-1)))),t&&(this._label.appendChild((0,o.A)("div",{className:"ComboInput-selected",innerHTML:t})),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 n=this._select.parentNode.querySelector("input[data-typeids]"),t=this._select.getAttribute("data-typeIds");var e=this._select.options;const o=Array.from(e).map(e=>e.value),i=Array.from(e).some(e=>e.hasAttribute("data-typeids"));let r,a=new FormData;if(n&&i){const e=n.getAttribute("data-typeIds").split(",");r=CONTEXT_PATH+"update-dropdown-favorites?action=getExisting&isFavoritedType=false",e.forEach(e=>{a.append("validTypeIds",e)})}else t||o?(r=CONTEXT_PATH+"update-dropdown-favorites?action=getExisting&isFavoritedType=true",(t?t.split(","):o).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 n=await e.text(),t=(new DOMParser).parseFromString(n,"text/html").body.querySelector("optgroup"),o=this._select.querySelector("optgroup[data-favorites]");if(o){const e=Array.from(this._list.querySelectorAll('li[aria-selected="true"]')),n=new Set(e.map(e=>e.dataset.value));for(const e of this._select.querySelectorAll("option"))n.has(e.value)&&(e.selected=!0);o.remove()}if(t&&t.hasChildNodes()){const e=this._select.querySelector("option[data-all-types]"),n=this._select.querySelector("option[data-mirror]");e?e.after(t):n?n.after(t):this._select.prepend(t)}}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;d&&d.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);d=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})),d=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 n of this._getOptions())"true"!==n.getAttribute("aria-selected")||n.getAttribute("data-select-all")||e.add(n.getAttribute("data-value"));let n=!1;for(const t of(0,r.A)(this._select,"option")){const o=e.has(t.value);t.selected!==o&&(n=!0),t.selected=o}this._reorderSelectOptions(),n&&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,n=this._getOptionsUrl?this._getOptionsUrl(this._filter.value):null;if(!n||this._fetchOnce&&this._optionsLoaded)if(e&&!this._select.getAttribute("data-dynamic-value-generator")){const n=new RegExp(e.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");let t;for(const e of this._getOptions())n.test(e.textContent)?(e.hidden=!1,t||(t=!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,t=this._fetchOnce?this._getOptionsUrl(""):n,o=await fetch(t,{credentials:"include"});if(o.redirected&&o.url.includes(window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.auth.LogInPage"]))throw new Error("ComboInput: Redirected response received for options update.");const i=await o.text();if(this._getOptionsIndex===e){const e=[],n=new Set;!this._select.value&&this._select.firstChild&&(this._select.firstChild.selected=!0);for(const t of(0,r.A)(this._select,"option"))t.selected&&(e.push(t),n.add(t.value));this._select.innerHTML=i;for(const e of(0,r.A)(this._select,"option"))n.has(e.value)&&e.remove();const t=this._select.firstChild;for(const n of e)this._select.insertBefore(n,t);this._fetchOnce&&(this._optionsLoaded=!0)}}catch(e){console.error(e)}e&&0!==e.trim().length||this.populateFavorites()}}updateValue(e,n){const t=(0,i.A)(this._list,"[data-select-all=true]");if(this._select.multiple){if(t&&e===t.getAttribute("data-value"))t.setAttribute("aria-selected","true"!==t.getAttribute("aria-selected")),(0,r.A)(this._list,".ComboInput-option:not([data-select-all])").forEach(e=>{e.setAttribute("aria-selected",t.getAttribute("aria-selected"))});else{const n=CSS.escape(e),o=(0,i.A)(this._list,`.ComboInput-option[data-value="${n}"]`);if(!o)return;if(this._duplicates.has(e)){for(const e of this._duplicates.keys())if(this._duplicates.get(e).text===o.textContent){const n=(0,i.A)(this._list,`.ComboInput-option[data-value="${CSS.escape(e)}"]`);n.setAttribute("aria-selected","true"!==n.getAttribute("aria-selected"))}}else o.setAttribute("aria-selected","true"!==o.getAttribute("aria-selected"));t&&t.setAttribute("aria-selected",(0,r.A)(this._list,"[aria-selected=true]").length===this._getOptions().length);const a=o.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(n){(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 n of this._getOptions())"option"===n.getAttribute("role")&&(e===n.getAttribute("data-value")?n.setAttribute("aria-selected","true"):n.setAttribute("aria-selected","false"));this.hideList(),n?(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=>{d&&!d._container.contains(e.target)&&d.hideList()}))},13473(e,n,t){"use strict";t(49371),t(96648);var o=t(45055),i=t(22777);(0,o.A)(".CommunityWidget",e=>{const n=e.querySelectorAll(".LinkTable td form");n.length&&n.forEach(e=>{const n=e.querySelector(".CommunityWidget-actionsToggle"),t=e.querySelector(".CommunityWidget-actionsList");n.addEventListener("click",o=>{i.A.toggle(n,t,()=>e.classList.toggle("is-actionsMenuOpen"))}),t.querySelectorAll("li button").forEach(e=>{e.addEventListener("click",n=>{n.preventDefault();const t=e.closest("form");t.querySelector('input[name^="community.widget.workflow-transition"').value=e.getAttribute("value"),t.submit()})})})})},97139(e,n,t){"use strict";t(86634),t(57573),t(49371),t(26780),t(96648);var o=t(90127),i=t(92301),r=t.n(i),a=t(18101),s=t(60021),c=t(76394),d=t(39242),l=t(26179),p=t(60363),M=t(45055),u=t(23902),b=t(22777),h=t(39979),z=t(39403),O=t(28211),f=(t(42723),t(56065),t(94286));class m{static gcd(e,n){return n?m.gcd(n,e%n):e}static getObserver(){return this._observer??=new IntersectionObserver(e=>{for(const n of e){const e=n.target.querySelector(".Preview-overlayTooltip");if(n.isIntersecting)e?.setAttribute("position","top");else{if(null===n.rootBounds)return;const t=n.intersectionRect,o=n.boundingClientRect;o.bottom>t.bottom?e?.setAttribute("position","top"):o.top<t.top&&e?.setAttribute("position","bottom")}}},{threshold:1}),this._observer}constructor(){this.getPreviewFrame=e=>{let n;return e?n=document.querySelector(`iframe[data-container-id="${e}"]`):(n=document.querySelector(".ContentEdit-previewDisplay iframe:first-of-type"),n||(n=document.querySelector(".PreviewFrame-typeDisplay iframe:first-of-type"))),n},this.updateOverlays=(0,z.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 n=document.createElement("iframe");n.src="about:blank",n.style="visibility:hidden;",n.setAttribute("onload","this.style.visibility='visible';"),n.scrolling="no",n.classList.add("Preview-overlayFrame"),n.setAttribute("role","none");const t=this.getPreviewFrame(this._previewContainerId);t.parentNode.insertBefore(n,t.nextSibling),n?.contentDocument?.body.classList.add("overlay-hidden"),this._overlayWindow=n.contentWindow,m._previewOverlays.set(this._previewContainerId,this._overlayWindow),this._overlayFrame=n,Object.assign(n.style,{background:"none",backgroundColor:"transparent",transform:t.style.transform,width:t.style.width}),this._viewport=parseInt(t.style.width,10),this._deferred=!1,this._overlayWindow.addEventListener("message",async({data:e})=>{if("object"!=typeof e)return;const n=e.type;if("BSP.ContentEdit.UpdateOverlayBehaviors"===n){const n=this.Overlays.get(e.key);this.update(n,n.element,{behaviors:e.behaviors})}else"BSP.Preview.UpdateOverlays"===n?e.overlays.forEach(e=>{const{id:n,name:t}=e;this.Overlays.get(`${n}/${t}`).hasFormField=!0}):"BSP.Preview.UpdateInitToggle"===n&&(this._deferred=e.deferPreviewInit)}),this._overlayWindow.addEventListener("click",e=>{if(e.target.closest(".Preview-overlay")){const n=e.target.closest(".Preview-overlay"),t=n.dataset.id+"/"+n.getAttribute("data-type"),i=this.Overlays.get(t);i&&(this.update(i,i.element,{isSelected:!0}),this.Overlays.forEach((e,n)=>{e.element&&n!==t&&this.update(e,e.element,{isSelected:!1,isHover:!1})}),o(i))}else this.Overlays?.forEach(e=>{this.update(e,e.element,{isSelected:!1})})});const o=e=>{let n=e.parentKey,t=e,o=[];const{left:i,right:r}=e.element.getBoundingClientRect(),a=this._overlayWindow.innerWidth,s=i-e.depth*m._gapSize>=0&&r+e.depth*m._gapSize<=a;for(;null!==n;){const e=this.Overlays.get(n),i=t.element?.getBoundingClientRect();o.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}),n=e.parentKey,t=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 n=this._overlayWindow.document;if(e.target.closest(".Preview-overlay")){const t=[...n.elementsFromPoint(e.clientX,e.clientY)].find(e=>e.classList.contains("Preview-imageOverlay"));(t&&!t.isSameNode(a)||!t&&a)&&n.querySelectorAll(".Preview-imageOverlay.is-visible").forEach(e=>e.classList.remove("is-visible")),t&&t.classList.add("is-visible"),a=t}else a&&n.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 n=e.target,t=this._overlayWindow.document;this._pauseUpdate=!0;const a=t.querySelector(".Preview-overlay.is-selected");let c;if(a&&(c=a.dataset.id+"/"+a.getAttribute("data-type")),n.closest(".Preview-overlay")){const n=e.target.closest(".Preview-overlay"),t=n.dataset.id+"/"+n.getAttribute("data-type"),a=this.Overlays.get(t);if(a){this.update(a,a.element,{isHover:!0}),this.Overlays.forEach((e,n)=>{e.element&&n!==t&&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===t?(s.has(t)||s.add(t),o(r)):i&&e===a.parentKey&&s.has(t)?o(r):(o(a),r=a,s.clear(),s.add(t)),i=a}}else this.Overlays?.forEach((e,n)=>{e.element&&n!==c&&this.update(e,e.element,{isHover:!1,isVisible:!1,isSelected:e.isSelected})}),i=null,r=null,s.clear()}),n?.addEventListener("mouseleave",()=>{n?.contentDocument?.body.classList.remove("overlay-visible"),n?.contentDocument?.body.classList.add("overlay-hidden"),this._pauseUpdate=!1}),n?.addEventListener("mouseenter",()=>{n?.contentDocument?.body.classList.add("overlay-visible"),n?.contentDocument?.body.classList.remove("overlay-hidden"),this._pauseUpdate=!1}),this._updateInterval=setInterval(()=>{this._pauseUpdate||this.updateOverlays()},500),window.addEventListener("scroll",this.updateOverlays);const d=async()=>{const e=this._overlayWindow.document,n=e.documentElement,t=this.getPreviewFrame(this._previewContainerId),o=parseFloat(t.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,d=e.body;n.setAttribute("dir","ltr"),n.setAttribute("data-preview-overlay",!0),d.style.background="none",d.style.backgroundColor="transparent",d.style.visibility="hidden";const l=e.createElement("link");e.head.appendChild(l),l.setAttribute("href","https://fonts.googleapis.com/css?family=Noto+Sans:400,700");const p=l.relList;p&&p.supports("preload")?(l.setAttribute("as","style"),l.setAttribute("rel","preload"),l.setAttribute("onload",'this.rel="stylesheet"'),l.setAttribute("crossOrigin","anonymous")):l.setAttribute("rel","stylesheet"),n.style.setProperty("--PreviewScale",`${o}`),o<.6&&n.classList.add("should-upscale"),n.setAttribute("dir",r),a&&n.setAttribute("data-theme",a),s&&this._overlayWindow.localStorage.setItem("BSP.Theme",s),n.setAttribute("data-preview-field-placeholder",c);const M=(()=>{const e=window.document.head;let n=[];const t=e.querySelector('link[id="dist-v4-css"]'),o=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=t||o||e.firstChild;const s=r?r.nextSibling:i.nextSibling;for(;a!==s;)"SCRIPT"!==a.tagName&&"LINK"!==a.tagName||n.push({tag:a.tagName,ref:a.getAttribute("href")||a.getAttribute("src"),id:a.dataset.id,text:a.textContent,isv4:a===i||a===t}),a=a.nextSibling;return n})();await(async()=>{await Promise.all(M.map(async n=>{await(async n=>new Promise(t=>{const o=n.tag,i=n.ref,r=n.id;let a=null;"LINK"===o?(a=e.createElement("link"),a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),a.setAttribute("href",i),n.isv4?a.onload=()=>{t()}:t()):"SCRIPT"===o&&(a=e.createElement("script"),a.setAttribute("type","text/javascript"),a.innerText=n.text,i&&a.setAttribute("src",i),n.isv4?a.onload=()=>{t()}:t()),r&&a.setAttribute("id",r),e.head.appendChild(a)}))(n)})),d.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 d():await new Promise(e=>{this._overlayWindow.addEventListener("load",async()=>{await d(),e()})})}static async create(e){const n=new m;return await n.initialize(e),n}static getOverlayWindow(e){return m._previewOverlays.get(e)}reload(e,n,t){this._previewContainerId=n.previewContainerId,this._allOverlays=n.overlays,t&&t!==this._viewport&&(this._viewport=t,this.updateOverlays());const o=[...n.overlays.keys()];(e=new Map([...e.entries()].sort((e,n)=>e[1].parentKey===n[1].parentKey?o.indexOf(e[0])-o.indexOf(n[0]):e[0]===n[1].parentKey?-1:n[0]===e[1].parentKey?1:o.indexOf(e[1].parentRoot)-o.indexOf(n[1].parentRoot)))).forEach((e,n)=>{const t=this._allOverlays.get(n);if(t&&Object.assign(e,t),e.isShared||(e.linked=null),e.linked){const n=this._allOverlays.get(`${e.linked}`);n&&(e.dimensions=n.dimensions[`${e.linkedIdx}`]??e.dimensions)}}),this.Overlays?(e.forEach((e,n)=>{const t=this.Overlays.get(n);t?this.update(t,t.element,e):(this.Overlays.set(n,e),this.renderOverlay(e,n))}),this.Overlays.forEach((e,n)=>{const t=this._allOverlays.get(n);if(t){if(this.update(e,e.element,Object.assign({},t,{isRemoved:!1})),e.parentKey){const n=this.Overlays.get(e.parentKey);n&&this.update(n,n.element,{isRemoved:!1})}}else{if(e.parentKey&&this.Overlays.get(e.parentKey)){const n=this.Overlays.get(e.parentKey);let t=0;this.Overlays.forEach(n=>{n.parentKey&&n.parentKey===e.parentKey&&t++}),t<=1&&this.update(n,n.element,{isRemoved:!0})}this.update(e,e.element,{isRemoved:!0})}})):(this.Overlays=new Map(e),this.Overlays.forEach((e,n)=>{this.renderOverlay(e,n)})),this.ImageTooltips=new Map(n.imageData),this._overlayWindow.document.querySelectorAll(".Preview-imageOverlay").forEach(e=>{e.parentNode.removeChild(e)}),this.ImageTooltips.forEach((e,n)=>{this.renderImageTooltip(e)})}destroy(){clearInterval(this._updateInterval)}updateLabel(e,n){const t=e.querySelector(".Preview-overlayLabel");if(!t)return;t.textContent=n;const o=e.getBoundingClientRect().height,{height:i}=t.getBoundingClientRect();t.style.top=i>=o?`-${t.getBoundingClientRect().height}px`:"0px"}update(e,n,t,o){if(!n)return;let i=Object.assign(e,Object.fromEntries(Object.entries(t).filter(([e,n])=>null!=n)));if(i.isShared?(n.classList.add("is-shared"),n.dataset.editAction=i.isShared):(n.classList.remove("is-shared"),delete n.dataset.editAction),!0===i.isLocked?n.classList.add("is-locked"):!1===i.isLocked&&n.classList.remove("is-locked"),!0===i.isRoot)e.depth=1,n.classList.add("is-root");else if(!1===i.isRoot){const t=this.Overlays.get(e.parentKey);e.depth=t?.depth+1,e.parentRoot=t?.parentRoot,t?.isSelected&&(n.classList.add("is-visible"),e.isVisible=!0)}!0===i.isVisible?n.classList.add("is-visible"):!1===i.isVisible&&n.classList.remove("is-visible"),!0===i.isSelected?n.classList.add("is-selected"):!1===i.isSelected&&n.classList.remove("is-selected"),!0===i.isHover?n.classList.add("is-hover"):!1===i.isHover&&n.classList.remove("is-hover"),!0===i.isEmpty?n.classList.add("is-empty"):!1===i.isEmpty&&(this.updateLabel(n,e.label||e.name),n.classList.remove("is-empty")),!0===i.isRemoved?n.classList.add("is-removed"):n.classList.remove("is-removed"),this.setDimensions(e,o)}renderImageTooltip(e){const n=this._overlayWindow.document.body,t=document.createElement("div");t.classList.add("Preview-imageOverlay");const o=document.createElement("div");if(o.className="Preview-overlayTooltip",o.innerHTML="<b>Image</b>",e){const n=+e.width,t=+e.height;let i=null;if(o.classList.add("is-grid"),o.append((0,a.A)("span",(n>0?n:"auto")+" x "+(t>0?t:"auto"))),n>0&&t>0){const e=m.gcd(n,t);e>0&&(i=`${n/e}:${t/e}`)}o.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):"")}t.append(o),n.prepend(t),window.requestAnimationFrame(()=>{const{x:n,y:o,width:i,height:r}=e.rect,a=n+window.scrollX;Object.assign(t.style,{height:r,left:a,position:"absolute",top:o+window.scrollY,width:i})}),this.constructor.getObserver().observe(t)}renderOverlay(e){const n=this._overlayWindow.document,t=n.body,o=!!e.isEmpty,{id:i,name:r,type:s}=e;if(!i||!r)return;if("bspField"===s&&!e.dimensions&&!o)return;const c=n.createElement("div");c.classList.add("Preview-overlay"),c.dataset.id=i,c.dataset.type=r;const d=window.parent.parent;c.onclick=n=>{if(d){const n=c.dataset.type;let t=new Map;this.Overlays?.forEach((e,n)=>{if(e.isRoot){const e=this._allOverlays.get(n);e&&(e.isRoot=!0,t.set(n,e))}});let o=e.hasFormField,i=e.parentKey,r=[];for(;!o&&i;){const e=this.Overlays.get(i);r.push({id:e.id,name:e.name,type:e.type,isShared:e.isShared,parentKey:e.parentKey}),o=e.hasFormField,i=e.parentKey}d.postMessage({type:"BSP.Preview.OverlayClick",id:c.dataset.id,label:c.label,name:n.split("/")[0],behavior:c.dataset.editAction,overlayType:e.type,previewContainerId:this._previewContainerId,overlays:this._allOverlays,parentFields:r.reverse(),rootOverlays:t,isEnhancement:e.isEnhancement,hasFormField:e.hasFormField},"*")}},c.querySelector(".Preview-overlayLabel")?.remove();const l=(0,a.A)("div",{className:"Preview-overlayLabel"},e.label||e.name);c.appendChild(l);let p=null;"bspModule"!==e.type||e.isShared||(p=t.querySelector(`.Preview-overlay[data-id="${e.id}"]`)),p?t.insertBefore(c,p):(p=!e.isShared&&t.querySelector(".Preview-overlay.is-shared"),p?t.insertBefore(c,p):t.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,n){const t=e.dimensions,o=e.element;if(!o)return;const i=n=>{const{x:t,y:i,width:r,height:a}=n,s=t+window.scrollX,c=s+r;Object.assign(o.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(t&&"bspField"===e.type&&(!e.children&&!e.fieldValue||e.isShared))i(t);else{const n=[...this.Overlays.values()].filter(n=>n.parentKey===e.id+"/"+e.name&&n.dimensions&&!Array.isArray(n.dimensions));if("bspModule"===e.type&&e.dimensions?.length)e.dimensions.forEach(e=>{i(e)});else if(n.length){let e=null,t=null,i=null,r=null;n.forEach(n=>{const o=n.dimensions;o&&(e=null!==e?Math.min(e,o.top):o.top,t=null!==t?Math.min(t,o.left):o.left,i=null!==i?Math.max(i,o.bottom):o.bottom,r=null!==r?Math.max(r,o.right):o.right)}),Object.assign(o.style,{width:r-t,left:t,position:"absolute",top:e,height:i-e})}else t&&i(t)}if(n){const{updateWidth:e,maxWidth:t}=n,{top:i,bottom:r,left:a,right:s}=o.getBoundingClientRect();let c=i,d=r,l=a,p=s;i>=n.top&&(c=n.top-m._gapSize),r<=n.bottom&&(d=n.bottom+m._gapSize),o.style.top=c,o.style.height=d-c,e&&(a>=n.left&&(l=n.left-m._gapSize),s<=n.right&&(p=n.right+m._gapSize),l>=0&&p<=t&&(o.style.left=l,o.style.width=p-l))}}}m._previewOverlays=new Map,m._gapSize=15;var g=t(79365);function A(e,n){if(!n.once||!n.hasExecuted)try{n.callback(e),n.hasExecuted=!0,n.once&&n.subscription&&(n.subscription.remove(),n.subscription=null)}catch(e){console.error("onRTEReady callback failed",e)}}const w=window.BRIGHTSPOT?.ui.tooltips;function v(e,n){const t=e.querySelector(n)?.htmlFor;t&&document.getElementById(t)?.focus()}const q=new Map;let k=0;function _(e,n,t){if(n){for(const o of(0,c.A)(n,t))e.appendChild("li"===t?o:(0,a.A)("li",{},o));n.remove()}}(0,M.A)([".ContentEdit.is-new",".StandardForm.is-new"],e=>{if(document.querySelector(".Admin-nav"))return;const n=e.querySelector(".CIG:not(:empty)");if(!n)return;let t;for(const e of n.querySelectorAll(":scope > [data-tab]")){const o=e.dataset.tab;if(t){if(t!==o)return void(0,M.A)(n,":scope > .TabBar",e=>{v(n,`: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 t=o}v(n,":scope > .CIG-row:not(.inputContainer-readOnly) > .CIG-label > label")}),(0,M.A)('.Popup[data-popup-source-class*="ContentSelector-edit"] button.Popup-heading',e=>{e.focus()}),(0,M.A)(".ContentEdit-top .Message",e=>{const n=e.closest(".ContentEdit").querySelector(".ContentEdit-main > .ContentEdit-title");n.parentNode.insertBefore(e,n.nextSibling)}),(0,M.A)(".ContentEdit",e=>{const n=e.closest(".Popup-content");n?n.classList.add("is-editing"):document.body.classList.add("is-editing");const t=(0,s.A)(e,".widget-publishing");if(!t)return;const o=(0,a.A)("ul",{className:"ContentEdit-controlsList",role:"menu","aria-label":w.actions?.contentEdit}),i=new MutationObserver(e=>{e.forEach(e=>{const n=e.target,t=n.classList.contains("is-locked");n.querySelectorAll("[accesskey]").forEach(e=>{t?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"),d=(0,s.A)(c,['[name="action-draft"]','[name="action-newDraft"]']),l=(0,s.A)(r,".ContentEdit-workflow")||(0,s.A)(r,".ContentEdit-publish");if(null!==d){const n=d.cloneNode(!0);"action-draft"===n.name&&n.addEventListener("click",()=>{const n=e.querySelector('input[name="publishDate"]');n&&(n.value="")}),l?r.insertBefore(n,l):r.appendChild(n),d.closest(".ContentEdit").classList.contains("is-new")||"action-draft"===d.getAttribute("name")?d.parentNode.remove():n.style.display="none"}_(o,(0,s.A)(e,".widget-contentCreate"),"li"),_(o,c,"li"),_(o,(0,s.A)(e,".widgetControls"),"a"),_(o,(0,s.A)(e,".widget-publishingExtra-right"),"li"),_(o,(0,s.A)(e,".widget-publishing > .widget-controls"),"a");const p=(0,s.A)(o,".widgetControlsEditInFull");p&&!e.closest(".Popup")&&p.closest("li").remove();const M=(0,a.A)("div",{className:"ContentEdit-controls"}),u=(0,a.A)("button",{className:"ContentEdit-controlsToggle",type:"button",title:w.actions?.actions,"aria-haspopup":"menu","aria-expanded":"false","aria-label":w.actions?.contentEdit,onclick:()=>{(0,g.AM)(o,u,M)}});(0,g.D1)(o,u),M.appendChild(u),M.appendChild(o),M.setAttribute("data-tether-anchor",""),t.appendChild(M)}),(0,M.A)(".ContentEdit-controlsList .DraftAndReturnAction",e=>e.setAttribute("aria-hidden","true")),(0,M.A)(".ContentEdit-controlsList .NewDraftAndReturnAction",e=>e.setAttribute("aria-hidden","true")),(0,M.A)(".ContentEdit-restore",e=>{const n=e.closest(".ContentEdit-controls");n.parentNode.insertBefore(e,n);const t=(0,a.A)("div",{className:"ContentEdit-restoreToggle",onclick:()=>{b.A.toggle(t,e,()=>e.classList.toggle("is-open",t.classList.toggle("is-open")))}},e.getAttribute("data-restore-label")||"restore");e.parentNode.insertBefore(t,e)}),(0,M.A)(".ContentEdit-workflow",e=>{const n=e.closest("btu-dialog");e.setAttribute("hidden","");const t=e=>{"Escape"===e.key?(n?.close(e),l.click(),l.focus()):"Tab"!==e.key||document.activeElement.closest(".ContentEdit-workflow.is-open")||document.activeElement.closest(".Popup.is-calendar")||document.activeElement.matches(".Page")||document.activeElement===l||l.click()},o=e=>{if(window.BRIGHTSPOT?.ui.cms.enableV5UI)return;const n=e.target.closest(".Popup"),t=(0,s.A)(document,".ProseMirror-fullscreen-container:not(.hide)");(n&&!e.target.matches(".Popup-close")||t&&e.target.closest(".ProseMirrorToolbar-action")||e.target.closest(".ProseMirror-fullscreen-container")||e.target.matches(".rte2-toolbar-fullscreen"))&&l.click()},i=(0,s.A)(e,".ContentEdit-workflowWrapper > .ContentEdit-workflowBody");let r=0;const d=(0,s.A)(e.parentNode,".ContentEdit-publish"),l=(0,a.A)("button",{"aria-expanded":!1,"aria-haspopup":!0,className:"ContentEdit-workflowToggle",onclick:()=>{if(b.A.toggle(l,e,()=>{const n=l.classList.toggle("is-open"),i=(0,s.A)(document,".Popup"),r=(0,s.A)(document,".ProseMirror-fullscreen-container:not(.hide)");return n?(e.removeAttribute("hidden"),window.addEventListener("keyup",t),window.addEventListener("click",o)):(window.removeEventListener("keyup",t),i||r||window.removeEventListener("click",o)),l.setAttribute("aria-expanded",n?"true":"false"),e.classList.toggle("is-open",n)}),d)for(const n of(0,c.A)(e,".ContentEdit-workflowWrapper"))n.classList.toggle("is-active","workflow"===n.getAttribute("data-name"))},type:"button"},e.getAttribute("data-workflow-label")||"Workflow");e.parentNode.insertBefore(l,e),e.closest(".ContentEdit").classList.add("is-workflow");const p=e.querySelectorAll('.ContentEdit-workflowActions button[name="action-workflow"]');if(e.querySelector(".ContentEdit-workflowActions button[data-workflow-comment-required]")&&(0,M.A)('.CIG-row[data-field-name="comment"] > .AutoExpand > textarea',e=>{e.addEventListener("input",()=>{p.forEach(n=>{n.disabled?""!==e.value.trim()?n.removeAttribute("disabled"):n.setAttribute("disabled","true"):""===e.value.trim()&&n.setAttribute("disabled","true")})})}),d){(0,s.A)(e,'.ContentEdit-workflowWrapper[data-name="publishOverride"] > .ContentEdit-workflowBody').appendChild(d),e.classList.add("is-publishOverride");for(const n of(0,c.A)(e,".ContentEdit-workflowWrapper > .ContentEdit-workflowLink"))n.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),"workflow"===n.parentNode.getAttribute("data-name")&&(r=i.offsetHeight+"%");for(const t of(0,c.A)(e,".ContentEdit-workflowWrapper"))t.classList.toggle("is-active",t.getAttribute("data-name")===n.getAttribute("data-action")),t.classList.contains("is-active")&&t.querySelector(".DateTimeInput, .AutoExpand textarea")?.focus();(0,s.A)(e,'.ContentEdit-workflowWrapper:not([data-name="workflow"]) > .ContentEdit-workflowBody').style.height=r})}}),(0,M.A)(".ContentEdit-publish .ContentEdit-publishButton",e=>{const n=e.closest(".ContentEdit-publish"),t=n.querySelector('input[name="publishDate.date"]'),o=n.querySelector('input[name="publishDate.time"]');if(!t||!o)return;const i=n.querySelector(".DateTimeInput"),r=(0,s.A)(e.parentNode.parentNode,".ContentEdit-overrideMessage"),a=e.textContent;function c(){t.value&&o.value?(n.classList.add("is-scheduling"),e.innerText=e.getAttribute("data-schedule-label"),i.classList.remove("is-empty")):(n.classList.remove("is-scheduling"),e.innerText=a,i.classList.add("is-empty")),r&&(r.innerHTML=n.classList.contains("is-scheduling")?r.getAttribute("data-schedule-message"):r.getAttribute("data-publish-message"))}c(),t.addEventListener("change",c),o.addEventListener("change",c);const d=n.querySelector('select[name="newSchedule"]');d&&d.addEventListener("change",c)}),(0,M.A)(".ContentEdit-workflowActions .ContentEdit-publishButton",e=>{const n=e.closest(".ContentEdit-workflowActions"),t=n.querySelector("input.ContentEdit-workflowScheduleDate"),o=n.querySelector("input.ContentEdit-workflowScheduleTime");if(!t||!o)return;const i=n.querySelector(".ContentEdit-workflowScheduleLink"),r=e.textContent;function a(){t.value&&o.value?(n.classList.add("is-scheduling"),e.innerText=e.getAttribute("data-schedule-label"),i&&i.classList.remove("is-empty")):(n.classList.remove("is-scheduling"),e.innerText=r,i&&i.classList.add("is-empty"))}a(),t.addEventListener("change",a),o.addEventListener("change",a)});const y=window.localStorage;let W=0;(0,M.A)(".ContentEdit",e=>{if(!e.querySelector(".ContentEdit-top"))return;const n=e.getAttribute("data-object-id"),t=e.closest(".Page-content, .Popup");if(!t)return;const i=t.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(()=>{x(n)?.contentWindow?.postMessage({type:"BSP.ContentEdit.ViewportDeviceChanged"},"*")})}),e.closest(".Page.is-previewToEdit")&&t.setAttribute("data-preview-menu",!1);const s=(0,z.A)(()=>{const e=a.querySelector(".PreviewFrame-typeDisplay");if(e){const n=e.querySelectorAll("iframe");if(n.length<1)return;const o=n[0],i=r.querySelector(".deviceWidthSelect");let s=o.getBoundingClientRect().width;if(o.style.transform="",o.style.width="",i){if(t){t.style.removeProperty("--ContentEdit-previewWidth");const e=i.options[i.selectedIndex];e&&(s=parseInt(e.getAttribute("data-device-width"),10),o.style.width=`${s}px`,s<r.getBoundingClientRect().width&&t.style.setProperty("--ContentEdit-previewWidth",`${s}px`))}}else t&&(t.style.removeProperty("--ContentEdit-previewWidth"),o.style.width="",s=1920);k=s;const c=e.clientWidth/s;o.style.transform=`scale(${c})`,o.setAttribute("previewScale",c),o.style.setProperty("--PreviewFrame-scale",c),m.getOverlayWindow(a.querySelector(":scope iframe:first-of-type").getAttribute("data-container-id"))?.dispatchEvent(new Event("resize"))}});let c=new O.A(r,s);const d=function(){window.addEventListener("resize",s),e.addEventListener("brightspot-content-state-change",()=>c.updatePreview())};window.ContentEditFields=new Map;const l=t.querySelector(".content-edit > .ContentEdit .ContentEdit-left");l&&(0,M.A)(l,'.inputContainer[data-tab="Main"]:not([type="hidden"])',e=>{const n=e.dataset.name;e.closest(".TC-unselected")&&window.ContentEditFields.has(n)?window.ContentEditFields.delete(n):window.ContentEditFields.set(n,e)}),(0,M.A)(e,":scope .ContentEdit-previewButton",n=>{n.type="button",n.ariaLabel=t.classList.contains("is-previewing")?w.preview.close:w.preview.open,n.title=n.ariaLabel;const r=n.closest(".ContentEdit-toolbar");n.onclick=function(){if(t.classList.toggle("is-previewing")){t.classList.contains("Popup")&&t.querySelector(":scope > .Popup-content")?.classList.add("is-previewing"),c.isVisible=!0,i.removeAttribute("inert"),n.title=w.preview.close,n.ariaLabel=w.preview.close,(0,o.iP)(w.preview.opened),y.removeItem("BSP.ContentEdit.previewClosed"),c.reloadPreview(),d();const a=r.querySelector("button.is-active[data-right-tab]");if((!window.BRIGHTSPOT?.ui?.cms?.enableV5UI||t.offsetWidth<900)&&a){const n=e.querySelector(`.ContentEdit-right[data-right-tab="${a.dataset.iconButtonName}"]`);T(a,n,{container:t,updateStorage:!0})}}else t.classList.contains("Popup")&&t.querySelector(":scope > .Popup-content")?.classList.remove("is-previewing"),c.isVisible=!1,i.setAttribute("inert",""),n.title=w.preview.open,n.ariaLabel=w.preview.open,(0,o.iP)(w.preview.closed),y.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")&&!y.getItem("BSP.ContentEdit.previewClosed")&&!t.classList.contains("is-previewing")?(n.title=w.preview.close,n.onclick()):t.classList.contains("is-previewing")&&(c.isVisible||(c.isVisible=!0),c.updatePreview(),d(),i.removeAttribute("inert"))})}),(0,M.A)(".ContentEdit",e=>{const n=e.querySelector(".ContentEdit-top");if(!n)return;const t=e.closest(".Page-content, .Popup");if(!t)return;const o=t.querySelector(".ContentEdit-preview");if(!o)return;let i=o.querySelector(".ContentEdit-previewControls");if(!i)return;let r=i.querySelector("form[id]");if(!r)return;let s=r.querySelector('input[name="_previewObject"]');const d=o.querySelector(".ContentEdit-previewDisplay");if(!d)return;const l=o.querySelector(".ContentEdit-previewTypes");let p=!0;const b=e.getAttribute("data-object-id");e.closest(".Page.is-previewToEdit")&&t.setAttribute("data-preview-menu",!1),(0,M.A)(".ContentEdit-preview",e=>{(0,M.A)(e,[".widget-preview > .ContentEdit-previewControls",'.frame.loaded[name^="previewControls"] .ContentEdit-previewControls'],e=>{const n=e.querySelector("form:last-of-type");if(n){const e=(0,a.A)("div",{class:"ContentEdit-secondaryPreviewControls"});(0,M.A)(n,":scope select:not(.deviceWidthSelect) + .ComboInput",n=>{e.appendChild(n)}),n.appendChild(e)}})}),e.addEventListener("brightspot-content-state-change",e=>{for(const n of(0,c.A)(i,'input[name="_previewObject"]'))n.value=e.detail});const O=document.createElement("A");O.className="ContentEdit-previewButton",O.href="#";const f=(0,a.A)("div",{className:"ContentEdit-previewButtonWrapper"},[(0,a.A)("div",{className:"ContentEdit-previewButtonCircle"}),O]),m=(0,z.A)(()=>{const e=d.querySelectorAll("iframe");if(e.length<1)return;const n=e[0],i=document.querySelector(".deviceWidthSelect");let r=n.getBoundingClientRect().width;if(n.style.transform="",n.style.width="",t.style.removeProperty("--ContentEdit-previewWidth"),i){const e=i.options[i.selectedIndex];e&&(r=parseInt(e.getAttribute("data-device-width"),10),n.style.width=`${r}px`,r<o.getBoundingClientRect().width&&t.style.setProperty("--ContentEdit-previewWidth",`${r}px`))}k=r,n.style.transform=`scale(${d.clientWidth/r})`});window.ContentEditFields=new Map;const g=t.querySelector(".content-edit > .ContentEdit .ContentEdit-left");g&&(0,M.A)(g,'.inputContainer[data-tab="Main"]:not([type="hidden"])',e=>{const n=e.dataset.name;e.closest(".TC-unselected")&&window.ContentEditFields.has(n)?window.ContentEditFields.delete(n):window.ContentEditFields.set(n,e)});const A=(0,h.A)(1e3,()=>{if(s&&""===s.value)return;const e=document.createElement("IFRAME");e.name="ContentEdit-previewFrame"+W++,d.insertBefore(e,d.firstChild),e.setAttribute("data-container-id",b);const n=e.closest(".Popup"),t=(e=null)=>{const t=n??document;t.querySelector(".ContentEdit-previewButtonWrapper")?.classList.toggle("is-animating",e)};t(!0),m(),e.onload=function(){const n=[];for(let t=e;t=t.nextElementSibling;)"IFRAME"!==t.tagName||t.classList.contains("Preview-overlayFrame")||n.push(t);const o=e.parentNode;n.forEach(e=>o.removeChild(e)),t(!1)},(0,u.A)(e,()=>t(!1)),r.target=e.name,r.submit()}),w=function(){window.addEventListener("resize",m),e.addEventListener("brightspot-content-state-change",A)},v=function(){window.removeEventListener("resize",m),e.removeEventListener("brightspot-content-state-change",A)};l&&(0,M.A)(".ContentEdit-previewTypesForm",e=>{const n=e.querySelector('select[name="previewType"]');p="true"===n.selectedOptions[0].getAttribute("data-refresh"),n.onchange=function(){d.innerHTML="",p="true"===n.selectedOptions[0].getAttribute("data-refresh"),A()};const o=l.querySelector('div[name^="previewControls"]');o.onload=function(){const e=s?.value;i=o.querySelector(".ContentEdit-previewControls"),r=i.querySelector("form[id]"),s=r.querySelector('input[name="_previewObject"]'),s&&""===s.value&&(s.value=e),t.classList.contains("is-previewing")&&(p||"true"===n.options[n.selectedIndex].getAttribute("data-refresh"))?(A(),w()):v()}}),O.onclick=function(){return t.classList.toggle("is-previewing")?(y.removeItem("BSP.ContentEdit.previewClosed"),y.removeItem("BSP.ContentEdit.rightPanel"),window.BRIGHTSPOT?.ui?.cms?.enableV5UI||t.style.setProperty("--ContentEdit-rightWidth","0px"),o.removeAttribute("inert"),p&&(A(),w())):(y.setItem("BSP.ContentEdit.previewClosed",1),o.setAttribute("inert",""),p&&(v(),setTimeout(function(){d.querySelectorAll(":scope > iframe").forEach(e=>e.remove())},500))),!1},n.insertBefore(f,n.firstChild),window.innerWidth>=768&&!o.classList.contains("is-previewClosedByDefault")&&!y.getItem("BSP.ContentEdit.previewClosed")&&O.onclick()}),(0,M.A)(".ContentEdit-title",e=>{const n=e.closest("form");if(!n)return;n.insertAdjacentElement("afterbegin",e);const t=(0,s.A)(e.closest(".content-edit"),".ContentEdit-overlayList");if(!t)return;e.insertBefore((0,a.A)("button",{className:"ContentEdit-overlay",type:"button","aria-haspopup":"true","aria-expanded":"false","aria-label":(0,s.A)(t,"li.selected").textContent,onclick:e=>{(0,g.AM)(t,e.target)}},(0,s.A)(t,"li.selected").textContent),e.firstChild);const o=e.querySelector(".ContentEdit-overlay");(0,g.D1)(t,o)});const x=e=>{let n;return e?n=document.querySelector(`iframe[data-container-id="${e}"]`):(n=document.querySelector(".ContentEdit-previewDisplay iframe:first-of-type"),n||(n=document.querySelector(".PreviewFrame-typeDisplay iframe:first-of-type"))),n};(0,M.A)(".CIG > .TabBar",e=>{const n=e.closest(".CIG");(0,M.A)(n,".CIG-row.is-overlaid",t=>{const o=t.dataset.tab,i=(0,s.A)(e,`:scope > .TabBar-item[data-tab="${o}"]`);if(!i)return;let r=0;for(const e of(0,c.A)(n,`:scope > [data-tab="${o}"]`))r+=e.classList.contains("is-overlaid")?1:(0,c.A)(e,".is-overlaid").length;const d=(0,s.A)(i,":scope > .Badge");r>0?d?d.textContent=r:(0,p.A)((0,a.A)("div",{className:"Badge"},r),i):d.remove()})}),(0,M.A)([".Page-content .publishing-workflow",".Popup .publishing-workflow"],e=>{const n=(0,s.A)(e,":scope > .progress"),t=(0,s.A)(e,":scope > ul"),o=(0,s.A)(t,".icon-step-forward"),i=(0,s.A)(t,".icon-stop");e.closest(".Page-content, .Popup").classList.add("is-workstream"),e.classList.add("ContentEdit-workstreamMessage"),e.removeAttribute("style"),n.classList.add("ContentEdit-workstreamProgressText"),n.removeAttribute("style"),t.classList.add("ContentEdit-workstreamActions"),o.classList.add("ContentEdit-workstreamSkip"),i.classList.add("ContentEdit-workstreamStop"),(0,l.A)(e,(0,d.A)((0,a.A)("div",{className:"ContentEdit-workstream"},(0,a.A)("div",{className:"ContentEdit-workstreamProgress"},(0,s.A)(n,":scope > .progressBar"),n),t),e))});const L=(e,n)=>{const t=(0,s.A)(document,`.CIG-row[data-name='${e}/${n}']`),o=(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(t){const o=t.querySelector(`:scope .RCS ol[data-sortable-input-name='${e}/${n}']`);return o?{type:"RCS",element:o}:{type:"CIG",element:t}}return i?{type:"OPTION",element:i}:r?{type:"ENHANCEMENT",element:r}:o?{type:"EIG",element:o}:a?{type:"RCIG",element:a}:(console.debug("Form element does not exist for the preview overlay"),null)},C=(e,n,t,o)=>{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=()=>{n.classList.remove("is-visible"),r.removeChild(p),M&&r.removeChild(M);const t=e.classList.contains("RCS-item")&&e.querySelector(":scope > .ContentSelector-clear");t&&t.classList.remove("is-visible"),i.insertBefore(e,s),r.remove()},d=(0,a.A)("div",{className:"Preview-popupCancel",onclick:e=>{c()}}),l=document.createElement("button");l.classList.add("is-save"),l.classList.add("is-dominant"),l.textContent="Save & Close";const p=(0,a.A)("div",{className:"ActionBar"});let M;p.appendChild(l),o&&(M=(0,a.A)("div",{className:"Preview-popupHeading"},o)),r=(0,a.A)("div",{className:"Preview-popup is-previewEditing"},M,e,d,p),t.appendChild(r),l.addEventListener("click",e=>{c()}),n.classList.add("is-visible")};window.addEventListener("message",async({data:e})=>{if("object"!=typeof e)return;const n=e.id,t=e.type,o=e.name;if("BSP.Preview.onChangedHeight"===t){const n=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(n){const t=n.closest(".Page-content, .Popup"),o=t?.querySelector(".ContentEdit-preview");o?.style.setProperty("--PreviewFrame-height",`${e.height}px`)}}else if("BSP.Preview.OverlayClick"===t){const t=e.parentFields,i=e.hasFormField,a=()=>{const a=L(n,o);if(!a)return;(0,c.A)(document.body,".RCIG-item").forEach(e=>{const n=(0,s.A)(e,":scope > .RCIG-title");n&&(e.contains(a.element)||e.isEqualNode(a.element)?e.classList.contains("is-collapsed")&&n.click():e.classList.contains("is-collapsed")||n.click())});const d=a.element.closest(".CIG-row");if(d&&d.classList.contains("is-inHiddenCluster"))for(let e=d;e=e.previousElementSibling;)if(e.classList.contains("CIG-title")){e.click();break}(e=>{if(!e)return;let n=e,t=null,o=[];const i=function(e){return e?e.closest("[data-tab]"):null};for(;t=i(n),t;){const e=t.getAttribute("data-tab"),i=t.parentNode.querySelector(":scope > .TabBar");i&&o.push(i.querySelector(`[data-tab="${e}"]`)),n=t.parentNode}return o})(a.element).forEach(e=>{e&&!e.classList.contains("is-selected")&&e.click()});const l=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,M.A)(e,[":scope > btu-input input",":scope > textarea",":scope > btu-textarea-input > textarea",":scope > .ComboInput",":scope > input"],n=>{const t=e.querySelector(".ProseMirrorContainer > .ProseMirror");t?t.focus():n.focus()})}else if("RCS"===a.type){const e=a.element.closest(".CIG-small");if(e.classList.contains("RCS")){let n=a.element.closest(".RCS-item")??e;r()(n,{align:{top:0,topOffset:10}}),n.dispatchEvent(l)}else e&&(0,M.A)(e,":scope > .ComboInput",e=>{e.focus()}),r()(a.element.closest(".CIG-row"),{align:{top:0,topOffset:10}});a.element.dispatchEvent(l)}else if("OPTION"===a.type){const e=a.element.closest(".CIG-small");if(e.classList.contains("RCS")){let n=a.element.closest(".RCS-item")??e;r()(n,{align:{top:0,topOffset:0}}),n.dispatchEvent(l)}else e&&(0,M.A)(e,":scope > .ComboInput",e=>{e.focus()}),r()(a.element.closest(".CIG-row"),{align:{top:0,topOffset:10}});a.element.dispatchEvent(l)}else if("RCIG"===a.type)r()(a.element,{align:{top:0,topOffset:10}});else if("ENHANCEMENT"===a.type){let e,n=0;const t=a.element.closest(".ProseMirrorContainer");t&&(n=t.querySelector(".ProseMirrorToolbar")?.offsetHeight);let o=parseInt(window.getComputedStyle(a.element).marginTop);isNaN(o)||(e=Math.abs(n-o)),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 n=e.querySelector(".ContentSelector-edit");n?.click()}i||(t.push({id:e.id,name:e.name}),m.getOverlayWindow(e.previewContainerId).postMessage({type:"BSP.Preview.UpdateOverlays",overlays:t},"*"))},d=n=>{const t=n.key,{id:o,name:i,overlayType:r,isEnhancement:s}=e;let c;s?c=`.CIG-row[data-name='${t}'] .ProseMirrorContainer`:"bspField"===r?c=`.CIG-row[data-name='${o}/${i}']`:"bspModule"===r&&(c="RCS"===n.ui.type?`input.objectId[value="${o}"]`:`.repeatableLabel[data-object-id="${o}"]`),(0,M.A)(c,()=>{a()})};if(i)a();else{let n=[];t.forEach((t,o)=>{const{id:i,name:a,type:s}=t;let c="";"bspField"===s?c=`.CIG-row[data-name='${i}/${a}']`:"bspModule"===s&&(c=`.repeatableLabel[data-object-id="${i}"]`);const d=(n,t)=>{(0,M.A)(c,()=>{let o=L(i,a);if(!o)return void t("Could not load edit ui: fields for one or more parent overlay(s) are missing in the form");const s=o.element;r()(s,{align:{top:0,topOffset:10}}),e.isEnhancement&&function(n,t){const{once:o=!0}={},i="string"==typeof t?document.querySelector(t):t;if(!(i instanceof HTMLTextAreaElement))return()=>{};const a={callback:n=>{const t=n.view.dom.querySelector(`[data-state*='_id":"${e.id}']`);t&&(r()(t),t.click())},once:o,hasExecuted:!1,subscription:null};return null!==(s=i)&&"rte"in s&&"object"==typeof s.rte&&i.rte.loaded&&(A(i.rte,a),o)?()=>{}:(a.subscription=window.PubSub.subscribe("rteLoaded",e=>{e.ctx===i&&A(e,a)}),()=>a.subscription?.remove());var s}(0,s.querySelector("textarea.richtext")),"RCIG"===o.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}n&&n({ui:o,key:i+"/"+a})})};n.push(new Promise((e,n)=>{d(e,n)}))}),Promise.all(n).then(e=>{const n=e[e.length-1];d(n)}).catch(e=>{console.debug(e)})}}else if("BSP.Preview.ContentLoad"===t){const n=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`),t=n?.closest(".Page-content.is-previewing")||n?.closest(".Popup.is-previewing"),o=document.activeElement;let i=o.closest(".Preview-overlayFrame")||o.closest(`iframe[data-container-id="${e.previewContainerId}"]`),r=!t||!i;const a=x(e.previewContainerId);a?.contentWindow.postMessage({type:"BSP.Preview.UpdateInitToggle",deferPreviewInit:r},"*");let s=m.getOverlayWindow(e.previewContainerId);s?.postMessage({type:"BSP.Preview.UpdateInitToggle",deferPreviewInit:r},"*")}else if("BSP.Preview.DOMParsed"===t){const n=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(!n?.closest(".Page-content.is-previewing")&&!n?.closest(".Popup.is-previewing"))return;let t=new Map;const o=(e,n,o)=>{t.set(e,n),o&&("bspModule"!==o.type||o.dimensions||(o.childKeys?o.childKeys.push(e):o.childKeys=[e]))},i=(n,r,a,s,c)=>{const d=n===e.previewContainerId,l=t.get(c),p=r.querySelector(`.RCIG-title[data-object-id="${n}"]`),M=r.querySelector(`.EIG-title[data-object-id="${n}"]`);let u,b;const h=r.querySelector(`.objectInputs[data-object-id="${n}"]`);if(!p&&!M||h){let t=a,l=s;if(b=h||r,u=[...b.querySelectorAll(`div.inputContainer[data-name^="${n}"]:not([hidden])`)].filter(e=>!e.closest(".TC-unselected")),p||M){const n=e.overlays.get(c);l=c;let i={id:c.split("/")[0],hasFormField:!0,parentKey:s,parentRoot:a.parentRoot,depth:a.depth+1,type:"bspModule",name:c.split("/")[1]};n&&(i=Object.assign(i,n)),o(c,i,t),t=i}u.forEach(n=>{const a=n.dataset.name;let s;const c=e.overlays.get(a);let p,M;if(!c||c.isEmpty)return;if("bspField"===c.type){p=!d&&n.querySelector(`select[name="${a}.id"]`),M=n.querySelector(`select[name="${a}.id"]`);const e=R(a,n,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:N(n),isInitialized:!0,depth:d?1:t.depth+1,parentRoot:d?a:t.parentRoot,parentKey:d?null:l,hasFormField:!0,isDropdown:M},c),p||o(a,s,t)}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:d?1:t.depth+1,parentRoot:t.parentRoot,parentKey:l,hasFormField:!0},c),o(a,s,t))});let u=[];s.children?u=[...s.children]:!s.isShared&&s.fieldValue&&u.push(s.fieldValue);const b=n.querySelector(`.RCS ol[data-sortable-input-name='${a}']`);if("text"===s.internalType){const t=function(n){(new DOMParser).parseFromString(n,"text/html").querySelectorAll("[data-state]").forEach(n=>{const t=n.getAttribute("data-state"),i=JSON.parse(t);i&&Object.keys(i).forEach(n=>{if(!/^_|^theme./.test(n)){const t=i._id+"/"+n,r=e.overlays.get(t);r&&!r.isInitialized&&o(t,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=n.querySelector('[data-rte-container="true"]'),r=n.querySelector("textarea");i&&r&&(i.dataset.value?t(i.dataset.value):r.value&&t(r.value))}const h=b?.querySelectorAll(`input[name="${a}"]`);u?.forEach((r,c)=>{const d=e.overlays.get(r);let M,u,z=r.split("/")[0],O=`${a}_${z}_acEdit`;b&&(M=[...h].find(e=>e.value===z),u=R(z,M,void 0,a),u&&(u.dataset.previewAction=O));const f={id:z,isInitialized:!0,parentKey:a,parentRoot:s.parentRoot,depth:s.depth+1,type:"bspModule",name:r.split("/")[1],isShared:!(!M||!u)&&O,hasFormField:!0};M&&M.dataset.label&&(f.label=M.dataset.label),p?i(r.split("/")[0],n,t,l,r):(d?o(r,Object.assign(f,d),s):(o(r,f,s),e.overlays.set(r,Object.assign({},f))),i(r.split("/")[0],n,s,a,r))})})}else{let t=[];const i=r.querySelector(`input[name="${s}.id"][value="${n}"]`)?.parentNode,a=i?.querySelector(`input[name="${s}.data"]`).value;if(a){const n=JSON.parse(a),i=(n,r,a,s)=>{let c=a.children?.find(e=>e.split("/")[0]===n._id),d=a;if(c){const n=e.overlays.get(c);let t={id:c.split("/")[0],hasFormField:!1,parentKey:a.id+"/"+a.name,parentRoot:a.parentRoot,depth:a.depth+1,type:"bspModule",name:c.split("/")[1]};n&&(t=Object.assign(t,n)),o(c,t,a),d=t}r.forEach(r=>{if(!/^_|^theme./.test(r)){let c,l,p;const M=n[r];if(n._id){const i=n._id+"/"+r;t.push(i);const a=e.overlays.get(i);a&&(M&&"object"==typeof M&&(l=Object.keys(M).includes(a.name),Object.keys(M).find(e=>!/^_|^theme./.test(e))||(p=!0)),l&&!s||(c=Object.assign({parentKey:d.id+"/"+d.name,parentRoot:d.parentRoot,depth:d.depth+1,isInitialized:!0,hasFormField:!1,isShared:n[r]._ref?i+"_acEdit":null,isEnhancement:!!s,isDropdown:p},a),o(i,c,d)))}!s&&(l?c=d:c||(c=a),M)&&("object"==typeof M?Array.isArray(M)?M.forEach(n=>{if(n._ref){const t=c.children?.find(e=>n._ref===e.split("/")[0]),i=e.overlays.get(t);if(i){const e=Object.assign({parentKey:c.id+"/"+c.name,parentRoot:c.parentRoot,depth:d.depth+1,isInitialized:!0,hasFormField:!1,isShared:c.id+"/"+c.name+"_"+i.id+"_acEdit"});o(t,e,c)}}else i(n,Object.keys(n),c)}):i(M,Object.keys(M),c):"string"==typeof M&&(new DOMParser).parseFromString(M,"text/html").querySelectorAll("[data-state]").forEach(e=>{const n=e.getAttribute("data-state"),t=JSON.parse(n);t&&i(t,Object.keys(t),c,!0)}))}})};i(n,Object.keys(n),l)}}};if(i(e.previewContainerId,document),[...t.values()].filter(e=>e.isDropdown&&!e.linked&&!e.isShared).forEach(e=>{const n=e.id+"/"+e.name;[...t.values()].find(e=>e.parentKey===n&&e.dimensions)?delete e.isDropdown:t.delete(n)}),q.get(e.previewContainerId)){let n=x(e.previewContainerId);q.get(e.previewContainerId)?._overlayFrame.contentDocument.getElementsByTagName("html")[0].style.setProperty("--PreviewScale",n.getAttribute("previewScale")),q.get(e.previewContainerId).reload(t,e,k)}else{const n=await m.create(e);q.set(e.previewContainerId,n),q.get(e.previewContainerId).reload(t,e,k),(0,u.A)(q.get(e.previewContainerId)._overlayFrame,()=>{q.get(e.previewContainerId).destroy(),q.get(e.previewContainerId),q.delete(e.previewContainerId)})}}else if("BSP.Preview.OverlayActionClick"===t){const n=e.key,t=document.querySelector(`.CIG-row[data-name="${n}"]`),o=document.querySelector(".ContentEdit-previewModal"),i=document.querySelector(`.ContentEdit[data-object-id="${e.previewContainerId}"]`);if(e.handler){const n=(e.elementId?document.querySelector(`.repeatableLabel[data-object-id="${e.elementId}"]`):null).parentElement;return"moveUp"===e.handler?n.parentElement.insertBefore(n,n.previousElementSibling):"moveDown"===e.handler&&n.parentElement.insertBefore(n,n.nextElementSibling?.nextElementSibling),void i.dispatchEvent(new Event("change",{bubbles:!0}))}if("text"===e.internalType)C(t,o,i);else{const n=e.elementId?document.querySelector(`.repeatableLabel[data-object-id="${e.elementId}"]`):null,t=(n?n.parentNode:document).querySelector(`[data-preview-action="${e.actionId}"]`);if(t.classList.contains("RCIG-addSelect")?(0,M.A)(t,":scope > .ComboInput",e=>{e.click()}):t.click(),n&&t.classList.contains("removeButton")&&(n.click(),r()(n)),t.classList.contains("RCIG-add")){const e=t.closest(".RCIG");(0,M.A)(e,":scope > .RCIG-list > li.RCIG-item.is-new-item",e=>{C(e,o,i)})}else if(t.classList.contains("RCS-add")){const n=t.closest(".RCS"),r=e.label;(0,M.A)(n,":scope > .RCS-list > li.RCS-item.is-new-item",e=>{C(e,o,i,r)})}else if(t.classList.contains("EIG-add")){const e=t.closest(".EIG");(0,M.A)(e,":scope > .EIG-item",e=>{C(e,o,i)})}else{const e=t.closest(".RCIG-item, .EIG-item");C(e,o,i)}}}});const R=(e,n,t,o)=>{if(null===n)return;let i,r=n.querySelector(`input[name="${e}"]`);return r&&!o?(t&&(r=n.querySelector(`input[name="${t}/${e.split("/")[1]}"]`)??r),r&&(i=!(r.parentNode.classList.contains("RCIG-item")||r.parentNode.classList.contains("RCS-item"))&&r.parentNode.querySelector(":scope > .ContentSelector-edit"))):n.getAttribute("name")===o&&(i=n.parentNode.querySelector(":scope > .ContentSelector-edit")),i},N=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 B(e,n){if(!e.closest(".Page.is-guideOpen"))return;const t=[];for(let n,o=e;n=o.closest(".CIG-row");)o=n.closest(".CIG"),t.unshift({typeId:o.dataset.typeId,field:n.dataset.fieldName});if(t.length<1)return;let o="";for(let e=0,i=t.length;e<i;++e){const{typeId:r,field:a}=t[e];if(o+=`.Guide-content[data-type-id="${r}"] > .Guide-field[data-field="${a}"] `,e+1===i){const i=document.querySelector(`${o} > form > select`);i&&(i.value=n(t[e]),i.dispatchEvent(new Event("change",{bubbles:!0})))}}const i=new MutationObserver(async()=>{const e=document.querySelector(o);e&&(i.disconnect(),e.scrollIntoView(),e.classList.add("is-focus"))});i.observe(document,{attributes:!0,childList:!0,subtree:!0})}(0,M.A)([".ContentEdit",".enhancementForm",".standardForm"],e=>{e.addEventListener("focusin",({target:e})=>{B(e,e=>e.typeId)}),e.addEventListener("focusout",()=>{for(const e of document.querySelectorAll(".Guide-field"))e.classList.remove("is-focus")})}),(0,M.A)('.CIG-row[data-type="record"] > .CIG-small > select, .CIG-row[data-type="record"] > .CIG-small > btu-toggleable > select',e=>{e.addEventListener("change",()=>{B(e,()=>{const n=e.selectedIndex;return n>=0?e.options[n].dataset.type:null})})}),(0,M.A)(".Guide-field.is-embedded",e=>{const n=e.querySelector("select");if(!n)return;const t=e.closest(".Guide-content[data-type-id]")?.dataset?.typeId;if(!t)return;const o=document.querySelector(`.CIG[data-type-id='${t}'] > .CIG-row[data-field-name='${e.dataset.field}'] .CIG`)?.dataset?.typeId;o&&(n.value=o,n.dispatchEvent(new Event("change",{bubbles:!0})),n.form.requestSubmit())});const S="BSP.ContentEdit.rightPanel",T=(e,n,t)=>{const o=e.classList.toggle("is-active");e.ariaExpanded=o,n.classList.toggle("is-visible",o);const i=n.querySelector(".ContentEdit-right-title")?.textContent;if(e.ariaLabel=`${o?w.close:w.open} ${i}`,e.title=e.ariaLabel,"manage_search"!==e.dataset.iconButtonName){const n=e.closest(".ContentEdit-toolbar"),i=t?.container||n?.closest(".Page-content, .Popup-content, .Popup");if(i)if(o)i.classList.add("has-widget-panel-open");else{const e=n?.querySelector('button.is-active:not([data-icon-button-name="manage_search"])');e||i.classList.remove("has-widget-panel-open")}}if(!t)return;const{container:r,updateStorage:a}=t;let s;r&&(s=o?n.dataset.width:"0px",r.style.setProperty("--ContentEdit-rightWidth",s)),!r.classList.contains("Popup")&&a&&(o?y.setItem(S,e.dataset.iconButtonName):y.removeItem(S))};(0,M.A)(".ContentEdit-toolbar",e=>{const n=e.closest(".Page-content, .Popup-content, .Popup");n.style.setProperty("--ContentEdit-rightWidth","0px");const t=e.closest(".ContentEdit");if(!t)return;const o=t.dataset.objectId,i=y.getItem(S);[...e.querySelectorAll("button[data-right-tab]")].forEach(r=>{if("manage_search"===r.dataset.iconButtonName)return;const a=r.dataset.iconButtonName,s=t.querySelector(`.ContentEdit-right[data-right-tab="${a}"]`);if(!s)return;const c=o+"/"+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 d=`${w.open} ${r.ariaLabel}`;r.ariaLabel=d,r.title=d,r.ariaExpanded=!1,(0,M.A)(".ContentEdit-right .Widget.is-error",e=>{const n=e.closest(".ContentEdit-right");if(!n)return;const t=document.querySelector(`button[aria-controls="${n.id}"]`);t&&t.classList.add("is-error")});const l=s.querySelector(".ContentEdit-right-close");l.ariaLabel=w.close,l.title=w.close,l.onclick=()=>{T(r,s,{container:n,updateStorage:!0}),r.focus()},r.onclick=o=>{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&&n.classList.contains("is-previewing")&&n.offsetWidth<900){const n=e.querySelector(".ContentEdit-previewButton");n?.click()}if(T(r,s,{container:n,updateStorage:!0}),i){if(i.dataset.iconButtonName!==a){const e=t.querySelector(`.ContentEdit-right.is-visible[data-right-tab=${i.dataset.iconButtonName}]`);T(i,e)}}else!window.BRIGHTSPOT?.ui.cms.enableV5UI&&n.classList.contains("is-previewing")&&e.querySelector(".ContentEdit-previewButton").click();!c&&r.classList.contains("is-active")&&o.isTrusted&&n.addEventListener("transitionend",function e(t){"grid-template-columns"===t.propertyName&&(n.removeEventListener("transitionend",e),r.classList.contains("is-active")&&l.focus())})},i===a&&r.click()}),window.BRIGHTSPOT?.ui?.cms?.enableV5UI&&new ResizeObserver(()=>{if(n.offsetWidth<900&&n.classList.contains("is-previewing")&&n.querySelector(".ContentEdit-right.is-visible")){const n=e.querySelector(".ContentEdit-previewButton");n?.click()}}).observe(n)})},87872(e,n,t){"use strict";t(57573),t(49371),t(96648);var o=t(65995),i=t.n(o),r=t(24510),a=t(45055),s=t(18101),c=t(23054);let d,l=!1;const p=[];function M(e,n,t,o,i,a){if(clearInterval(e),n.emit(a+".leaving",t),u(i)&&0===o.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 u(e){return document.documentElement.getAttribute("data-user-id")===e.getAttribute("data-content-lock-owner")}function b(e,n){fetch(CONTEXT_PATH+"contentLock"+n).then(function(e){if(!e.ok)throw Error(e.statusText);return e.text()}).then(function(n){try{const t=JSON.parse(n);Array.isArray(e)?function(e,n){e.forEach(e=>{const t=e.getAttribute("data-rtc-content-id"),o=n.lockOwnerIds[t];o&&(e.setAttribute("data-content-lock-owner",o),O(e,o))})}(e,t):"FORM"===e.nodeName&&h(e,t)}catch(e){console.error(e)}}).catch(n=>{Array.isArray(e)||"FORM"!==e.nodeName||function(e){if(!u(e)||l)return;const n=e.getAttribute("data-lock-network-timeout"),t=(0,s.A)("div",{className:"ContentLockMessage-timeout message message-error"}),o=(0,s.A)("span");o.innerHTML="Disconnected from network. Trying to reconnect. The lock might be dropped in: ";const i=(0,s.A)("span",{class:"ContentLockTimer"});i.innerHTML=(n<10?"0"+n:n)+":00",t.appendChild(o),t.appendChild(i);const r=e.querySelector(".ContentEdit-main")||e;r.insertBefore(t,r.firstChild),l=!0,function(e,n){let t,o,i=e;const r=setInterval(function(){t=parseInt(i/60,10),o=parseInt(i%60,10),t=t<10?"0"+t:t,o=o<10?"0"+o:o,n.textContent=t+":"+o,(--i<0||!l)&&clearInterval(r)},1e3)}(60*n-1,i)}(e),console.error(n)})}function h(e,n){if(n.hardTimeout)return e.setAttribute("data-content-lock-owner",null),void(window.location.href=CONTEXT_PATH);const t=e.getAttribute("data-rtc-content-id"),o=n.lockOwnerId;if(!o)return;if(l){const n=e.querySelector(".ContentLockMessage-timeout");n&&n.remove(),l=!1}const i=o!==document.documentElement.getAttribute("data-user-id"),r=e.getAttribute("data-content-lock-owner")!==o,a="true"===e.getAttribute("data-unlocking-disabled")!==n.unlockingDisabled,c=e.querySelector(".ContentEdit-main")||e,p=document.querySelector(".Widget-controls");if(e.classList.toggle("is-locked",i),e.setAttribute("data-content-lock-owner",o),e.setAttribute("data-unlocking-disabled",n.unlockingDisabled),p&&p.classList.toggle("is-locked",i),r){let t=e.querySelector(".ContentLockMessage-eviction");n.evictionMessage?(t||(t=(0,s.A)("div",{className:"ContentLockMessage-eviction message message-warning"}),c.insertBefore(t,c.firstChild)),t.innerHTML=n.evictionMessage):t&&t.remove()}let M=e.querySelector(".ContentLockMessage-status");if(i&&(r||a)){M&&M.remove(),M=(0,s.A)("div",{className:"ContentLockMessage-status message message-warning"}),c.insertBefore(M,c.firstChild),M.innerHTML=n.statusMessage;const o=M.querySelector(".ContentLock-link");o&&(o.onclick=()=>{const n=new FormData;n.append("forceUnlock",!0),n.append("contentId",t),z(e,o,n)}),document.activeElement&&document.activeElement.blur()}else if(!i){if(n.statusMessage){if(r||a){M&&M.remove(),M=(0,s.A)("div",{className:"ContentLockMessage-status message message-info"}),c.insertBefore(M,c.firstChild),M.innerHTML=n.statusMessage;const o=M.querySelector(".ContentLock-link");o&&(o.onclick=()=>{const n=new FormData;n.append("disableUnlock",!0),n.append("contentId",t),z(e,o,n)})}}else M&&M.remove();const o=e.querySelector(".ContentLockMessage-eviction");o&&o.remove()}let u=e.querySelector(".ContentLockMessage-inactive");if(n.inactivityMessage)if(i&&!u){u=(0,s.A)("div",{className:"ContentLockMessage-inactive message message-info"}),c.insertBefore(u,c.firstChild),u.innerHTML=n.inactivityMessage;const o=u.querySelector(".ContentLock-link");o&&(o.onclick=()=>{const n=new FormData;n.append("inactiveUnlock",!0),n.append("contentId",t),z(e,o,n)})}else i||d||(d=document.title,document.title=n.inactivityMessage);else u&&u.remove(),d&&(document.title=d,d=null);r&&O(e,o)}function z(e,n,t){const o=n.getAttribute("data-confirm");o&&confirm(o)&&function(e,n){fetch(CONTEXT_PATH+"contentLock",{method:"post",headers:{"Brightspot-CSRF":r.A.get("bsp.csrf")},body:n}).then(function(e){return e.text()}).then(function(n){try{if(e){const t=JSON.parse(n);h(e,t)}}catch(e){console.error(e)}})}(e,t)}function O(e,n){e.querySelectorAll(".EditFieldUpdateViewers-viewer").forEach(e=>{e.toggleAttribute("data-locked",e.getAttribute("data-user-id")===n)})}(0,a.A)('form[data-rtc-content-id][data-content-locking="true"]',e=>{const n=e.getAttribute("data-rtc-content-id"),t=Date.now(),o=i().client(),r=n+".viewing",s=n+".leaving",d=[],l={viewer:t};o.on(r,function(e){const n=e.viewer;n&&-1===d.indexOf(n)&&(d.push(e.viewer),o.emit(r,l))}),o.on(s,function(e){const n=e.viewer;if(n){const e=d.indexOf(n);-1!==e&&d.splice(e,1)}}),o.emit(r,l);const p="?contentId="+n+"&typeId="+e.getAttribute("data-type-id");b(e,p);const h=setInterval(()=>{const n=p+"&isLockOwner="+u(e)+"&isInactive="+document.hidden;b(e,n)},5e3);window.addEventListener("unload",()=>{M(h,o,l,d,e,n)}),(0,a.A)("[data-rtc-unlock-onreceive]",t=>{t.dataset.rtcUnlockOnreceive&&c.default.receive(t.dataset.rtcUnlockOnreceive,t=>{M(h,o,l,d,e,n)})}),(0,a.A)("[data-rtc-unlock-onclick]",t=>{t.addEventListener("click",t=>{M(h,o,l,d,e,n)})})}),(0,a.A)(':not(form)[data-rtc-content-id][data-content-locking="true"]',e=>{if(0===p.length){const n=e.closest("table");n?n.querySelectorAll(':not(form)[data-rtc-content-id][data-content-locking="true"]').forEach(e=>{-1===p.indexOf(e)&&p.push(e)}):p.push(e);let t="?"+p.map(()=>"contentIds="+e.getAttribute("data-rtc-content-id")).join("&");b(p,t);const o=setInterval(()=>{t="?";const e=[];for(let n=p.length-1;n>=0;--n){const o=p[n];if(document.body.contains(o)){const n=o.getAttribute("data-rtc-content-id");-1===e.indexOf(n)&&(e.push(n),t+="contentIds="+n+"&")}else p.splice(n,1)}0!==p.length&&0!==e.length?b(p,t.substring(0,t.length-1)):clearInterval(o)},5e3)}else-1===p.indexOf(e)&&p.push(e)}),(0,a.A)(".EditFieldUpdateViewers-viewer",e=>{const n=e.closest("[data-content-lock-owner]");n&&e.toggleAttribute("data-locked",e.getAttribute("data-user-id")===n.getAttribute("data-content-lock-owner"))})},17953(e,n,t){"use strict";var o=t(45055);(0,o.A)(".ContentReportingWidget div.widgetControls",e=>{const n=document.querySelector("a.ContentReporting-runLink");n&&e.before(n)}),(0,o.A)(".ContentReportingWidget.is-viewOnly",e=>{const n=e.querySelector("div.widgetControls"),t=e.querySelector("div.widget-contentCreate"),o=e.querySelector("div.ActionBar");n&&(n.innerHTML="",n.parentNode.removeChild(n)),t&&(t.innerHTML="",t.parentNode.removeChild(t)),o&&(o.innerHTML="",o.parentNode.removeChild(o))})},39422(e,n,t){"use strict";t(57573);var o=t(76394),i=t(45055),r=t(39403);function a(e){return e.parentNode.getBoundingClientRect().width<500}window.addEventListener("resize",(0,r.A)(()=>{const e=[];for(const n of(0,o.A)(document,".DT"))e.push({table:n,compact:a(n)});for(const{table:n,compact:t}of e)n.classList.toggle("is-compact",t)})),(0,i.A)(".DT",e=>{e.classList.toggle("is-compact",a(e))})},78927(e,n,t){"use strict";var o=t(45055),i=t(82601),r=t.n(i);(0,o.A)("input.date",e=>{e.classList.remove("date"),e.setAttribute("type","hidden");const n=document.querySelector("html").getAttribute("data-time-zone");e.setAttribute("data-time-zone",n);const t=document.createElement("a");t.classList.add("DateTimeInput","is-legacy"),t.setAttribute("target","DateStringCalendarFrame");const o=e.getAttribute("placeholder");o&&t.setAttribute("data-placeholder",o);const i=new URLSearchParams;let s,c;if(i.append("showDate",!0),i.append("showTime",!0),i.append("hideSecond",!0),e.value){const t=r().tz(parseInt(e.value),n);s=t.format("YYYY-MM-DD"),c=t.format("HH:mm:ss.SSS"),i.append("date",s),i.append("time",c)}else t.classList.add("is-empty");a(t,null,s,c),t.href=window.BRIGHTSPOT.web.pagePaths["com.psddev.cms.ui.form.CalendarFrame"]+"?"+i,e.parentNode.insertBefore(t,e.nextSibling)}),(0,o.A)(".DateStringCalendarEmbedded .DateStringCalendar",e=>{l(e,e.closest(".DateStringCalendarEmbedded"))}),(0,o.A)(".Popup .DateStringCalendar",e=>{const n=e.closest(".frame"),t=n.closest(".Popup");t.setAttribute("aria-label",e.getAttribute("data-popupLabel"));const o=t.classList;o.add("is-local"),o.add("is-calendar");const i=n._bspFrameLink;"true"===i.getAttribute("data-hide-popup-close")&&t.querySelector(".Popup-close").classList.add("is-hidden"),l(e,i)});const a=(e,n,t,o,i,r)=>{if(!e)return;"object"==typeof t&&(o=t.getAttribute("data-time"),i=t.getAttribute("data-zoneOffset"),r=t.getAttribute("data-zoneId"),t=t.getAttribute("data-date"));const a=e.getAttribute("data-placeholder");if(!t&&!o&&a)return e.setAttribute("aria-label",a),void(e.innerHTML="");const s=new URLSearchParams;s.append("date",t),s.append("time",o),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(t=>{const o=`${n||""}${t}`;e.setAttribute("aria-label",o),e.innerHTML=o})},s=(e,n,t)=>{const[o,i]=(n.getAttribute("href")||"").split("?"),a=new URLSearchParams(i);let s;if(n.classList.contains("is-legacy")){const o=n.previousSibling;if(t)e.removeAttribute("data-date"),a.delete("date"),e.removeAttribute("data-time"),a.delete("time"),o.value=null;else{const n=e.getAttribute("data-date");a.set("date",n);const t=e.getAttribute("data-time");a.set("time",t),o.value=r().tz(`${n}T${t}`,o.getAttribute("data-time-zone")).valueOf()}s=o}else{const o=n.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"),d="true"===e.getAttribute("data-showZoneId");if(i){const n=o.querySelector('input[name$=".date"], .DateTimeInput-date');if(t)e.removeAttribute("data-date"),a.delete("date"),n.value=null;else{const t=e.getAttribute("data-date");a.set("date",t),n.value=t}s=n}if(r){const n=o.querySelector('input[name$=".time"], .DateTimeInput-time');if(t)e.removeAttribute("data-time"),a.delete("time"),n.value=null;else{const t=e.getAttribute("data-time");a.set("time",t),n.value=t}if(c){let n=o.querySelector('input[name$=".zoneOffset"]');if(t)e.removeAttribute("data-zoneOffset"),a.delete("zoneOffset"),n.value=null;else{const t=e.getAttribute("data-zoneOffset");a.set("zoneOffset",t),n.value=t}}else if(d){let n=o.querySelector('input[name$=".zoneId"]');if(t)e.removeAttribute("data-zoneId"),a.delete("zoneId"),n.value=null;else{const t=e.getAttribute("data-zoneId");a.set("zoneId",t),n.value=t}}s=n}}return s.dispatchEvent(new Event("change",{bubbles:!0})),o+"?"+a.toString()},c=(e,n)=>{s(e,n),e.closest(`.CIG-row[data-type$="${["/date","/instant","/zonedDateTime","/offsetDateTime","/offsetTime","/localDateTime","/localDate","/localTime"].join('"], .CIG-row[data-type$="')}"]`)?(e=>{const n=e.closest("li"),t=n.getAttribute("data-type");a(n.querySelector(".RCIG-title"),`${t}: `,e)})(e):a(n.closest(".CIG-row").querySelector(".CIG-note"),null,e)},d=(e,n,t)=>{n.setAttribute("href",s(e,n,t)),t?n.classList.add("is-empty"):n.classList.remove("is-empty"),a(n,null,e),e.closest(".Popup").querySelector(".Popup-close").click()},l=(e,n)=>{const t="true"===e.getAttribute("data-isWidgetEmbedded"),o="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(o){const o=e.querySelector(".DateStringCalendarDate"),i=s.querySelector('input[name="date"]');o.querySelector(".Month-body").addEventListener("click",o=>{const r=o.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"),t&&c(e,n)}),s.querySelector(".DateStringCalendarForm-previous").addEventListener("click",e=>{const n=e.target.querySelector("input");n.value=!0,n.dispatchEvent(new Event("change",{bubbles:!0}))}),s.querySelector(".DateStringCalendarForm-next").addEventListener("click",e=>{const n=e.target.querySelector("input");n.value=!0,n.dispatchEvent(new Event("change",{bubbles:!0}))})}if(i){const i=e.querySelector(".DateStringCalendarTime-custom"),d=i.querySelector(".DateStringCalendarTime-hour"),l=i.querySelector(".DateStringCalendarTime-meridiem"),p=i.querySelector(".DateStringCalendarTime-minute"),M=i.querySelector(".DateStringCalendarTime-second"),u=i.querySelector(".DateStringCalendarTime-nanosecond"),b=i.querySelector(".DateStringCalendarTime-zoneOffset"),h=i.querySelector(".DateStringCalendarTime-zoneId");M.addEventListener("change",()=>u.value=0);const z=()=>{const i=l.value;let z=parseInt(d.value);"pm"===i&&(z+=12);const O=`${z.toString().padStart(2,"0")}:${p.value.padStart(2,"0")}:${M.value.padStart(2,"0")}.${u.value}`;e.setAttribute("data-time",O),r?e.setAttribute("data-zoneOffset",b.value):a&&e.setAttribute("data-zoneId",h.value),o&&(s.querySelector('input[name="time"]').value=O,r?s.querySelector('input[name="zoneOffset"]').value=b.value:a&&(s.querySelector('input[name="zoneId"]').value=h.value)),t&&c(e,n)};i.addEventListener("change",z);const O=e.querySelector(".DateStringCalendarTime-common");O&&O.addEventListener("change",r=>{const a=r.target.selectedOptions[0].value;"_custom"===r.target.selectedOptions[0].value?(i.classList.remove("is-hidden"),z()):(i.classList.add("is-hidden"),e.setAttribute("data-time",a),o&&(s.querySelector('input[name="time"]').value=a),t&&c(e,n))})}t?c(e,n):(e.querySelector(".DateStringCalendarAction-clear").addEventListener("click",t=>d(e,n,!0)),e.querySelector(".DateStringCalendarAction-set").addEventListener("click",t=>d(e,n))),e.querySelector(".DateStringCalendarAction-now").addEventListener("click",e=>{let n;if(o){const e=s.querySelector('input[name="date"]');e.value=null,s.querySelector('input[name="renderYear"]').value=null,s.querySelector('select[name="renderMonth"]').value=null,n=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),n=e}n.dispatchEvent(new Event("change",{bubbles:!0}))})}},88646(e,n,t){"use strict";t.a(e,async(e,n)=>{try{t(86634),t(92065),t(30945),t(59981),t(75633),t(6349),t(88420);var o=t(34588),i=t(95791),r=t(18101),a=t(45055),s=t(53853),c=t(23902),d=t(97204),l=t(76394),p=t(79365),M=(t(2565),t(85945),t(45383),t(31201),t(90871),t(70175)),u=(t(25351),t(50401),t(82224)),b=(t(13473),t(97139),t(87872),t(39422),t(78927),t(64314),t(91580),t(25019),t(4199),t(1002),t(64912),t(90962),t(93126),t(63135),t(44475),t(70287),t(27140),t(76131),t(15651),t(53506),t(31915),t(17953),t(61818),t(24341),t(3689),t(47025),t(74227)),h=(t(80754),t(31854),t(9216)),z=(t(25539),t(83026),t(84410),t(38948),t(84164),t(28211),t(64854),t(72117),t(46131),t(44726),t(9386),t(56435),t(58014),t(77469),t(72168),t(39721),t(72049)),O=t(24510),f=e([z]);function m(){const e=document.createElement("div");Object.assign(e.style,{height:"100px",overflow:"scroll",visibility:"hidden",width:"100px"});const n=document.body;n.appendChild(e),document.documentElement.style.setProperty("--scrollbarSize",e.offsetWidth-e.clientWidth+"px"),n.removeChild(e)}z=(f.then?(await f)():f)[0],t.p=CONTEXT_PATH+"dist/",window.addEventListener("mouseup",e=>{const n=e.target;if(n===document.activeElement){let e=n.tagName;e&&(e=e.toLowerCase(),("a"===e||"button"===e&&!n.classList.contains("TabBar-item"))&&n.blur())}}),(0,a.A)(".autoSubmit:not(:has(:state(btu-loading))), [data-bsp-autosubmit]:not(:has(:state(btu-loading)))",e=>{new M.A(e)}),(0,d.A)("select",e=>{if(!e.isConnected)return;let n="";(e.closest(".RCIG-addSelect")||e.closest(".Page-create")||e.classList.contains("ContentSelector-select")&&e.parentNode.querySelector(".ContentSelector-clear"))&&(n="is-hidePlaceholder");const t=new u.A(e,{getOptionsUrl:n=>{const t=e.getAttribute("data-options-url");return t?t+encodeURIComponent(n):null},modifier:n});(0,c.A)(e,()=>{t.destroy()})}),(0,a.A)(".is-readOnly:not(select)",e=>{for(const n of(0,l.A)(e,"input, textarea, select"))n.type.includes("select")?n.classList.add("is-readOnly"):n.readOnly=!0}),(0,d.A)(".TC",e=>{new h.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 n=window.BRIGHTSPOT.ajaxInitiator;if(n){const{action:t,id:o,nodeName:i,shadowField:r}=n;if("select"!==i&&!r)return;const a=r?`[shadow-field="${r}"]`:`form[action*="${new URL(t).pathname}"] ${i}[name="${o}"] ~ .ComboInput`;(0,s.A)(a,()=>{let n=e.target.querySelector(a);null==n&&(n=document.querySelector(a)),n&&(n.focus(),window.BRIGHTSPOT.ajaxInitiator=null)})}}),(0,a.A)('input[autocomplete="off"]',e=>{if(e.closest("btu-search-input"))return;const n=e;n.readOnly||(n.readOnly=!0,n.addEventListener("focus",()=>{n.readOnly=!1}))}),(0,b.Ts)(),"loading"===document.readyState?window.addEventListener("DOMContentLoaded",()=>{m(),window.location!==window.parent.location&&(document.body.classList.contains("is-inIframe")||document.body.classList.add("is-inIframe"))}):m(),window.BRIGHTSPOT&&(window.BRIGHTSPOT.js={...window.BRIGHTSPOT.js,trapFocusWithin:i.J,getFocusableDescendants:o.l,getFirstAndLastFocusableDescendants:o.q,create:r.A,onFind:a.A,onRemove:c.A,Cookies:O.A,setupMenuForAria:p.D1,toggleMenu:p.AM}),n()}catch(g){n(g)}})},91580(e,n,t){"use strict";t(86634),t(49371),t(56673),(0,t(45055).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()})})})},64314(e,n,t){"use strict";var o=t(76394);const i=['button:not([type="button"])','input[type="submit"]'].join(",");window.addEventListener("click",function(e,n){const t=Array.isArray(e)?e.join(","):e;return function(...e){if(e[0]instanceof Event||e[0]instanceof window.jQuery.Event){const o=e[0].target;o instanceof Element&&o.matches(t)&&n.apply(o,e)}}}(i,function(){for(const e of(0,o.A)(this.closest("form"),i))e.classList.remove("is-clicked");this.classList.add("is-clicked")})),window.addEventListener("submit",e=>{const n=e.target;if(n.target&&!n.classList.contains("is-loader"))for(const e of(0,o.A)(n,".is-clicked"))e.classList.remove("is-clicked");else n.classList.add("is-submitting")})},25019(e,n,t){"use strict";t(86634),t(49371),t(96648);var o=t(45055);window.addEventListener("click",e=>{const n=e.target;if(n.classList.contains("Hierarchy-expand")){for(const e of n.closest("ul").querySelectorAll(".is-selected"))e.classList.remove("is-selected");n.closest("li").classList.add("is-selected")}},{capture:!0}),window.addEventListener("brightspot-frame-load",e=>{const n=e.target;if(n.classList.contains("Hierarchy-children")){const e=n.querySelector(".Hierarchy-column");e&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}if(n.classList.contains("HierarchyResults")){const e=[...n.querySelectorAll("li")],t=n.closest(".Hierarchy-column").querySelector("ul");e.forEach(e=>{t.appendChild(e)})}const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&document.querySelector(".Hierarchy-moreElements")?.click()})});let o=document.getElementsByClassName("lastHierarchyElement");o.item(0)&&(t.observe(o.item(0)),o.item(0).classList.remove("lastHierarchyElement"))}),(0,o.A)("div[data-popup-source-class*='Page-search'] div.Hierarchy-column a[data-hierarchy-item]",e=>{const n=e.getAttribute("data-type-id"),t=e.getAttribute("data-parent-type-ids"),o=e.closest("div.SearchWidget-form");if(!o||!n)return;const i=o.querySelector("select[name='st'] option[selected]").value;n===i||t&&t.includes(i)||e.setAttribute("data-mismatch-hierarchy-type","true")}),(0,o.A)("div[data-popup-source-class*='objectId-select'] div.Hierarchy-column a[data-hierarchy-item]",e=>{const n=e.getAttribute("data-type-id"),t=e.closest("div.SearchWidget-form");if(!t||!n)return;const o=t.querySelector("div.searchCreate form.objectId-create"),i=o.querySelector("input[name='typeId']")?.value,r=o.querySelector("select[name='typeId']")?.getAttribute("data-typeids");i&&n===i||r&&r.includes(n)||e.setAttribute("data-mismatch-hierarchy-type","true")})},4199(e,n,t){"use strict";t(49371),t(55763);var o=t(91762);const i=window.BRIGHTSPOT?.icons?.materialToLucide??{},r=!!window.BRIGHTSPOT?.ui?.cms?.enableV5UI,a=!r&&Object.keys(i).length>0?Object.keys(i).reduce((e,n)=>(e[i[n]]=n,e),{}):void 0;r||(0,o.A)(["[data-icon]","[data-icon-name]","[data-icon-button-name]"],function(e){const n=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(!n)return;const t=e.getAttribute(n);if(null==t)return;const o=t.trim(),i=a&&null!=a[o]?a[o]:o;e.setAttribute(n,i)})},1002(e,n,t){"use strict";(0,t(53853).A)(".imageEditor",async()=>{await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(4582),t.e(9277),t.e(4795),t.e(5857)]).then(t.bind(t,92954))})},64912(e,n,t){"use strict";var o=t(24510);(0,t(45055).A)(".LinkCarousel-item",e=>{e.addEventListener("click",async n=>{const t=n.target;if(t.classList.contains("LinkCarousel-item-favorite")){t.classList.toggle("is-unstarred");const n=t.classList.contains("is-unstarred")?t.getAttribute("data-title-on"):t.getAttribute("data-title-off");t.title=n,t.setAttribute("aria-label",n);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",o.A.get("bsp.csrf"));try{await fetch(i,{method:"POST",headers:r})}catch(e){console.error(e)}}else{if(e!==t)return;n.stopPropagation(),e.querySelector("a").click()}})})},90962(e,n,t){"use strict";var o=t(18101);(0,t(45055).A)(".LinkList td:not(.LinkList-image, .LinkList-main, .LinkList-viewers, .LinkList-button, .LinkList-type, .LinkList-description, .date-time)",e=>{const n=(0,o.A)("span",{className:"LinkList-icon","aria-hidden":"true"});e.prepend(n)})},93126(e,n,t){"use strict";var o=t(18101),i=t(60021),r=t(76394),a=t(45055);(0,a.A)(".LinkTable .Label",e=>{const n=e.closest("th, td");if(!n||n.classList.contains("LinkTable-label")||e.closest(".CommunityWidget"))return;const t=n.previousElementSibling;if(t&&t.classList.contains("LinkTable-label"))return void t.appendChild(e);const i=e.closest("tr"),r=Array.from(i.querySelectorAll("th, td")).indexOf(n);let a;const s=i.closest("table").querySelector("tr").querySelectorAll("th, td");for(let e=0,n=0;n-1<r;e++)a=s[e],n+=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 n=r;for(const t of e.querySelectorAll("th, td"))if(n-=t.colSpan,n<0){e.insertBefore((0,o.A)(t.tagName,{className:"LinkTable-label"},"TH"===t.tagName&&e.closest("table").classList.contains("searchResultTable")?window.BRIGHTSPOT.ui?.searchContentStatus:""),t);break}}i.querySelectorAll("th, td")[r].appendChild(e)}});const s=new ResizeObserver(e=>{for(const n of e)n.target.classList.toggle("is-compact",(n.borderBoxSize?.inlineSize||n.contentRect.width)<500)});(0,a.A)(".LinkTable",e=>{e.classList.contains("is-compact")||s.observe(e);const n=e.classList.contains("is-static");for(const t of(0,r.A)(e,":scope > tbody > tr")){const e=(0,r.A)(t,":scope > td");if(!n)for(const n of e)if((0,i.A)(n,":scope > a")){n.classList.add("LinkTable-main");break}const o=e[0].classList;o.contains("LinkTable-main")?e.length>1&&e[1].classList.add("LinkTable-first"):o.add("LinkTable-first")}})},63135(e,n,t){"use strict";var o=t(97204);(0,o.A)(".locationMap",async e=>{const{default:n}=await Promise.all([t.e(8897),t.e(5598),t.e(1888)]).then(t.bind(t,48207));new n(e)}),(0,o.A)(".regionMap",async e=>{const{default:n}=await Promise.all([t.e(8897),t.e(5598),t.e(6086),t.e(6379)]).then(t.bind(t,22848));new n(e)})},44475(e,n,t){"use strict";var o=t(45055),i=t(60021);(0,o.A)('.LookingGlass-actions[data-action="copy"]',e=>{e.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation();const t=document.createElement("textarea");t.value=(0,i.A)(e,"a").href,t.setAttribute("readonly",""),document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),e.setAttribute("data-copied","true"),setTimeout(()=>{e.removeAttribute("data-copied")},2e3)})})},70287(e,n,t){"use strict";var o=t(18101);(0,t(45055).A)(".Message",e=>{const n=(0,o.A)("span",{className:"Message-icon","aria-hidden":"true"}),t=e.querySelector(".ContentEdit-revisionInfo");t?t.insertAdjacentElement("afterend",n):e.append(n)})},27140(e,n,t){"use strict";var o=t(76394),i=t(45055),r=t(39403);function a(e){const n=e.style;n.overflow="auto",n.transform="",n.width="100%";const t=e.getBoundingClientRect().width,o=e.scrollWidth;t<o&&(n.transform=`scale(${t/o})`,n.transformOrigin="left"),n.overflow="",n.width=""}(0,i.A)(".NB",a),window.addEventListener("resize",(0,r.A)(()=>{for(const e of(0,o.A)(document,".NB"))a(e)}))},76131(e,n,t){"use strict";t(86634),t(57573),t(49371),t(42723),t(56065);var o=t(18101),i=t(60021),r=t(76394),a=t(39242),s=t(45055),c=t(53853),d=t(23902),l=t(93832),p=t(2674),M=t(34588),u=t(95791),b=t(88630);const h=window.BRIGHTSPOT?.ui.tooltips;function z(e,n){n&&e.style.setProperty("--Page-headerBottom",`calc(var(--Page-headerHeight) + ${n.clientHeight}px)`)}function O(e,n=!1){const t=e?.querySelector(".Page-nav"),o=e.classList.contains("is-navigating")||!0===n;o?t?.setAttribute("inert",""):t?.removeAttribute("inert"),o||t.querySelector(":scope .selected li:first-of-type")?.querySelector("a")?.focus();const i=o?h.menu.open:h.menu.close;e.classList.toggle("is-navigating",!0!==n&&void 0);const r=e?.querySelector(".Page-navToggle");r&&(r.title=i,r.setAttribute("aria-label",i),r.setAttribute("aria-expanded",!o))}function f(e,n){const t=document.querySelector(".Page-nav");if(!e)return;let o,i,r=e.classList;if(r.remove("is-active"),r.contains("selected")&&r.contains("isNested")||r.contains("is-expanded")){const t=e.querySelector("ul").firstElementChild;null!=t&&f(t,n)}const a=e.closest("ul").closest("li"),s=e.closest(".isNested");if(1===n){i=e.nextSibling;const n=e.classList.contains("is-expanded");null!==i?n?o=e.querySelector("ul").firstElementChild:"LI"===i.tagName&&(o=i):n||(o=null!==s.nextSibling?a.nextSibling:t.firstElementChild.querySelector("ul").firstElementChild),o.querySelector("a").focus()}else if(i=e.previousSibling,null!==i)"LI"===i.tagName&&(o=i,o.querySelector("a").focus()),e.classList.contains("isNested")&&(o=i.querySelector("ul").lastElementChild,o.querySelector("a").focus());else{const e=s.previousSibling;if(a.classList.contains("isNested")?o=a:null!==e&&(o=e.classList.contains("selected")?e.querySelector("ul").lastElementChild:a),s.classList.contains("selected")){const e=t.lastElementChild;o=e.classList.contains("is-expanded")?e.querySelector("ul").lastElementChild:e}o.querySelector("a").focus()}}(0,s.A)(".Page .Container-broadcast",e=>{const n=e.closest(".Page");new ResizeObserver(t=>{z(n,e)}).observe(e),z(n,e)}),(0,s.A)(".Page-nav",e=>{e.setAttribute("inert",""),e.addEventListener("keydown",n=>{switch(n.key){case"Enter":document.activeElement.closest("li").setAttribute("aria-expanded",document.activeElement.closest("li").matches(".is-expanded"));break;case"ArrowUp":case"ArrowLeft":f(n.target.closest("li"),-1),n.preventDefault(),n.stopPropagation();break;case"ArrowRight":case"ArrowDown":f(n.target.closest("li"),1),n.preventDefault(),n.stopPropagation();break;case"Escape":if("false"===document.activeElement.closest("li").getAttribute("aria-expanded")||document.activeElement.parentElement.parentElement.parentElement.classList.contains("selected"))O(e.closest(".Page"),!0);else if(n.target.closest("li").classList.contains("is-expanded")||n.target.closest("li").closest("ul").classList.contains("is-expanded")){const e=n.target.closest(".isNested");e.classList.remove("is-expanded"),e.firstElementChild.focus()}else O(e.closest(".Page"),!0)}});const n=(0,a.A)((0,o.A)("button",{className:"Page-navToggle",title:h.menu.open,"aria-label":h.menu.open,"aria-haspopup":"true","aria-expanded":"false",onclick:n=>{O(e.closest(".Page"))},onkeydown:n=>{e.closest(".Page");const t=(0,i.A)(e,":scope > li");switch(n.key){case"ArrowUp":case"ArrowLeft":e.lastElementChild.querySelector("a").focus();break;case"ArrowDown":case"ArrowRight":t.classList.contains("isNested")&&t.classList.contains("selected")?t.querySelector("ul").firstElementChild.querySelector("a").focus():t.querySelector("a").focus()}}}),e);for(const n of(0,r.A)(e,".isNested")){const e=`BSP.Page.navItemExpanded.${n.textContent.trim()}`,t=(0,i.A)(n,":scope > a"),r=l.A.get(e),a=r?h.collapse:h.expand,s=(0,o.A)("div",{className:"Page-navItemToggle","aria-label":a});t.setAttribute("tabindex",0),n.setAttribute("aria-expanded",n.classList.toggle("is-expanded",r)),t.appendChild(s),t.title=a,t.addEventListener("click",o=>{o.preventDefault();const i=n.classList.toggle("is-expanded");t.title=i?h.collapse:h.expand,s.setAttribute("aria-label",t.title),l.A.toggle(e,i),n.setAttribute("aria-expanded",i),i&&setTimeout(()=>n.scrollIntoView({behavior:"smooth",block:"nearest"}),100)})}window.addEventListener("click",t=>{e.contains(t.target)||n.contains(t.target)||window.BRIGHTSPOT?.ui.cms.enableV5UI||O(e.closest(".Page"),!0)})}),(0,s.A)(".toolUserDisplay",e=>{const n=e.querySelector(".toolUserNotifications"),t=e.querySelector(".toolUserNotifications a");e.parentNode.insertBefore((0,o.A)("div",{className:"Page-notifications","data-new":t.dataset.new,"data-count":t.dataset.count,"data-count-label":t.dataset.countLabel},Array.from(n.children)),e.nextSibling),n.remove()}),(0,s.A)('.Popup[name="profilePanel"] .p-tud > h1',e=>{const n=(0,o.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"),n.appendChild(e);e.parentNode.insertBefore(n,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"),n=e.querySelector("label")?.htmlFor;n&&document.getElementById(n)?.focus()});const m=[];let g;function A(){if(!document.querySelector(".Page").classList.contains("is-guideOpen"))return;const{href:e,name:n}=m[m.length-1];if(e&&e!==g){g=e;const t=document.querySelector(".Page-guide");if(!t.querySelector(`:scope > .frame[name="${n}"]`)){const o=document.createElement("div");o.classList.add("frame"),o.setAttribute("name",n),t.appendChild(o);const i=new URLSearchParams;i.append("subject",e);const r=document.createElement("a");r.href=`${document.querySelector(".Page-guideLink a").href}?${i}`,r.target=n,document.body.appendChild(r),r.click(),document.body.removeChild(r)}for(const e of t.querySelectorAll(":scope > .frame")){const n=e.getAttribute("name");m.some(({name:e})=>e===n)||t.removeChild(e)}}}function w(e){const n=e.dataset.href;return"true"===new URLSearchParams(n).get("isFieldGuide")}let v=0;function q(e,n,t,o=!1){if("Tab"!==e.key)return;const i=t!==document&&t?.matches(".is-fromTop"),r={header:(o?"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:o?".Page-guide":null,queryFieldDone:t!==document&&t?.matches('[name="queryField"]')?".QueryField-button":null},a=Object.values(r).filter(e=>e).map(e=>{const o=".searchFiltersRest"!==e||n?0:1,i=e.includes("Page-search.toolSearch")?document:t;return(0,M.l)(e,i,o)}).filter(e=>null!==e);(0,u.J)(e,a,!o)}function k(e,n){"Tab"===n.key&&(0,s.A)(e,e=>{const t=(0,p.Kr)(e,{includeContainer:!0});t&&t.length>0&&function(e,n){let t,o;if(n[n.length-1].classList.contains("ContentSelector-search")?(t=n.pop(),o=n.pop()):n[n.length-1].classList.contains("ComboInput")&&(t=n.pop()),t){const e=o?[o,t]:[t];e.length>0&&n.splice(1,0,...e)}let i=null;n[0].nextElementSibling instanceof HTMLElement&&(i=n[0].nextElementSibling);const r=i?(0,p.Kr)(i,{includeContainer:!0}):[],a=e.target instanceof HTMLElement||e.target instanceof SVGElement,s=e.target&&a?n.indexOf(document.activeElement):-1,c=e.shiftKey?"back":"forward";"forward"===c?s>=0&&s<n.length-1?(e.preventDefault(),n[s+1]?.focus()):s===n.length-1&&(e.preventDefault(),r[0]?.focus()):"back"===c&&(a&&e.target===r[0]?(e.preventDefault(),n[n.length-1]?.focus()):s>0&&(e.preventDefault(),n[s-1]?.focus()))}(n,t)})}(0,s.A)([".Page",".Popup"],e=>{if("DateStringCalendarFrame"===e.getAttribute("name"))return;const n=e.dataset.href;n&&(m.push({href:n,name:"guide-"+ ++v}),function(e){const n=new URLSearchParams(e);return null!=n.get("typeId")||null!=n.get("id")||e.includes("?typeId=")||e.includes("?id=")}(n)&&e.setAttribute("data-subject-type","true"),A(),(0,d.A)(e,()=>{m.splice(m.indexOf(n),1),A()}))}),(0,s.A)(".Page-guideLink a",e=>{const n=e.closest(".Page");n.classList.contains("is-guideOpen")&&e.setAttribute("aria-expanded","true"),e.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation();const o=n.querySelector("div.Popup[name='guideField']");o&&o.querySelector(".closeButton").click();const i=n.querySelector(".Page-navToggle");"true"===i?.getAttribute("aria-expanded")&&i.click(),n.classList.add("is-guideOpen"),e.setAttribute("aria-expanded","true");const r=".Page-guide a.Guide-close";(0,c.A)(r,()=>{document.querySelector(r).focus()}),A()},{capture:!0})}),(0,s.A)(".Guide-close",e=>{const n=e.closest(".Page");e.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),document.querySelector(".CIG-row.is-openPopup")?.classList.remove(".is-openPopup"),n.classList.remove("is-guideOpen");const o=n.querySelector(".Page-guideLink a");o.setAttribute("aria-expanded","false"),o.focus(),fetch(e.href)},{capture:!0})}),(0,s.A)('.Popup[name="edit-guide"] .ActionBar > button[name="action-save"]',e=>{e.addEventListener("click",()=>{let n=b(e).popup("source").frame("container")[0];n&&(n.classList.contains("Guide-embedded")&&(n=n.closest(".Guide")?.closest(".frame")),n&&n.parentNode?.removeChild(n))})}),(0,s.A)("a.CIG-guide",e=>{e.addEventListener("click",n=>{if(!document.querySelector(".Page").classList.contains("is-guideOpen"))return;n.preventDefault(),n.stopPropagation();const t=e.getAttribute("href"),o=t.substring(t.indexOf("?")+1),i=new URLSearchParams(o).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",n=>{const t=e.closest('div.Popup[name="edit-guide"]');if(!w(t))return;const o=t.parentElement.querySelector('div.Popup[name="guideField"]');o.parentElement.removeChild(o)})}),(0,s.A)('div.Popup[name="edit-guide"] button.closeButton',e=>{e.addEventListener("click",n=>{if(!w(e.closest('div.Popup[name="edit-guide"]')))return;const t=document.querySelectorAll("div.Page-guide>div.frame");if(!t.length)return;const i=document.querySelector(".Page");let r,a;if(t.length>1&&i.querySelector("div.Popup")?.dataset.href?(r=i.querySelector("div.Popup").dataset.href,a=t.item(t.length-1)):(r=document.querySelector(".Page").dataset.href,a=t.item(0)),!r)return;const s=new URLSearchParams;s.append("subject",r);const c=(0,o.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 n=document.querySelector("body main");let t=n;const o=n.querySelector(".ContentEdit");o&&(t=o.querySelector(".ContentEdit-left")??o);const i=n.querySelector(".main");i&&(t=i);const r=n.querySelector(":scope .SearchWidget-result");r&&(t=r);const a=n.querySelector(":scope > .SearchWidget .SearchResult-view");a&&(t=a),t&&(t.setAttribute("tabindex","-1"),t.focus({focusVisible:!0}))})}),window.addEventListener("keydown",e=>{if("Tab"!==e.key)return;const n=document.querySelector(".Admin-main"),t=document.querySelector(".content-edit"),o=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"]'),d=a?.includes("ContentSelector-search"),l=r?.matches('[name="queryField"]'),p=c||d||l,b=document.querySelector(".BulkWorkflow");if(!(p||o||i||t||n||r||b))return;const h=".searchFilter.searchFilter-record.SearchWidget-filter.is-record.is-multiple.searchFilter-multiple";if(b){const n=(0,M.q)(b);if(!n)return;(0,u.J)(e,[n])}else if(p){const n=r.querySelector(".SearchWidget-query"),t="none"===window.getComputedStyle(n).display;k(".Popup "+h,e),q(e,t,r)}else if(o&&!r)k(h,e),q(e,!1,document,!0);else if(i){const n=[(0,M.q)(i)].filter(e=>null!==e);(0,u.J)(e,n)}else if(s||!r&&t){const n=s?r:document,t=window.BRIGHTSPOT?.ui.cms.enableV5UI,o=[(0,M.l)(".Page-header",n),t?(0,M.l)("btu-nav-rail",n):null,t?(0,M.l)(".Page-guide",n):null,t?(0,M.l)(".Page-askAi",n):null,t?null:(0,M.l)(".popup-objectId-edit-heading.Link",n),t?null:(0,M.l)(".ContentEdit-title.breadcrumbs",n),t&&s?(0,M.l)(":scope > .Popup-content > .Popup-close",n):null,(0,M.l)(".ContentEdit-top",n),(0,M.l)(".ContentEdit-left",n),(0,M.l)(".ContentEditDrawer.is-open",n),(0,M.l)(".ContentEdit-preview:not([inert])",n),(0,M.l)(".ContentEdit-right.is-visible",n),(0,M.l)(".ContentEdit-toolbar",n),t?null:(0,M.l)(".Page-guide",n),t?null:(0,M.l)(".Page-askAi",n)].filter(e=>null!==e);(0,u.J)(e,o,!!s)}else if(n&&!r){const n=window.BRIGHTSPOT?.ui.cms.enableV5UI,t=[(0,M.l)(".Page-header",document),n?(0,M.l)("btu-nav-rail",document):null,n?(0,M.l)(".Page-guide",document):null,n?(0,M.l)(".Page-askAi",document):null,(0,M.l)('.frame.loaded[name$="Result"] > ul.pagination',document),(0,M.l)(".leftNav.Admin-nav .Widget-controls",document),(0,M.l)(".leftNav.Admin-nav .Widget-controls + ul.LinkTable",document),(0,M.l)('form[target$="Result"]',document),(0,M.l)('.leftNav.Admin-nav form[target="dashboardsResult"] + ul.LinkTable',document),(0,M.l)('.frame.loaded[name$="Result"] > ul.pagination + ul.LinkTable',document)].filter(e=>null!==e);(0,u.J)(e,t,!1)}else if(r){const n=[(0,M.q)(r)].filter(e=>null!==e);(0,u.J)(e,n)}})},15651(e,n,t){"use strict";t(57573),t(49371),t(96648);const o=function(){let e={},n=e.hasOwnProperty;return{subscribe:function(t,o){n.call(e,t)||(e[t]=[]);let i=e[t].push(o)-1;return{remove:function(){delete e[t][i]}}},publish:function(t,o){n.call(e,t)&&e[t].forEach(function(e){e(void 0!==o?o:{})})}}}();window.PubSub=o},53506(e,n,t){"use strict";t(49371),t(96648);var o=t(45055),i=t(17664);function r(e,n){if(e.querySelector(".Message.is-error"))return e.querySelector(".Message.is-error").textContent;const t=e.querySelector(".QueryField-keyword"),o=e.querySelector(".QueryField-queryString").textContent;let i,r,a="";t.textContent&&(a+='"'+t.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=n.closest(".CIG-row").querySelector(".CIG-label label"),a+=i||r.textContent;const c=e.querySelector(".SearchWidget-filter.searchFilter-visibilities"),d=c.querySelectorAll(".ComboInput-selected"),l=c.querySelectorAll('option[selected="selected"]');if((d.length>0||l.length>0&&!c.querySelector(".ComboInput-label"))&&(a+=" "+QF_VISIBILITIES+" ",d.length>0?d.forEach(e=>{a+=e.textContent+", "}):l.length>0&&!c.querySelector(".ComboInput-label")&&l.forEach(e=>{a+=e.textContent+", "}),a=a.substring(0,a.length-2)),o.match(/cms.content.publishDate/)){a+=" "+QF_PUBLISH_DATE+" ";const e={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"},n=o.match(/cms.content.publishDate greaterthanorequals \d+/),t=o.match(/cms.content.publishDate lessthanorequals \d+/);if(n){const t=n[0].match(/\d+/)[0],o=new Date(parseInt(t));a+=QF_PUBLISH_START+" "+o.toLocaleString(void 0,e)}if(n&&t&&(a+=" "+QF_CONJUNCTION+" "),t){const n=t[0].match(/\d+/)[0],o=new Date(parseInt(n));a+=QF_PUBLISH_END+" "+o.toLocaleString(void 0,e)}}return a}(0,o.A)(".QueryField input",e=>{e.closest(".CIG.TC").classList.add("is-query")}),(0,o.A)(".QueryField input[data-initialized]",e=>{!function(e){const n=document.createElement("div");n.classList.add("QueryField-toggle"),n.frame=e.frame,e.frame.queryToggle=n;const t=document.createElement("span");t.classList.add("QueryField-icon");const o=document.createElement("span");o.classList.add("QueryField-label"),e.closest(".CIG-row").appendChild(n),n.appendChild(o),n.appendChild(t),n.label=o}(e.closest(".QueryField"))}),(0,o.A)(".QueryField-frame .SearchWidget-result.loaded",e=>{const n=e.closest(".QueryField-frame"),t=n.queryToggle;t&&(t.label.textContent=r(e.closest(".widget-queryField"),t),t.closest(".QueryField-toggle.is-open")&&e.closest(".Popup.is-fromRight.popup-show").classList.add("is-visible")),n.style["z-index"]=(0,i.default)()}),(0,o.A)(".QueryField-button",e=>{e.addEventListener("click",n=>{n.preventDefault();const t=e.closest(".QueryField-frame").queryToggle,o=e.closest(".widget-queryField");if(t){t.label.textContent=r(o,t),t.classList.remove("is-open");const e=t.closest(".CIG-row")?.querySelector(".ComboInput")||t.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,o.A)(".QueryField-toggle",e=>{e.addEventListener("click",()=>{const n=e.frame;e.classList.add("is-open");const t=n.querySelector(".Popup.is-ready");t.classList.add("is-visible"),t.querySelector(".SearchWidget-query input")?.focus()})}),(0,o.A)(".widget-queryField > .SearchWidget-title",e=>{e.textContent="Edit Dynamic Query"})},31915(e,n,t){"use strict";t(49371),t(56673);var o=t(18101),i=t(60021),r=t(76394),a=t(26179),s=t(45055),c=t(97204);const d=window.BRIGHTSPOT?.ui.tooltips,l=d?.expandAll,p=d?.collapseAll;window.addEventListener("click",e=>{const n=e.target,t=n.closest(".RCIG-addSelect");if(t){const e=(0,i.A)(t,":scope > .ComboInput");e&&!e.contains(n)&&e.click()}}),(0,c.A)(".RCIG-list > .RCIG-item",e=>{(0,s.A)(e,":scope > .RCIG-title",n=>{n.role="button",n.ariaExpanded="false",n.ariaLabel=`${n.textContent}`,e.hasAttribute("data-empty")||(n.ariaExpanded="false",n.addEventListener("click",()=>{const t=!e.classList.contains("is-collapsed");n.ariaExpanded=t?"true":"false"}))})}),(0,c.A)(".RCIG",e=>{const n=e.querySelector(":scope > .RCIG-list");if(!n)return;let t=n.children.length;for(const e of n.children)(0,s.A)(e,":scope > .RCIG-title",n=>{n.role="button",n.ariaExpanded="false",n.ariaLabel=`${n.textContent}`,e.hasAttribute("data-empty")||(n.ariaExpanded="false",n.addEventListener("click",()=>{const t=!e.classList.contains("is-collapsed");n.ariaExpanded=t?"true":"false"}))});e.dataset.rcigSize=t;const i=e.previousElementSibling?.querySelector(".CIG-label label")?.textContent;let c=l,M=p;i&&(c+=` ${i}`,M+=` ${i}`),e.addEventListener("repeatable.add",()=>{e.dataset.rcigSize=++t,e.closest(".CIG-row")?.classList.add("is-expandable")}),e.addEventListener("repeatable.remove",()=>{e.dataset.rcigSize=--t,0===t&&e.closest(".CIG-row")?.classList.remove("is-expandable")});const u=e.querySelector(":scope > ol, :scope > ul");if(Array.from(u.children).some(e=>!e.hasAttribute("data-empty"))){e.addEventListener("repeatable.toggle",()=>{const e=n.querySelectorAll(":scope > li.is-collapsed").length;0===e?(i.classList.add("is-expanded"),i.title=M,i.setAttribute("aria-label",M)):e===t&&(i.classList.remove("is-expanded"),i.title=c,i.setAttribute("aria-label",c))});const i=(0,o.A)("button",{className:"RCIG-expandAll",type:"button",title:c,"aria-label":c,onclick:n=>{const t=i.classList.toggle("is-expanded");t?(i.title=M,i.setAttribute("aria-label",M),s.textContent=d?.expandedAll):(i.title=c,i.setAttribute("aria-label",c),s.textContent=d?.collapsedAll);for(const n of(0,r.A)(e,":scope > .RCIG-list > .RCIG-item > .RCIG-title")){const e=n.parentElement.classList.contains("is-collapsed");(t&&e||!t&&!e)&&n.click()}}}),s=(0,o.A)("div",{className:"screen-reader-only","aria-live":"polite"});0===t?i.classList.add("is-expanded"):e.closest(".CIG-row")?.classList.add("is-expandable"),(0,a.A)(s,e),(0,a.A)(i,e)}})},61818(e,n,t){"use strict";t(86634),t(57573),t(49371),t(42723),t(96648),t(56065);var o=t(45055),i=t(18101),r=t(97204),a=t(88630);(0,o.A)(".richtext",e=>{const n=e.closest("div");n.style.position="relative";const t=e.getBoundingClientRect().height,o=(0,i.A)("div",{className:"ProseMirror-loader"});o.style.minHeight=`${t}px`,n.appendChild(o)});const s=new Map;RICH_TEXT_ELEMENTS.forEach(e=>{let n=e.tag,t="";const o=/[\u0030-\u0039\u0061-\u007A\u0041-\u005A-]/g;[...n].forEach(e=>{let n=e;e.match(o)||(n=`--${e.charCodeAt(0)}--`),t+=n}),s.set(n,t)}),window.RICH_TEXT_ELEMENTS_PM=RICH_TEXT_ELEMENTS.map(e=>{if(e.tag=s.get(e.tag),e.context){const n=[];e.context.forEach(e=>{let t=e;t&&(t=s.get(e)),n.push(t)}),e.context=n}return e}),(0,r.A)(".richtext",async e=>{const{RTE:n}=await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(4582),t.e(2825),t.e(9360),t.e(4795),t.e(1386)]).then(t.bind(t,60252)),o=e.getAttribute("data-rte-toolbar");let i=RICH_TEXT_TOOLBARS[o];if(!window.BRIGHTSPOT?.ai?.AI_CHAT_ENABLED){const e=["rte2-toolbar-track-ai","rte2-toolbar-ai-inline"];i=i.filter(n=>!e.includes(n.className))}const r=e.getAttribute("data-rte-lines"),a="true"===e.getAttribute("data-inline"),c=e.getAttribute("data-user"),d=e.getAttribute("data-user-id");let l=e.getAttribute("data-rte-tags");if(l)try{l=JSON.parse(l).map(e=>s.get(e))}catch(e){console.log(e)}const p=e.getAttribute("name"),M="true"===e.getAttribute("data-collab"),u=new n(e,i,a,c,d,l,p,M,s,parseInt(r,10)||1,RICH_TEXT_ELEMENTS_PM);u.init(),e.rte=u,e.dispatchEvent(new CustomEvent("brightspot.rte.init",{bubbles:!0,detail:{rte:u}}))}),(0,o.A)(".RichTextEditor-uploadComplete",e=>{let n=e.dataset.html;if(!n)return;const t=a(e),o=t.popup("source");if(!o)return;const i=o.attr("data-event-id");n=n.replace(/<br>/g,"");const r=document.createElement("div");r.innerHTML=n;const s=r.children,c=[];[...s].forEach(e=>{const n=[...e.attributes].reduce((e,n)=>(e[n.name]=n.value,e),{});c.push({label:e.innerText,data:n,tag:e.tagName.toLowerCase()})}),PubSub.publish(i,c),t.popup("close")})},24341(e,n,t){"use strict";t(86634),t(49371),t(96648),t(56065);var o=t(45055);(0,o.A)(".SearchFields-input",e=>{const n=window.BRIGHTSPOT?.ui.tooltips;e.setAttribute("title",e.closest(".SearchFields-hide")?n.fieldSelect:n.fieldHide),e.addEventListener("keydown",i),e.addEventListener("click",r)}),(0,o.A)(".SearchFields-filter",e=>{e.addEventListener("keydown",i)});const i=e=>{"Enter"===e.key&&e.preventDefault()},r=e=>{e.preventDefault(),e.stopPropagation();const n=e.target.matches("input")?e.target:e.target.querySelector("input"),t=n.closest(".SearchFields"),o=n.closest("li"),i=o.closest("div");let s,c,d=o.nextSibling;if(t.querySelector(".SearchFields-tab-container")){const e=t.querySelector(".SearchFields-tab-container").querySelector("ul").querySelector(".is-selected").classList[0].toLowerCase();s=t.querySelector(`.SearchFields-container-${e} > .SearchFields-displayContainer > .SearchFields-displayTitle > ul`),c=t.querySelector(`.SearchFields-container-${e} > .SearchFields-hide`)}else s=t.querySelector(".SearchFields-displayTitle > ul"),c=t.querySelector(".SearchFields-hide > ul");if(i.classList.contains("SearchFields-hide")){const e=o.cloneNode(!0),n=e.querySelector(".SearchFields-input");n.addEventListener("click",r),n.setAttribute("title",window.BRIGHTSPOT?.ui.tooltips.fieldHide),s.appendChild(e);const t=s?.querySelector(":scope > li .SearchFields-input");if(d)if(d.classList.contains("is-disabled"))for(;d?.classList.contains("is-disabled");)d=d.nextSibling,d?d.classList.contains("is-disabled")||d.querySelector("input")?.focus():t?.focus();else d.querySelector("input")?.focus();else t?.focus()}else d?d.querySelector("input")?.focus():t?.querySelector(".actions > button")?.focus(),o.remove();a(n.value,c)},a=(e,n)=>{const t=n.querySelector(`input[value="${e}"]`),o=t?.closest("li");o?.classList.contains("is-disabled")&&t.addEventListener("click",r),o?.classList.toggle("is-disabled"),t?.toggleAttribute("disabled"),o?.querySelector(".SearchFields-drag")?.toggleAttribute("disabled")};(0,o.A)(".SearchFields .SearchFields-filter",e=>{e.addEventListener("input",n=>{const t=e.closest(".SearchFields-hide"),o=new RegExp(n.target.value.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");t.querySelectorAll("label").forEach(e=>{const n=e.parentElement;o.test(e.getAttribute("data-display-name"))?n.style.display="flex":n.style.display="none"}),t.querySelectorAll(".SearchFields-subheading").forEach(e=>{const n=e.nextSibling;n.querySelector('li[style*="display: flex"]')?(e.style.display="flex",n.style.display="block"):(e.style.display="none",n.style.display="none")})})}),(0,o.A)(".SearchFields .SearchFields-tab-container .SearchFields-tab-ul",e=>{const n=e.closest(".SearchFields");n.classList.add("has-tabs");const t=[...e.children].filter(e=>e.classList.contains("is-selected"))[0],o=[...e.children].filter(e=>!e.classList.contains("is-selected"))[0],i=n.querySelector(".SearchFields-container-"+t.classList[0].toLowerCase()),r=n.querySelector(".SearchFields-container-"+o.classList[0].toLowerCase());t.addEventListener("click",()=>{s(t,o,i,r)}),o.addEventListener("click",()=>{s(o,t,i,r)})}),(0,o.A)(".SearchFields-container",e=>{const n=e.querySelectorAll(".SearchFields-hide .SearchFields-input"),t=e.querySelectorAll(".SearchFields-displayContainer .SearchFields-input"),o=Array.from(t).map(e=>e.value);o&&n.forEach(e=>{if(o.includes(e.value)){const n=e.closest(".RCIG-item");n?.classList.add("is-disabled"),e.setAttribute("disabled",""),n?.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",n=>{if(n.detail&&(n=n.detail),!n.item)return;const t=n.item.querySelector(".SearchFields-input"),o=t.value,i=n.from.classList.contains("is-clonable"),s=n.to.classList.contains("is-clonable"),c=e.closest(".SearchFields-hide");setTimeout(()=>{if(t.addEventListener("click",r),s&&i){n.item.remove();const e=c?.querySelector(`.SearchFields-input[value="${o}"]`).closest("li"),t=e.querySelector(".SearchFields-input");e.addEventListener("animationend",()=>{e.classList.remove("is-added")}),e.classList.add("is-added"),t.addEventListener("click",r),t.checked=!1}else i?(t.checked=!0,a(o,n.from)):c?.querySelectorAll(`.SearchFields-input[value="${o}"]`).forEach(e=>{const t=e.closest("li");t.classList.contains("is-disabled")&&(n.item.remove(),a(o,c),e.scrollIntoView({block:"center"}),e.checked=!1,t.addEventListener("animationend",()=>{t.classList.remove("is-added")}),t.classList.add("is-added"))})},0)})})});const s=(e,n,t,o)=>{e.classList.contains("is-selected")||(e.classList.toggle("is-selected"),n.classList.toggle("is-selected"),o.classList.toggle("is-hidden"),t.classList.toggle("is-hidden"))}},3689(e,n,t){"use strict";t(86634),t(49371),t(96648);var o=t(18101),i=t(76394),r=t(39242),a=t(45055),s=t(85211),c=t.n(s),d=t(93832),l=t(79365),p=t(17664);const M=window.BRIGHTSPOT?.ui.tooltips;function u(e,n){e.preventDefault(),e.stopPropagation();const t=e.target.closest(".SearchWidget-form"),o=t.querySelector(`.searchFiltersRest input[name="${n}"]`),i=t.querySelector('input[name="view"]'),r=t.querySelector(".SearchResult-views li.selected a").dataset.view;o.value=e.target.value,i.value=r,o.shadowField=n,o.dispatchEvent(new Event("change",{bubbles:!0}))}(0,a.A)(".searchResult-checkAll",e=>{const n=e.closest("table");if(n){const t=(0,i.A)(n,':scope > tbody input[type="checkbox"]'),o=()=>{const o=(0,i.A)(n,':scope > tbody input[type="checkbox"]:checked');e.checked=t.length>0&&o.length===t.length};for(const e of t)e.addEventListener("click",e=>{o()});e.addEventListener("click",n=>{const o=e.checked,i="data-frame-"+(o?"check":"uncheck");let r="";for(const n of t)n.checked=o,e.getAttribute(i).includes(n.value)||(r+=`&id=${encodeURIComponent(n.value)}`);e.setAttribute(i,e.getAttribute(i)+r)}),o()}}),(0,a.A)(".SearchResult-view > .SearchResult-actions.loaded",e=>{const n=e.closest(".SearchResult-view"),t=(0,o.A)("div",{className:"SearchResult-actions-wrapper"});e.querySelectorAll('[role="menuitem"]').forEach(e=>e.setAttribute("tabindex","-1"));const i=(0,o.A)("button",{className:"SearchResult-actions-toggle",id:"SearchResult-actions-toggle",title:M.actions?.actions,"aria-haspopup":"menu","aria-label":M.actions?.searchResult,"aria-expanded":"false",onclick:()=>{(0,l.H0)(e,i),(0,l.AM)(e,i)}});if(n.prepend(t),t.appendChild(i),t.appendChild(e),(0,l.D1)(e,i),n.closest('.SearchWidget[name="searchAdvancedFull"]'))return;const r=n.querySelector('.SearchResult-action-link[href*="/searchAdvancedFull"]'),a=(0,o.A)("button",{className:"SearchResult-fullscreen",title:M.fullScreenSearch,"aria-label":M.fullScreen,onclick:e=>{r.click()}});t.appendChild(a)}),(0,a.A)(".SearchResult-actions .SearchResult-selectionReset",e=>{e.addEventListener("click",()=>{const n=e.closest(".SearchResult-actions-wrapper");n?.querySelector(".SearchResult-actions-toggle")?.focus()})}),(0,a.A)(".SearchResult-views",e=>{const n=e.closest(".SearchWidget"),t=n?.querySelector(".searchFiltersRest");if(t){const n=t.querySelector('input[name="view"]');n&&e.querySelectorAll("[data-view]").forEach(e=>{e.addEventListener("click",()=>n.value=e.dataset.view)})}}),(0,a.A)(".SearchResult-images",e=>{const n=e.closest(".SearchWidget-form"),t=n?.querySelector('.searchFiltersRest input[name="iz"]'),i=e.closest(".SearchResult-list"),a=t?.value||d.A.get("BSP.SearchResult.imageHeight")||20;e.setAttribute("data-height",a),i&&(0,r.A)((0,o.A)("div",{className:"SearchResult-imageHeightInput"},(0,o.A)("input",{type:"range",title:M.imageHeight,min:1,max:100,step:1,value:a,"aria-label":M.imageHeight,"shadow-field":t?.name,oninput:({target:{value:n}})=>{e.setAttribute("data-height",n),d.A.set("BSP.SearchResult.imageHeight",n)},onmouseup:e=>{t&&a!==e.target.value&&u(e,t.name)}})),i)}),(0,a.A)(".SearchResult-board-field",e=>{e.addEventListener("change",n=>{u(n,e.name)})}),(0,a.A)(".SearchResult [data-highlight]",e=>{const n=e.dataset.highlight;if(n){const t=e.matches("table")&&e.querySelector("tbody")||e;new(c())(t).mark(n.trim().split(/\s+/),{className:"SearchResult-highlight"})}}),(0,a.A)('.Popup[name="bulkArchive"]',e=>{const n=e.parentNode.querySelector('.Popup[name="miscSearch"] .queryRestrictions'),t=e.querySelector(".closeButton");t&&t.addEventListener("click",function(){if(e.querySelector(".message.is-success")){let t=new CustomEvent("submit",{bubbles:!0});n.dispatchEvent(t),e.parentNode.removeChild(e)}})}),(0,a.A)('.Popup[name="miscSearch"] .SearchResult-list',e=>{e.addEventListener("click",function(e){const n=e.target.closest('a[href*="/edit.jsp"]');if(!n)return;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||0!==e.button)return;e.preventDefault();const t=(0,o.A)("div",{id:"searchResult-loader-overlay",className:"searchResult-loader-overlay"},(0,o.A)("span",{className:"searchResult-loader-spinner"}));t.style.zIndex=(0,p.default)(),document.body.appendChild(t),window.location=n.href})})},47025(e,n,t){"use strict";var o=t(45055),i=t(28211);(0,o.A)(".action-share",async e=>{const n=e.closest(".PreviewFrame");if(!n)return;const t=n.querySelector(".PreviewFrame-typeForm");let i=null;if(t){const e=t.querySelector('select[name="previewType"]');i=e.options[e.selectedIndex].value}e.addEventListener("click",n=>{let t=e.href;return!t||(i&&(t=t+"&defaultPreviewTypeId="+encodeURIComponent(i)),e.href=t,!0)}),(0,o.A)(".PreviewFrame-iFrameControlsForm",async n=>{n.addEventListener("submit",t=>{let o=e.getAttribute("data-original-href");if(o||(o=e.href,e.setAttribute("data-original-href",o)),!o)return!0;let i=new URLSearchParams(new FormData(n)).toString();return i&&(o=o+"&="+i),e.href=o,!0})})}),(0,o.A)(".SharePreview",async e=>{const n=e.querySelector(".PreviewFrame"),t=new i.A(n);t.isVisible=!0,t.updatePreview()})},74227(e,n,t){"use strict";function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function i(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},r.apply(null,arguments)}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach(function(n){i(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}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 d(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}t.d(n,{Ts:()=>Cn}),t(86634),t(57573),t(49371),t(42723),t(26780),t(96648),t(56673);var l=d(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),p=d(/Edge/i),M=d(/firefox/i),u=d(/safari/i)&&!d(/chrome/i)&&!d(/android/i),b=d(/iP(ad|od|hone)/i),h=d(/chrome/i)&&d(/android/i),z={capture:!1,passive:!1};function O(e,n,t){e.addEventListener(n,t,!l&&z)}function f(e,n,t){e.removeEventListener(n,t,!l&&z)}function m(e,n){if(n){if(">"===n[0]&&(n=n.substring(1)),e)try{if(e.matches)return e.matches(n);if(e.msMatchesSelector)return e.msMatchesSelector(n);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(n)}catch(e){return!1}return!1}}function g(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function A(e,n,t,o){if(e){t=t||document;do{if(null!=n&&(">"===n[0]?e.parentNode===t&&m(e,n):m(e,n))||o&&e===t)return e;if(e===t)break}while(e=g(e))}return null}var w,v=/\s+/g;function q(e,n,t){if(e&&n)if(e.classList)e.classList[t?"add":"remove"](n);else{var o=(" "+e.className+" ").replace(v," ").replace(" "+n+" "," ");e.className=(o+(t?" "+n:"")).replace(v," ")}}function k(e,n,t){var o=e&&e.style;if(o){if(void 0===t)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(t=e.currentStyle),void 0===n?t:t[n];n in o||-1!==n.indexOf("webkit")||(n="-webkit-"+n),o[n]=t+("string"==typeof t?"":"px")}}function _(e,n){var t="";if("string"==typeof e)t=e;else do{var o=k(e,"transform");o&&"none"!==o&&(t=o+" "+t)}while(!n&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function y(e,n,t){if(e){var o=e.getElementsByTagName(n),i=0,r=o.length;if(t)for(;i<r;i++)t(o[i],i);return o}return[]}function W(){return document.scrollingElement||document.documentElement}function x(e,n,t,o,i){if(e.getBoundingClientRect||e===window){var r,a,s,c,d,p,M;if(e!==window&&e.parentNode&&e!==W()?(a=(r=e.getBoundingClientRect()).top,s=r.left,c=r.bottom,d=r.right,p=r.height,M=r.width):(a=0,s=0,c=window.innerHeight,d=window.innerWidth,p=window.innerHeight,M=window.innerWidth),(n||t)&&e!==window&&(i=i||e.parentNode,!l))do{if(i&&i.getBoundingClientRect&&("none"!==k(i,"transform")||t&&"static"!==k(i,"position"))){var u=i.getBoundingClientRect();a-=u.top+parseInt(k(i,"border-top-width")),s-=u.left+parseInt(k(i,"border-left-width")),c=a+r.height,d=s+r.width;break}}while(i=i.parentNode);if(o&&e!==window){var b=_(i||e),h=b&&b.a,z=b&&b.d;b&&(c=(a/=z)+(p/=z),d=(s/=h)+(M/=h))}return{top:a,left:s,bottom:c,right:d,width:M,height:p}}}function L(e,n,t){for(var o=S(e,!0),i=x(e)[n];o;){var r=x(o)[t];if(!("top"===t||"left"===t?i>=r:i<=r))return o;if(o===W())break;o=S(o,!1)}return!1}function C(e,n,t,o){for(var i=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Xe.ghost&&(o||a[r]!==Xe.dragged)&&A(a[r],t.draggable,e,!1)){if(i===n)return a[r];i++}r++}return null}function R(e,n){for(var t=e.lastElementChild;t&&(t===Xe.ghost||"none"===k(t,"display")||n&&!m(t,n));)t=t.previousElementSibling;return t||null}function N(e,n){var t=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Xe.clone||n&&!m(e,n)||t++;return t}function B(e){var n=0,t=0,o=W();if(e)do{var i=_(e),r=i.a,a=i.d;n+=e.scrollLeft*r,t+=e.scrollTop*a}while(e!==o&&(e=e.parentNode));return[n,t]}function S(e,n){if(!e||!e.getBoundingClientRect)return W();var t=e,o=!1;do{if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=k(t);if(t.clientWidth<t.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||t.clientHeight<t.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!t.getBoundingClientRect||t===document.body)return W();if(o||n)return t;o=!0}}}while(t=t.parentNode);return W()}function T(e,n){return Math.round(e.top)===Math.round(n.top)&&Math.round(e.left)===Math.round(n.left)&&Math.round(e.height)===Math.round(n.height)&&Math.round(e.width)===Math.round(n.width)}function E(e,n){return function(){if(!w){var t=arguments;1===t.length?e.call(this,t[0]):e.apply(this,t),w=setTimeout(function(){w=void 0},n)}}}function D(e,n,t){e.scrollLeft+=n,e.scrollTop+=t}function j(e){var n=window.Polymer,t=window.jQuery||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):t?t(e).clone(!0)[0]:e.cloneNode(!0)}function P(e,n){k(e,"position","absolute"),k(e,"top",n.top),k(e,"left",n.left),k(e,"width",n.width),k(e,"height",n.height)}function X(e){k(e,"position",""),k(e,"top",""),k(e,"left",""),k(e,"width",""),k(e,"height","")}function H(e,n,t){var o={};return Array.from(e.children).forEach(function(i){var r,a,s,c;if(A(i,n.draggable,e,!1)&&!i.animated&&i!==t){var d=x(i);o.left=Math.min(null!==(r=o.left)&&void 0!==r?r:1/0,d.left),o.top=Math.min(null!==(a=o.top)&&void 0!==a?a:1/0,d.top),o.right=Math.max(null!==(s=o.right)&&void 0!==s?s:-1/0,d.right),o.bottom=Math.max(null!==(c=o.bottom)&&void 0!==c?c:-1/0,d.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var Y="Sortable"+(new Date).getTime();var I=[],F={initializeByDefault:!0},V={mount:function(e){for(var n in F)F.hasOwnProperty(n)&&!(n in e)&&(e[n]=F[n]);I.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),I.push(e)},pluginEvent:function(e,n,t){var o=this;this.eventCanceled=!1,t.cancel=function(){o.eventCanceled=!0};var i=e+"Global";I.forEach(function(o){n[o.pluginName]&&(n[o.pluginName][i]&&n[o.pluginName][i](s({sortable:n},t)),n.options[o.pluginName]&&n[o.pluginName][e]&&n[o.pluginName][e](s({sortable:n},t)))})},initializePlugins:function(e,n,t,o){for(var i in I.forEach(function(o){var i=o.pluginName;if(e.options[i]||o.initializeByDefault){var a=new o(e,n,e.options);a.sortable=e,a.options=e.options,e[i]=a,r(t,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,n){var t={};return I.forEach(function(o){"function"==typeof o.eventProperties&&r(t,o.eventProperties.call(n[o.pluginName],e))}),t},modifyOption:function(e,n,t){var o;return I.forEach(function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[n]&&(o=i.optionListeners[n].call(e[i.pluginName],t))}),o}};function G(e){var n=e.sortable,t=e.rootEl,o=e.name,i=e.targetEl,r=e.cloneEl,a=e.toEl,c=e.fromEl,d=e.oldIndex,M=e.newIndex,u=e.oldDraggableIndex,b=e.newDraggableIndex,h=e.originalEvent,z=e.putSortable,O=e.extraEventProperties;if(n=n||t&&t[Y]){var f,m=n.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||l||p?(f=document.createEvent("Event")).initEvent(o,!0,!0):f=new CustomEvent(o,{bubbles:!0,cancelable:!0}),f.to=a||t,f.from=c||t,f.item=i||t,f.clone=r,f.oldIndex=d,f.newIndex=M,f.oldDraggableIndex=u,f.newDraggableIndex=b,f.originalEvent=h,f.pullMode=z?z.lastPutMode:void 0;var A=s(s({},O),V.getEventProperties(o,n));for(var w in A)f[w]=A[w];t&&t.dispatchEvent(f),m[g]&&m[g].call(n,f)}}var U=["evt"],$=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=t.evt,i=function(e,n){if(null==e)return{};var t,o,i=function(e,n){if(null==e)return{};var t={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==n.indexOf(o))continue;t[o]=e[o]}return t}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)t=r[o],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(t,U);V.pluginEvent.bind(Xe)(e,n,s({dragEl:K,parentEl:Z,ghostEl:Q,rootEl:ee,nextEl:ne,lastDownEl:te,cloneEl:oe,cloneHidden:ie,dragStarted:Oe,putSortable:le,activeSortable:Xe.active,originalEvent:o,oldIndex:re,oldDraggableIndex:se,newIndex:ae,newDraggableIndex:ce,hideGhostForTarget:Ee,unhideGhostForTarget:De,cloneNowHidden:function(){ie=!0},cloneNowShown:function(){ie=!1},dispatchSortableEvent:function(e){J({sortable:n,name:e,originalEvent:o})}},i))};function J(e){G(s({putSortable:le,cloneEl:oe,targetEl:K,rootEl:ee,oldIndex:re,oldDraggableIndex:se,newIndex:ae,newDraggableIndex:ce},e))}var K,Z,Q,ee,ne,te,oe,ie,re,ae,se,ce,de,le,pe,Me,ue,be,he,ze,Oe,fe,me,ge,Ae,we=!1,ve=!1,qe=[],ke=!1,_e=!1,ye=[],We=!1,xe=[],Le="undefined"!=typeof document,Ce=b,Re=p||l?"cssFloat":"float",Ne=Le&&!h&&!b&&"draggable"in document.createElement("div"),Be=function(){if(Le){if(l)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Se=function(e,n){var t=k(e),o=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),i=C(e,0,n),r=C(e,1,n),a=i&&k(i),s=r&&k(r),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+x(i).width,d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+x(r).width;if("flex"===t.display)return"column"===t.flexDirection||"column-reverse"===t.flexDirection?"vertical":"horizontal";if("grid"===t.display)return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var l="left"===a.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==l?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=o&&"none"===t[Re]||r&&"none"===t[Re]&&c+d>o)?"vertical":"horizontal"},Te=function(e){function n(e,t){return function(o,i,r,a){var s=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==e&&(t||s))return!0;if(null==e||!1===e)return!1;if(t&&"clone"===e)return e;if("function"==typeof e)return n(e(o,i,r,a),t)(o,i,r,a);var c=(t?o:i).options.group.name;return!0===e||"string"==typeof e&&e===c||e.join&&e.indexOf(c)>-1}}var t={},o=e.group;o&&"object"==c(o)||(o={name:o}),t.name=o.name,t.checkPull=n(o.pull,!0),t.checkPut=n(o.put),t.revertClone=o.revertClone,e.group=t},Ee=function(){!Be&&Q&&k(Q,"display","none")},De=function(){!Be&&Q&&k(Q,"display","")};Le&&!h&&document.addEventListener("click",function(e){if(ve)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ve=!1,!1},!0);var je=function(e){if(K){e=e.touches?e.touches[0]:e;var n=(i=e.clientX,r=e.clientY,qe.some(function(e){var n=e[Y].options.emptyInsertThreshold;if(n&&!R(e)){var t=x(e),o=i>=t.left-n&&i<=t.right+n,s=r>=t.top-n&&r<=t.bottom+n;return o&&s?a=e:void 0}}),a);if(n){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);t.target=t.rootEl=n,t.preventDefault=void 0,t.stopPropagation=void 0,n[Y]._onDragOver(t)}}var i,r,a},Pe=function(e){K&&K.parentNode[Y]._isOutsideThisEl(e.target)};function Xe(e,n){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=n=r({},n),e[Y]=this;var t,o,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 Se(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,n){e.setData("Text",n.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!==Xe.supportPointer&&"PointerEvent"in window&&(!u||b),emptyInsertThreshold:5};for(var a in V.initializePlugins(this,e,i),i)!(a in n)&&(n[a]=i[a]);for(var c in Te(n),this)"_"===c.charAt(0)&&"function"==typeof this[c]&&(this[c]=this[c].bind(this));this.nativeDraggable=!n.forceFallback&&Ne,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?O(e,"pointerdown",this._onTapStart):(O(e,"mousedown",this._onTapStart),O(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(O(e,"dragover",this),O(e,"dragenter",this)),qe.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),r(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(e){if("none"!==k(e,"display")&&e!==Xe.ghost){o.push({target:e,rect:x(e)});var n=s({},o[o.length-1].rect);if(e.thisAnimationDuration){var t=_(e,!0);t&&(n.top-=t.f,n.left-=t.e)}e.fromRect=n}})},addAnimationState:function(e){o.push(e)},removeAnimationState:function(e){o.splice(function(e,n){for(var t in e)if(e.hasOwnProperty(t))for(var o in n)if(n.hasOwnProperty(o)&&n[o]===e[t][o])return Number(t);return-1}(o,{target:e}),1)},animateAll:function(e){var n=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof e&&e());var i=!1,r=0;o.forEach(function(e){var t=0,o=e.target,a=o.fromRect,s=x(o),c=o.prevFromRect,d=o.prevToRect,l=e.rect,p=_(o,!0);p&&(s.top-=p.f,s.left-=p.e),o.toRect=s,o.thisAnimationDuration&&T(c,s)&&!T(a,s)&&(l.top-s.top)/(l.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(t=function(e,n,t,o){return Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))/Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))*o.animation}(l,c,d,n.options)),T(s,a)||(o.prevFromRect=a,o.prevToRect=s,t||(t=n.options.animation),n.animate(o,l,s,t)),t&&(i=!0,r=Math.max(r,t),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout(function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null},t),o.thisAnimationDuration=t)}),clearTimeout(t),i?t=setTimeout(function(){"function"==typeof e&&e()},r):"function"==typeof e&&e(),o=[]},animate:function(e,n,t,o){if(o){k(e,"transition",""),k(e,"transform","");var i=_(this.el),r=i&&i.a,a=i&&i.d,s=(n.left-t.left)/(r||1),c=(n.top-t.top)/(a||1);e.animatingX=!!s,e.animatingY=!!c,k(e,"transform","translate3d("+s+"px,"+c+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),k(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),k(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){k(e,"transition",""),k(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},o)}}}))}function He(e,n,t,o,i,r,a,s){var c,d,M=e[Y],u=M.options.onMove;return!window.CustomEvent||l||p?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=n,c.from=e,c.dragged=t,c.draggedRect=o,c.related=i||n,c.relatedRect=r||x(n),c.willInsertAfter=s,c.originalEvent=a,e.dispatchEvent(c),u&&(d=u.call(M,c,a)),d}function Ye(e){e.draggable=!1}function Ie(){We=!1}function Fe(e){for(var n=e.tagName+e.className+e.src+e.href+e.textContent,t=n.length,o=0;t--;)o+=n.charCodeAt(t);return o.toString(36)}function Ve(e){return setTimeout(e,0)}function Ge(e){return clearTimeout(e)}Xe.prototype={constructor:Xe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(fe=null)},_getDirection:function(e,n){return"function"==typeof this.options.direction?this.options.direction.call(this,e,n,K):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,t=this.el,o=this.options,i=o.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,d=o.filter;if(function(e){xe.length=0;for(var n=e.getElementsByTagName("input"),t=n.length;t--;){var o=n[t];o.checked&&xe.push(o)}}(t),!K&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||o.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!u||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=A(s,o.draggable,t,!1))&&s.animated||te===s)){if(re=N(s),se=N(s,o.draggable),"function"==typeof d){if(d.call(this,e,s,this))return J({sortable:n,rootEl:c,name:"filter",targetEl:s,toEl:t,fromEl:t}),$("filter",n,{evt:e}),void(i&&e.preventDefault())}else if(d&&(d=d.split(",").some(function(o){if(o=A(c,o.trim(),t,!1))return J({sortable:n,rootEl:o,name:"filter",targetEl:s,fromEl:t,toEl:t}),$("filter",n,{evt:e}),!0})))return void(i&&e.preventDefault());o.handle&&!A(c,o.handle,t,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,n,t){var o,i=this,r=i.el,a=i.options,s=r.ownerDocument;if(t&&!K&&t.parentNode===r){var c=x(t);if(ee=r,Z=(K=t).parentNode,ne=K.nextSibling,te=t,de=a.group,Xe.dragged=K,pe={target:K,clientX:(n||e).clientX,clientY:(n||e).clientY},he=pe.clientX-c.left,ze=pe.clientY-c.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,K.style["will-change"]="all",o=function(){$("delayEnded",i,{evt:e}),Xe.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!M&&i.nativeDraggable&&(K.draggable=!0),i._triggerDragStart(e,n),J({sortable:i,name:"choose",originalEvent:e}),q(K,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){y(K,e.trim(),Ye)}),O(s,"dragover",je),O(s,"mousemove",je),O(s,"touchmove",je),a.supportPointer?(O(s,"pointerup",i._onDrop),!this.nativeDraggable&&O(s,"pointercancel",i._onDrop)):(O(s,"mouseup",i._onDrop),O(s,"touchend",i._onDrop),O(s,"touchcancel",i._onDrop)),M&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),$("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!n||this.nativeDraggable&&(p||l))o();else{if(Xe.eventCanceled)return void this._onDrop();a.supportPointer?(O(s,"pointerup",i._disableDelayedDrag),O(s,"pointercancel",i._disableDelayedDrag)):(O(s,"mouseup",i._disableDelayedDrag),O(s,"touchend",i._disableDelayedDrag),O(s,"touchcancel",i._disableDelayedDrag)),O(s,"mousemove",i._delayedDragTouchMoveHandler),O(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&O(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Ye(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,n){n=n||"touch"==e.pointerType&&e,!this.nativeDraggable||n?this.options.supportPointer?O(document,"pointermove",this._onTouchMove):O(document,n?"touchmove":"mousemove",this._onTouchMove):(O(K,"dragend",this),O(ee,"dragstart",this._onDragStart));try{document.selection?Ve(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,n){if(we=!1,ee&&K){$("dragStarted",this,{evt:n}),this.nativeDraggable&&O(document,"dragover",Pe);var t=this.options;!e&&q(K,t.dragClass,!1),q(K,t.ghostClass,!0),Xe.active=this,e&&this._appendGhost(),J({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Me){this._lastX=Me.clientX,this._lastY=Me.clientY,Ee();for(var e=document.elementFromPoint(Me.clientX,Me.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Me.clientX,Me.clientY))!==n;)n=e;if(K.parentNode[Y]._isOutsideThisEl(e),n)do{if(n[Y]&&n[Y]._onDragOver({clientX:Me.clientX,clientY:Me.clientY,target:e,rootEl:n})&&!this.options.dragoverBubble)break;e=n}while(n=g(n));De()}},_onTouchMove:function(e){if(pe){var n=this.options,t=n.fallbackTolerance,o=n.fallbackOffset,i=e.touches?e.touches[0]:e,r=Q&&_(Q,!0),a=Q&&r&&r.a,s=Q&&r&&r.d,c=Ce&&Ae&&B(Ae),d=(i.clientX-pe.clientX+o.x)/(a||1)+(c?c[0]-ye[0]:0)/(a||1),l=(i.clientY-pe.clientY+o.y)/(s||1)+(c?c[1]-ye[1]:0)/(s||1);if(!Xe.active&&!we){if(t&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<t)return;this._onDragStart(e,!0)}if(Q){r?(r.e+=d-(ue||0),r.f+=l-(be||0)):r={a:1,b:0,c:0,d:1,e:d,f:l};var p="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");k(Q,"webkitTransform",p),k(Q,"mozTransform",p),k(Q,"msTransform",p),k(Q,"transform",p),ue=d,be=l,Me=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Q){var e=this.options.fallbackOnBody?document.body:ee,n=x(K,!0,Ce,!0,e),t=this.options;if(Ce){for(Ae=e;"static"===k(Ae,"position")&&"none"===k(Ae,"transform")&&Ae!==document;)Ae=Ae.parentNode;Ae!==document.body&&Ae!==document.documentElement?(Ae===document&&(Ae=W()),n.top+=Ae.scrollTop,n.left+=Ae.scrollLeft):Ae=W(),ye=B(Ae)}q(Q=K.cloneNode(!0),t.ghostClass,!1),q(Q,t.fallbackClass,!0),q(Q,t.dragClass,!0),k(Q,"transition",""),k(Q,"transform",""),k(Q,"box-sizing","border-box"),k(Q,"margin",0),k(Q,"top",n.top),k(Q,"left",n.left),k(Q,"width",n.width),k(Q,"height",n.height),k(Q,"opacity","0.8"),k(Q,"position",Ce?"absolute":"fixed"),k(Q,"zIndex","100000"),k(Q,"pointerEvents","none"),Xe.ghost=Q,e.appendChild(Q),k(Q,"transform-origin",he/parseInt(Q.style.width)*100+"% "+ze/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(e,n){var t=this,o=e.dataTransfer,i=t.options;$("dragStart",this,{evt:e}),Xe.eventCanceled?this._onDrop():($("setupClone",this),Xe.eventCanceled||((oe=j(K)).removeAttribute("id"),oe.draggable=!1,oe.style["will-change"]="",this._hideClone(),q(oe,this.options.chosenClass,!1),Xe.clone=oe),t.cloneId=Ve(function(){$("clone",t),Xe.eventCanceled||(t.options.removeCloneOnHide||ee.insertBefore(oe,K),t._hideClone(),J({sortable:t,name:"clone"}))}),!n&&q(K,i.dragClass,!0),n?(ve=!0,t._loopId=setInterval(t._emulateDragOver,50)):(f(document,"mouseup",t._onDrop),f(document,"touchend",t._onDrop),f(document,"touchcancel",t._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(t,o,K)),O(document,"drop",t),k(K,"transform","translateZ(0)")),we=!0,t._dragStartId=Ve(t._dragStarted.bind(t,n,e)),O(document,"selectstart",t),Oe=!0,window.getSelection().removeAllRanges(),u&&k(document.body,"user-select","none"))},_onDragOver:function(e){var n,t,o,i,r=this.el,a=e.target,c=this.options,d=c.group,l=Xe.active,p=de===d,M=c.sort,u=le||l,b=this,h=!1;if(!We){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=A(a,c.draggable,r,!0),j("dragOver"),Xe.eventCanceled)return h;if(K.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||b._ignoreWhileAnimating===a)return X(!1);if(ve=!1,l&&!c.disabled&&(p?M||(o=Z!==ee):le===this||(this.lastPutMode=de.checkPull(this,l,K,e))&&d.checkPut(this,l,K,e))){if(i="vertical"===this._getDirection(e,a),n=x(K),j("dragOverValid"),Xe.eventCanceled)return h;if(o)return Z=ee,P(),this._hideClone(),j("revert"),Xe.eventCanceled||(ne?ee.insertBefore(K,ne):ee.appendChild(K)),X(!0);var z=R(r,c.draggable);if(!z||function(e,n,t){var o=x(R(t.el,t.options.draggable)),i=H(t.el,t.options,Q);return n?e.clientX>i.right+10||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>i.bottom+10||e.clientX>o.right&&e.clientY>o.top}(e,i,this)&&!z.animated){if(z===K)return X(!1);if(z&&r===e.target&&(a=z),a&&(t=x(a)),!1!==He(ee,r,K,n,a,t,e,!!a))return P(),z&&z.nextSibling?r.insertBefore(K,z.nextSibling):r.appendChild(K),Z=r,I(),X(!0)}else if(z&&function(e,n,t){var o=x(C(t.el,0,t.options,!0)),i=H(t.el,t.options,Q);return n?e.clientX<i.left-10||e.clientY<o.top&&e.clientX<o.right:e.clientY<i.top-10||e.clientY<o.bottom&&e.clientX<o.left}(e,i,this)){var O=C(r,0,c,!0);if(O===K)return X(!1);if(t=x(a=O),!1!==He(ee,r,K,n,a,t,e,!1))return P(),r.insertBefore(K,O),Z=r,I(),X(!0)}else if(a.parentNode===r){t=x(a);var f,m,g,w=K.parentNode!==r,v=!function(e,n,t){var o=t?e.left:e.top,i=t?e.right:e.bottom,r=t?e.width:e.height,a=t?n.left:n.top,s=t?n.right:n.bottom,c=t?n.width:n.height;return o===a||i===s||o+r/2===a+c/2}(K.animated&&K.toRect||n,a.animated&&a.toRect||t,i),_=i?"top":"left",y=L(a,"top","top")||L(K,"top","top"),W=y?y.scrollTop:void 0;if(fe!==a&&(m=t[_],ke=!1,_e=!v&&c.invertSwap||w),f=function(e,n,t,o,i,r,a,s){var c=o?e.clientY:e.clientX,d=o?t.height:t.width,l=o?t.top:t.left,p=o?t.bottom:t.right,M=!1;if(!a)if(s&&ge<d*i){if(!ke&&(1===me?c>l+d*r/2:c<p-d*r/2)&&(ke=!0),ke)M=!0;else if(1===me?c<l+ge:c>p-ge)return-me}else if(c>l+d*(1-i)/2&&c<p-d*(1-i)/2)return function(e){return N(K)<N(e)?1:-1}(n);return(M=M||a)&&(c<l+d*r/2||c>p-d*r/2)?c>l+d/2?1:-1:0}(e,a,t,i,v?1:c.swapThreshold,null==c.invertedSwapThreshold?c.swapThreshold:c.invertedSwapThreshold,_e,fe===a),0!==f){var B=N(K);do{B-=f,g=Z.children[B]}while(g&&("none"===k(g,"display")||g===Q))}if(0===f||g===a)return X(!1);fe=a,me=f;var S=a.nextElementSibling,T=!1,E=He(ee,r,K,n,a,t,e,T=1===f);if(!1!==E)return 1!==E&&-1!==E||(T=1===E),We=!0,setTimeout(Ie,30),P(),T&&!S?r.appendChild(K):a.parentNode.insertBefore(K,T?S:a),y&&D(y,0,W-y.scrollTop),Z=K.parentNode,void 0===m||_e||(ge=Math.abs(m-x(a)[_])),I(),X(!0)}if(r.contains(K))return X(!1)}return!1}function j(c,d){$(c,b,s({evt:e,isOwner:p,axis:i?"vertical":"horizontal",revert:o,dragRect:n,targetRect:t,canSort:M,fromSortable:u,target:a,completed:X,onMove:function(t,o){return He(ee,r,K,n,t,x(t),e,o)},changed:I},d))}function P(){j("dragOverAnimationCapture"),b.captureAnimationState(),b!==u&&u.captureAnimationState()}function X(n){return j("dragOverCompleted",{insertion:n}),n&&(p?l._hideClone():l._showClone(b),b!==u&&(q(K,le?le.options.ghostClass:l.options.ghostClass,!1),q(K,c.ghostClass,!0)),le!==b&&b!==Xe.active?le=b:b===Xe.active&&le&&(le=null),u===b&&(b._ignoreWhileAnimating=a),b.animateAll(function(){j("dragOverAnimationComplete"),b._ignoreWhileAnimating=null}),b!==u&&(u.animateAll(),u._ignoreWhileAnimating=null)),(a===K&&!K.animated||a===r&&!a.animated)&&(fe=null),c.dragoverBubble||e.rootEl||a===document||(K.parentNode[Y]._isOutsideThisEl(e.target),!n&&je(e)),!c.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function I(){ae=N(K),ce=N(K,c.draggable),J({sortable:b,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",je),f(document,"mousemove",je),f(document,"touchmove",je)},_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 n=this.el,t=this.options;ae=N(K),ce=N(K,t.draggable),$("drop",this,{evt:e}),Z=K&&K.parentNode,ae=N(K),ce=N(K,t.draggable),Xe.eventCanceled||(we=!1,_e=!1,ke=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ge(this.cloneId),Ge(this._dragStartId),this.nativeDraggable&&(f(document,"drop",this),f(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),u&&k(document.body,"user-select",""),k(K,"transform",""),e&&(Oe&&(e.cancelable&&e.preventDefault(),!t.dropBubble&&e.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(ee===Z||le&&"clone"!==le.lastPutMode)&&oe&&oe.parentNode&&oe.parentNode.removeChild(oe),K&&(this.nativeDraggable&&f(K,"dragend",this),Ye(K),K.style["will-change"]="",Oe&&!we&&q(K,le?le.options.ghostClass:this.options.ghostClass,!1),q(K,this.options.chosenClass,!1),J({sortable:this,name:"unchoose",toEl:Z,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==Z?(ae>=0&&(J({rootEl:Z,name:"add",toEl:Z,fromEl:ee,originalEvent:e}),J({sortable:this,name:"remove",toEl:Z,originalEvent:e}),J({rootEl:Z,name:"sort",toEl:Z,fromEl:ee,originalEvent:e}),J({sortable:this,name:"sort",toEl:Z,originalEvent:e})),le&&le.save()):ae!==re&&ae>=0&&(J({sortable:this,name:"update",toEl:Z,originalEvent:e}),J({sortable:this,name:"sort",toEl:Z,originalEvent:e})),Xe.active&&(null!=ae&&-1!==ae||(ae=re,ce=se),J({sortable:this,name:"end",toEl:Z,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){$("nulling",this),ee=K=Z=Q=ne=oe=te=ie=pe=Me=Oe=ae=ce=re=se=fe=me=le=de=Xe.dragged=Xe.ghost=Xe.clone=Xe.active=null;var e=this.el;xe.forEach(function(n){e.contains(n)&&(n.checked=!0)}),xe.length=ue=be=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,n=[],t=this.el.children,o=0,i=t.length,r=this.options;o<i;o++)A(e=t[o],r.draggable,this.el,!1)&&n.push(e.getAttribute(r.dataIdAttr)||Fe(e));return n},sort:function(e,n){var t={},o=this.el;this.toArray().forEach(function(e,n){var i=o.children[n];A(i,this.options.draggable,o,!1)&&(t[e]=i)},this),n&&this.captureAnimationState(),e.forEach(function(e){t[e]&&(o.removeChild(t[e]),o.appendChild(t[e]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return A(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var t=this.options;if(void 0===n)return t[e];var o=V.modifyOption(this,e,n);t[e]=void 0!==o?o:n,"group"===e&&Te(t)},destroy:function(){$("destroy",this);var e=this.el;e[Y]=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(),qe.splice(qe.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ie){if($("hideClone",this),Xe.eventCanceled)return;k(oe,"display","none"),this.options.removeCloneOnHide&&oe.parentNode&&oe.parentNode.removeChild(oe),ie=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ie){if($("showClone",this),Xe.eventCanceled)return;K.parentNode!=ee||this.options.group.revertClone?ne?ee.insertBefore(oe,ne):ee.appendChild(oe):ee.insertBefore(oe,K),this.options.group.revertClone&&this.animate(K,oe),k(oe,"display",""),ie=!1}}else this._hideClone()}},Le&&O(document,"touchmove",function(e){(Xe.active||we)&&e.cancelable&&e.preventDefault()}),Xe.utils={on:O,off:f,css:k,find:y,is:function(e,n){return!!A(e,n,e,!1)},extend:function(e,n){if(e&&n)for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e},throttle:E,closest:A,toggleClass:q,clone:j,index:N,nextTick:Ve,cancelNextTick:Ge,detectDirection:Se,getChild:C,expando:Y},Xe.get=function(e){return e[Y]},Xe.mount=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];n[0].constructor===Array&&(n=n[0]),n.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&&(Xe.utils=s(s({},Xe.utils),e.utils)),V.mount(e)})},Xe.create=function(e,n){return new Xe(e,n)},Xe.version="1.15.7";var Ue,$e,Je,Ke,Ze,Qe,en=[],nn=!1;function tn(){en.forEach(function(e){clearInterval(e.pid)}),en=[]}function on(){clearInterval(Qe)}var rn=E(function(e,n,t,o){if(n.scroll){var i,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=n.scrollSensitivity,c=n.scrollSpeed,d=W(),l=!1;$e!==t&&($e=t,tn(),Ue=n.scroll,i=n.scrollFn,!0===Ue&&(Ue=S(t,!0)));var p=0,M=Ue;do{var u=M,b=x(u),h=b.top,z=b.bottom,O=b.left,f=b.right,m=b.width,g=b.height,A=void 0,w=void 0,v=u.scrollWidth,q=u.scrollHeight,_=k(u),y=u.scrollLeft,L=u.scrollTop;u===d?(A=m<v&&("auto"===_.overflowX||"scroll"===_.overflowX||"visible"===_.overflowX),w=g<q&&("auto"===_.overflowY||"scroll"===_.overflowY||"visible"===_.overflowY)):(A=m<v&&("auto"===_.overflowX||"scroll"===_.overflowX),w=g<q&&("auto"===_.overflowY||"scroll"===_.overflowY));var C=A&&(Math.abs(f-r)<=s&&y+m<v)-(Math.abs(O-r)<=s&&!!y),R=w&&(Math.abs(z-a)<=s&&L+g<q)-(Math.abs(h-a)<=s&&!!L);if(!en[p])for(var N=0;N<=p;N++)en[N]||(en[N]={});en[p].vx==C&&en[p].vy==R&&en[p].el===u||(en[p].el=u,en[p].vx=C,en[p].vy=R,clearInterval(en[p].pid),0==C&&0==R||(l=!0,en[p].pid=setInterval(function(){o&&0===this.layer&&Xe.active._onTouchMove(Ze);var n=en[this.layer].vy?en[this.layer].vy*c:0,t=en[this.layer].vx?en[this.layer].vx*c:0;"function"==typeof i&&"continue"!==i.call(Xe.dragged.parentNode[Y],t,n,e,Ze,en[this.layer].el)||D(en[this.layer].el,t,n)}.bind({layer:p}),24))),p++}while(n.bubbleScroll&&M!==d&&(M=S(M,!1)));nn=l}},30),an=function(e){var n=e.originalEvent,t=e.putSortable,o=e.dragEl,i=e.activeSortable,r=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(n){var c=t||i;a();var d=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,l=document.elementFromPoint(d.clientX,d.clientY);s(),c&&!c.el.contains(l)&&(r("spill"),this.onSpill({dragEl:o,putSortable:t}))}};function sn(){}function cn(){}sn.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,t=e.putSortable;this.sortable.captureAnimationState(),t&&t.captureAnimationState();var o=C(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),t&&t.animateAll()},drop:an},r(sn,{pluginName:"revertOnSpill"}),cn.prototype={onSpill:function(e){var n=e.dragEl,t=e.putSortable||this.sortable;t.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),t.animateAll()},drop:an},r(cn,{pluginName:"removeOnSpill"});var dn,ln,pn,Mn,un,bn=[],hn=[],zn=!1,On=!1,fn=!1;function mn(){function e(e){for(var n in this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?O(document,"pointerup",this._deselectMultiDrag):(O(document,"mouseup",this._deselectMultiDrag),O(document,"touchend",this._deselectMultiDrag))),O(document,"keydown",this._checkKeyDown),O(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(n,t){var o="";bn.length&&ln===e?bn.forEach(function(e,n){o+=(n?", ":"")+e.textContent}):o=t.textContent,n.setData("Text",o)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var n=e.dragEl;pn=n},delayEnded:function(){this.isMultiDrag=~bn.indexOf(pn)},setupClone:function(e){var n=e.sortable,t=e.cancel;if(this.isMultiDrag){for(var o=0;o<bn.length;o++)hn.push(j(bn[o])),hn[o].sortableIndex=bn[o].sortableIndex,hn[o].draggable=!1,hn[o].style["will-change"]="",q(hn[o],this.options.selectedClass,!1),bn[o]===pn&&q(hn[o],this.options.chosenClass,!1);n._hideClone(),t()}},clone:function(e){var n=e.sortable,t=e.rootEl,o=e.dispatchSortableEvent,i=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||bn.length&&ln===n&&(gn(!0,t),o("clone"),i()))},showClone:function(e){var n=e.cloneNowShown,t=e.rootEl,o=e.cancel;this.isMultiDrag&&(gn(!1,t),hn.forEach(function(e){k(e,"display","")}),n(),un=!1,o())},hideClone:function(e){var n=this,t=(e.sortable,e.cloneNowHidden),o=e.cancel;this.isMultiDrag&&(hn.forEach(function(e){k(e,"display","none"),n.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)}),t(),un=!0,o())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&ln&&ln.multiDrag._deselectMultiDrag(),bn.forEach(function(e){e.sortableIndex=N(e)}),bn=bn.sort(function(e,n){return e.sortableIndex-n.sortableIndex}),fn=!0},dragStarted:function(e){var n=this,t=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(t.captureAnimationState(),this.options.animation)){bn.forEach(function(e){e!==pn&&k(e,"position","absolute")});var o=x(pn,!1,!0,!0);bn.forEach(function(e){e!==pn&&P(e,o)}),On=!0,zn=!0}t.animateAll(function(){On=!1,zn=!1,n.options.animation&&bn.forEach(function(e){X(e)}),n.options.sort&&An()})}},dragOver:function(e){var n=e.target,t=e.completed,o=e.cancel;On&&~bn.indexOf(n)&&(t(!1),o())},revert:function(e){var n=e.fromSortable,t=e.rootEl,o=e.sortable,i=e.dragRect;bn.length>1&&(bn.forEach(function(e){o.addAnimationState({target:e,rect:On?x(e):i}),X(e),e.fromRect=i,n.removeAnimationState(e)}),On=!1,function(e,n){bn.forEach(function(t,o){var i=n.children[t.sortableIndex+(e?Number(o):0)];i?n.insertBefore(t,i):n.appendChild(t)})}(!this.options.removeCloneOnHide,t))},dragOverCompleted:function(e){var n=e.sortable,t=e.isOwner,o=e.insertion,i=e.activeSortable,r=e.parentEl,a=e.putSortable,s=this.options;if(o){if(t&&i._hideClone(),zn=!1,s.animation&&bn.length>1&&(On||!t&&!i.options.sort&&!a)){var c=x(pn,!1,!0,!0);bn.forEach(function(e){e!==pn&&(P(e,c),r.appendChild(e))}),On=!0}if(!t)if(On||An(),bn.length>1){var d=un;i._showClone(n),i.options.animation&&!un&&d&&hn.forEach(function(e){i.addAnimationState({target:e,rect:Mn}),e.fromRect=Mn,e.thisAnimationDuration=null})}else i._showClone(n)}},dragOverAnimationCapture:function(e){var n=e.dragRect,t=e.isOwner,o=e.activeSortable;if(bn.forEach(function(e){e.thisAnimationDuration=null}),o.options.animation&&!t&&o.multiDrag.isMultiDrag){Mn=r({},n);var i=_(pn,!0);Mn.top-=i.f,Mn.left-=i.e}},dragOverAnimationComplete:function(){On&&(On=!1,An())},drop:function(e){var n=e.originalEvent,t=e.rootEl,o=e.parentEl,i=e.sortable,r=e.dispatchSortableEvent,a=e.oldIndex,s=e.putSortable,c=s||this.sortable;if(n){var d=this.options,l=o.children;if(!fn)if(d.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),q(pn,d.selectedClass,!~bn.indexOf(pn)),~bn.indexOf(pn))bn.splice(bn.indexOf(pn),1),dn=null,G({sortable:i,rootEl:t,name:"deselect",targetEl:pn,originalEvent:n});else{if(bn.push(pn),G({sortable:i,rootEl:t,name:"select",targetEl:pn,originalEvent:n}),n.shiftKey&&dn&&i.el.contains(dn)){var p=N(dn),M=N(pn);~p&&~M&&p!==M&&function(){var e,r;M>p?(r=p,e=M):(r=M,e=p+1);for(var a=d.filter;r<e;r++)~bn.indexOf(l[r])||A(l[r],d.draggable,o,!1)&&(a&&("function"==typeof a?a.call(i,n,l[r],i):a.split(",").some(function(e){return A(l[r],e.trim(),o,!1)}))||(q(l[r],d.selectedClass,!0),bn.push(l[r]),G({sortable:i,rootEl:t,name:"select",targetEl:l[r],originalEvent:n})))}()}else dn=pn;ln=c}if(fn&&this.isMultiDrag){if(On=!1,(o[Y].options.sort||o!==t)&&bn.length>1){var u=x(pn),b=N(pn,":not(."+this.options.selectedClass+")");if(!zn&&d.animation&&(pn.thisAnimationDuration=null),c.captureAnimationState(),!zn&&(d.animation&&(pn.fromRect=u,bn.forEach(function(e){if(e.thisAnimationDuration=null,e!==pn){var n=On?x(e):u;e.fromRect=n,c.addAnimationState({target:e,rect:n})}})),An(),bn.forEach(function(e){l[b]?o.insertBefore(e,l[b]):o.appendChild(e),b++}),a===N(pn))){var h=!1;bn.forEach(function(e){e.sortableIndex===N(e)||(h=!0)}),h&&(r("update"),r("sort"))}bn.forEach(function(e){X(e)}),c.animateAll()}ln=c}(t===o||s&&"clone"!==s.lastPutMode)&&hn.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})}},nullingGlobal:function(){this.isMultiDrag=fn=!1,hn.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!==fn&&fn||ln!==this.sortable||e&&A(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;bn.length;){var n=bn[0];q(n,this.options.selectedClass,!1),bn.shift(),G({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:n,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 n=e.parentNode[Y];n&&n.options.multiDrag&&!~bn.indexOf(e)&&(ln&&ln!==n&&(ln.multiDrag._deselectMultiDrag(),ln=n),q(e,n.options.selectedClass,!0),bn.push(e))},deselect:function(e){var n=e.parentNode[Y],t=bn.indexOf(e);n&&n.options.multiDrag&&~t&&(q(e,n.options.selectedClass,!1),bn.splice(t,1))}},eventProperties:function(){var e,n=this,t=[],i=[];return bn.forEach(function(e){var o;t.push({multiDragElement:e,index:e.sortableIndex}),o=On&&e!==pn?-1:On?N(e,":not(."+n.options.selectedClass+")"):N(e),i.push({multiDragElement:e,index:o})}),{items:(e=bn,function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return o(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?o(e,n):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(hn),oldIndicies:t,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 gn(e,n){hn.forEach(function(t,o){var i=n.children[t.sortableIndex+(e?Number(o):0)];i?n.insertBefore(t,i):n.appendChild(t)})}function An(){bn.forEach(function(e){e!==pn&&e.parentNode&&e.parentNode.removeChild(e)})}Xe.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 n=e.originalEvent;this.sortable.nativeDraggable?O(document,"dragover",this._handleAutoScroll):this.options.supportPointer?O(document,"pointermove",this._handleFallbackAutoScroll):n.touches?O(document,"touchmove",this._handleFallbackAutoScroll):O(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var n=e.originalEvent;this.options.dragOverBubble||n.rootEl||this._handleAutoScroll(n)},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)),on(),tn(),clearTimeout(w),w=void 0},nulling:function(){Ze=$e=Ue=nn=Qe=Je=Ke=null,en.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,n){var t=this,o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(o,i);if(Ze=e,n||this.options.forceAutoScrollFallback||p||l||u){rn(e,this.options,r,n);var a=S(r,!0);!nn||Qe&&o===Je&&i===Ke||(Qe&&on(),Qe=setInterval(function(){var r=S(document.elementFromPoint(o,i),!0);r!==a&&(a=r,tn()),rn(e,t.options,r,n)},10),Je=o,Ke=i)}else{if(!this.options.bubbleScroll||S(r,!0)===W())return void tn();rn(e,this.options,S(r,!1),!1)}}},r(e,{pluginName:"scroll",initializeByDefault:!0})}),Xe.mount(cn,sn);const wn=Xe;var vn=t(18101),qn=t(45055),kn=t(24510),_n=t(23902),yn=t(17664),Wn=t(90127),xn=t(50965),Ln=t(88630);const Cn=()=>wn.mount(new mn),Rn=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 n=e.getAttribute("data-sortable-item-type");return n?[...document.querySelectorAll(`[data-sortable-valid-item-types~="${n}"][data-read-only="false"]`)]:[...document.querySelectorAll(".Sortable:not([data-sortable-valid-item-types])")]},Nn=(e,n,t)=>{const o=e.dataset.sortableInputName,i=n.closest(".Sortable").dataset.sortableInputName;o!==i&&t.forEach(e=>{e.querySelectorAll(`[name^="${o}"]`).forEach(e=>{e.setAttribute("name",e.getAttribute("name").replace(o,i))})})},Bn=e=>{const n=e.closest(".inputContainer");n&&(n.dataset.interacted="true"),e.closest("form")?.dispatchEvent(new Event("change",{bubbles:!0}))},Sn=[];let Tn=!1,En=null,Dn=null;function jn(e,n,t){const o=t.children[e],i=t.children[n];e>n?t.insertBefore(o,i):t.insertBefore(o,i.nextElementSibling),(0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[e+1,n+1])}(0,qn.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 n=e.closest(".is-readOnly");if("true"===e.dataset.readOnly||n)return;const t="record"===e.dataset.type;if("true"===e.dataset.rteContainer||t){const n=e.querySelector(":scope .drawerDropOverlay");Sn.push(n)}const o=e.classList.contains("RCIG-list");let i=!1;e.parentElement&&(i=e.parentElement.classList.contains("is-previewable"));const r=e.closest("dialog"),a=new wn(e,{animation:t?null:160,handle:o&&!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,n,t){if(Sn.length>0)for(const e in Sn){const n=Sn[e];if(n){const e=n.dataset?.sortableValidItemTypes?.split(" "),o=t.dataset?.sortableLoadTypes?.split(" "),i=o?.find(n=>e.includes(n));i&&(n.style.display="inline")}}let o=!1;if(e.el.dataset.sortableValidItemTypes){if(o=e.el.dataset.sortableValidItemTypes.includes(t.dataset.sortableItemType),!o&&t.dataset.sortableLoadTypes){const n=e.el.dataset.sortableValidItemTypes.split(" ");o=t.dataset.sortableLoadTypes.split(" ").some(e=>n.includes(e))}return o}return o},pull:function(e,n,t){let o=!1;const i=n.el.classList.contains("is-clonable");if(e.el.dataset.sortableValidItemTypes){if(o=e.el.dataset.sortableValidItemTypes.includes(t.dataset.sortableItemType),!o&&t.dataset.sortableLoadTypes){const n=e.el.dataset.sortableValidItemTypes.split(" ");o=t.dataset.sortableLoadTypes.split(" ").some(e=>n.includes(e))}return o&&i?"clone":o}return o}},onSelect:e=>{const n=e.item,t=e.items;if(n.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list"))for(const e in t){const n=t[e];n.parentElement&&!n.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list")&&wn.utils.deselect(n)}else for(const e in t){const n=t[e];n.parentElement.classList.contains("ContentEditDrawer-widget-carousel-list")&&((0,xn.k)(n),wn.utils.deselect(n))}n.classList.contains("is-moving")||wn.utils.deselect(n)},onDeselect:e=>{const n=e.item,t=n.querySelector(".ContentEditDrawer-widget-carousel-list-item-selectButton");n.classList.contains("is-moving")&&(t&&(t.checked=!1),n.classList.remove("is-moving"))},onStart:e=>{const n=e.item,t=+(e.items.length>0?e.items:[e.item]).length,o=Rn(n),i=document.querySelector(".ContentEdit-previewDisplay");if(document.body.style.userSelect="none",i&&(i.style.pointerEvents="none"),t&&(wn.ghost.style.setProperty("--drag-count",t),wn.ghost.style.zIndex=(0,yn.default)()+1,wn.ghost.setAttribute("item-suffix",""),t>1&&wn.ghost.setAttribute("item-suffix","s")),1===o.length){var r=o[0];n.closest(`.${r.className}`)||r.classList.add("Sortable-allowedContainer")}if(o.length>1&&o.forEach(e=>e.classList.add("Sortable-allowedContainer")),window.BRIGHTSPOT?.ui.cms.enableV5UI){const e=parseInt(wn.ghost.style.left);wn.ghost.style.left=.95*e+"px"}_n.A.pause(),qn.A.pause()},onSort:e=>{const n=e.from,t=e.to,o=e.items.length>0?e.items:[e.item];if(!Tn){if("record"===t.dataset.type){const e=Ln(t).find(":input.objectId").first(),n=Ln(o);return e.attr("data-label",n.data("label-html")),e.attr("data-label-html",n.data("label-html")),e.attr("data-preview",n.find("img").attr("src")||n.find(".ItemPreview-url").attr("data-src")||""),e.attr("data-visibility",n.find("span.Label").text()),e.attr("data-read-only",!!n.attr("data-read-only")&&n.attr("data-read-only")),e.val(n.data("id")),void e.change()}o.sort(function(e,n){return e.dataset.index-n.dataset.index});for(const i in o){const r=o[i];if("true"===t?.dataset?.rteContainer)return;if(t.dataset.sortableValidItemTypes&&n.dataset.sortableEndpoint&&!r.classList.contains("is-pending")){const e=t.dataset.sortableValidItemTypes.split(" "),o=r.dataset.sortableLoadTypes?.split(" "),i=r.dataset?.id,a=o?.find(n=>e.includes(n)),s=t.parentElement.classList.contains("is-previewable"),c=t.dataset.previewable,d=t.dataset.sortableValidItemTypes;if(!a){r.remove();continue}Tn=!0,wn.utils.deselect(r),Pn(n.dataset.sortableEndpoint,i,a,t.dataset.sortableInputName,s,c,d).then(e=>{r.innerHTML=e;const n=t.closest(".plugin-repeatable");r.classList.remove("Sortable-selected"),r.classList.remove("is-moving"),Tn=!1,t.classList.contains("RCIG-list")?(r.classList.remove("RCS-item"),Ln(n).data("repeatable").itemLoad(r).then(()=>{Ln(n).data("repeatable").initItem(r),s&&!t.parentElement.classList.contains("is-gridView")&&(r.classList.remove("is-gridItem"),r.classList.add("is-listItem")),Bn(t)})):(r.classList.remove("RCIG-item"),Ln(r).trigger("create"),Ln(n).data("repeatable").initItemRemove(r),Bn(t))})}else{let o=e.items.length?e.items:[r];o.forEach(e=>{e.addEventListener("animationend",()=>{e.classList.remove("is-added")}),e.classList.add("is-added")}),Nn(n,t,o),n.querySelectorAll("input, select, textarea").forEach(e=>{e.dispatchEvent(new Event("change"))}),Bn(t)}}}},onEnd:e=>{const n=e.item,t=e.items.length>0?e.items:[n],o=document.querySelector(".ContentEdit-previewDisplay");if(document.body.style.userSelect="unset",o&&(o.style.pointerEvents="initial"),Rn(n).forEach(e=>e.classList.remove("Sortable-allowedContainer")),Sn.length>0)for(const e in Sn){const n=Sn[e];n&&(n.style.display="none")}if("true"===e.to?.dataset?.rteContainer){for(const e in t)wn.utils.deselect(t[e]);const o=new CustomEvent("interchange",{detail:e});e.to.querySelector(".richtext").rte.view.dispatchEvent(o),n.remove()}if("record"===e.to?.dataset?.type)for(const e in t)wn.utils.deselect(t[e]),t[e].remove();_n.A.resume(),qn.A.resume()},onUpdate:e=>{const n=e.item;n.addEventListener("animationend",()=>{n.classList.remove("is-added")}),n.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 n=e.closest(".CIG-row")?.querySelector("label")?.textContent;e.querySelectorAll(":scope > li > input[type=text]").forEach(e=>{if(e.dataset?.label){const n=e.closest("li");n?.setAttribute("aria-label",e.dataset?.label)}}),(0,qn.A)(e,":scope > li",e=>{e.addEventListener("focus",e=>{if(!e.relatedTarget)return;const t=n?(0,Wn.wC)(window.BRIGHTSPOT.ui.sortable.namedList,[n]):window.BRIGHTSPOT.ui.sortable.genericList;(0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.listGainedFocus,[t])}),e.addEventListener("blur",e=>{e.relatedTarget&&(En&&(_n.A.resume(),qn.A.resume()),En=null)}),e.dataset?.label&&!e.hasAttribute("aria-label")&&e.setAttribute("aria-label",e.dataset?.label)}),e.hasAttribute("aria-label")||e.setAttribute("aria-label",n||"")}const s=e.classList.contains("RTI-list");(0,qn.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,vn.A)("div",{class:"RTI-handle"}))})});const Pn=async(e,n,t,o,i,r,a)=>{const s=new URLSearchParams;s.set("id",n),s.set("targetTypeId",t),s.set("inputName",o),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":kn.A.get("bsp.csrf")}});return await c.text()};(0,qn.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 n=e.closest("[data-sortable-item-type], .Sortable-item");n.classList.add("MultiSortable"),n.addEventListener("mouseup",e=>{e.target!==i||n.classList.contains("is-moving")?n.classList.remove("is-moving"):(n.classList.add("is-moving"),n.classList.contains("is-collapsed")||!n.classList.contains("RCIG-item")||n.classList.contains("is-gridItem")||n.classList.add("collapsed","is-collapsed"))});let t="";const o=e.closest(".CIG-row");o&&(t=o.querySelector(".CIG-label label").textContent);const i=(0,vn.A)("button",{type:"button",class:"MultiSortable-buttonToggle",title:`${window.BRIGHTSPOT?.ui.tooltips.multiSort} ${t}`,"aria-label":`${window.BRIGHTSPOT?.ui.tooltips.multiSort} ${t}`});e.classList.contains("EIG-remove")||e.insertAdjacentElement("beforeBegin",i)}),window.addEventListener("keydown",e=>{if("Escape"===e.code&&document.querySelectorAll(".Sortable-selected").forEach(e=>{wn.utils.deselect(e),(0,xn.k)(e),e.classList.remove("is-moving")}),!e.target.classList.contains("Sortable-item")&&!e.target.classList.contains("MultiSortable-buttonToggle"))return;const n=e.target.classList.contains("MultiSortable-buttonToggle")?e.target.closest(".Sortable-item"):e.target;if("Tab"===e.code&&En){const t=function(e){const n=e.dataset.sortableItemType;return Array.from(document.querySelectorAll(`ol.Sortable[data-sortable-valid-item-types*="${n}"],\n ul.Sortable[data-sortable-valid-item-types*="${n}"]`)).filter(e=>null!==e.offsetParent)}(n);if(t.length){const o=n.closest("ul.Sortable, ol.Sortable");let i=null,r=null;t.forEach((e,n)=>{o.isEqualNode(e)&&(r=n)}),r+1>t.length-1?i=0:r+1<=t.length-1&&(i=r+1);const a=t[i],s=a.children[0];a.isEqualNode(o)&&1===t.length||(s?((0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[r,i]),a.insertBefore(n,s)):((0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemChangedPosition,[r,1]),a.appendChild(n))),n.focus(),e.preventDefault()}else _n.A.resume(),qn.A.resume(),En=null}if("Escape"===e.code){if(En){const e=En.prevDropZone.children;e.length&&En.prevIdx<e.length-1?En.prevDropZone.insertBefore(n,e[En.prevIdx]):En.prevDropZone.appendChild(n),_n.A.resume(),qn.A.resume(),(0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemDragCancelled),n.focus()}En=null}if("Space"===e.code||"Enter"===e.code){if(En){const e=n.closest("ul.Sortable, ol.Sortable");e.querySelectorAll("input, select, textarea").forEach(e=>{e.dispatchEvent(new Event("change"))}),Bn(e),0===En.prevDropZone?.childElementCount&&En.prevDropZone?.removeAttribute("tabindex"),e.dispatchEvent(new CustomEvent("add",{detail:{item:n,from:En.prevDropZone,to:e}})),_n.A.resume(),qn.A.resume(),En=null,(0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemDropped)}else En={prevIdx:Array.prototype.indexOf.call(n.parentNode.children,n),prevDropZone:n.closest("ul.Sortable, ol.Sortable")},_n.A.pause(),qn.A.pause(),(0,Wn.iP)(window.BRIGHTSPOT.ui.sortable.itemDragStarted);if(e.preventDefault(),!En)return}"ArrowUp"!==e.code&&"ArrowLeft"!==e.code||(Dn=Array.prototype.indexOf.call(n.parentNode.children,n),En&&Dn>0&&(jn(Dn,Dn-1,n.closest("ul.Sortable, ol.Sortable")),n.focus())),"ArrowDown"!==e.code&&"ArrowRight"!==e.code||(Dn=Array.prototype.indexOf.call(n.parentNode.children,n),En&&Dn<n.parentNode.children.length-1&&(jn(Dn,Dn+1,n.closest("ul.Sortable, ol.Sortable")),n.focus()))}),window.addEventListener("click",()=>{En&&(_n.A.resume(),qn.A.resume()),En=null})},80754(e,n,t){"use strict";t(49371),t(96648);var o=t(45055),i=t(24510);(0,o.A)(".StyleEmbeddedContent-items > li",e=>{e.addEventListener("click",async e=>{let n=e.target;const t=n.parentElement.classList.contains("Card");if("LI"===n.parentElement.nodeName||t){t&&(n=n.parentElement);const e=n.dataset.addEmbeddedContentData;if(!e)return;const o=JSON.parse(e),r=o.typeId;if(!r)return;const a=n.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 d=o.value;d&&(c+="&templateStyle="+d);const l=new Headers;l.append("Brightspot-CSRF",i.A.get("bsp.csrf"));try{await fetch(c,{method:"POST",headers:l})}catch(e){console.error(e)}}})}),(0,o.A)(".StyleEmbeddedContent-search input",e=>{e.addEventListener("input",n=>{const t=e.closest(".StyleEmbeddedContent-nav"),o=t?.nextSibling,i=new RegExp(n.target.value.replace(/\s/,"").split("").join("(?:.*\\W)?"),"i");o?.querySelectorAll("a").forEach(e=>{const n=e.parentElement,t=n?.parentElement,o=t?.previousSibling;i.test(e.innerText)?(n.style.display="",t.style.display=t.classList.contains("LinkTable")?"block":"flex",o.style.display="block"):(n.style.display="none",t.querySelector('li:not([style*="display: none"])')||(t.style.display="none",o.style.display="none"))}),t?.querySelectorAll("li").forEach(e=>{e.style.display=e.classList.contains("is-selected")||""===n.target.value?"list-item":"none",e.style.borderColor="var(--color-gray3)"});const r=t?.querySelector('li:not([style*="display: none"])');r.style.borderColor="transparent";const a=o?.querySelector(".StyleEmbeddedContent-warning");a.style.display=o?.querySelector('li:not([style*="display: none"])')?"none":"flex"})})},31854(e,n,t){"use strict";t(62953),t(49371),t(96648);var o=t(45055),i=t(24510),r=t(49309),a=t(88630);const s="> .CIG-large > .CIG > .CIG-row, > .CIG-large > .CIG > .TemplateField",c="> .CIG-large > .CIG > btu-cig-cluster > .TemplateField";(0,o.A)(".CIG-row.StyleguidePreset-row",e=>{let n,t,o,i,r;const a=e.closest(".CIG-row.StyleguideTemplate-row"),l=e.getAttribute("data-original-template"),M=n=>Array.from(e.querySelectorAll(`.TC > .TemplateField[data-template='${n}'] > .CIG-row, .TC > btu-cig-cluster > .TemplateField[data-template='${n}'] > .CIG-row`));if(a){t=a.querySelector(".CIG-small > select");let e=t.value;t.addEventListener("change",()=>{e!==t.value&&(e=t.value,o=e||l,i=M(o),r=u.concat(i),b&&(b.querySelector("option[data-show]").setAttribute("data-show",`${s}[data-template="${o}"], ${c}[data-template="${o}"]`),b.querySelectorAll("option[data-preset]").forEach(e=>e.remove()),(async()=>{const e=await fetch(CONTEXT_PATH+"styleguide/preset?themeId=currentTheme&templateId="+o,{method:"GET",headers:new Headers});try{const n=await e.json(),t=n.success&&n.data;t?.forEach(e=>{const n=document.createElement("option");n.setAttribute("data-hide",`${s}, ${c}`),n.setAttribute("data-preset",e.presetId),n.setAttribute("value",e.presetId),n.textContent=e.label,b.appendChild(n)})}catch(e){console.log(e)}})()),n?d(b,"none"):b.dispatchEvent(new Event("change",{bubbles:!0})))})}o=t?.value||l;const u=Array.from(e.querySelectorAll(".TC > .CIG-row"));i=M(o),r=u.concat(i);const b=e.querySelector(".CIG-small > select");n=b.value,b.setAttribute("data-previous-value",n);const h=e.querySelector(".CIG-large");b.addEventListener("change",e=>{n=b.value;const t=b.getAttribute("data-previous-value");n!==t&&(b.setAttribute("data-previous-value",n),n?h.style.display="none":(h.style.display="",p(o,t,r)))})});const d=(e,n)=>{if(e.nextElementSibling?.matches(".ComboInput")){const t=e.nextElementSibling.getAttribute("aria-owns"),o=document.querySelector(`#${t}`).querySelector(`.ComboInput-option[data-value="${n}"]`);o&&o.click()}else e.value=n},l=(e,n)=>{const t=e.querySelector("textarea"),o=e.querySelector('input[type="checkbox"]'),i=e.querySelector("input.color"),r=e.querySelector("select");if(t)t.value=n||"";else if(o)o.checked=n||!1;else if(i){a(i).spectrum("set",n||"");const e=i.parentElement.querySelector(".sp-preview");e&&n?e.setAttribute("data-color",n):e?e.removeAttribute("data-color"):i.value=n||""}else r&&d(r,n||"")},p=async(e,n,t)=>{const o=e=>{t?.forEach(n=>{const t=n.getAttribute("data-field-name"),o=t?.slice(t.lastIndexOf(".")+1),i=e&&o&&e[o];l(n,i)})};if(n&&"none"!==n){const t=CONTEXT_PATH+"styleguide/preset?themeId=currentTheme&templateId="+e+"&presetId="+n,i=new Headers,r=await fetch(t,{method:"GET",headers:i});try{const e=await r.json(),n=e.success&&e.data[0].values;n&&o(n)}catch(e){console.log(e)}}else o()},M=async(e,n,t)=>{let o,i;if(!t){const e=document.querySelector(".ThemeBundleEditor-top"),n=e?.closest(".ThemeBundle.TC"),t=n?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"] select[name$="_preset"]');i=t?.querySelector(`option[value="${t.value}"]`)?.textContent,o=(e=>{const n=e?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"]'),t=n?.querySelectorAll(":scope > .CIG-large > .CIG .CIG-row"),o=[],i=[];return t.forEach(e=>{const n=e.getAttribute("data-field-name"),t=n.substring(n.lastIndexOf(".")+1),r=e.querySelector("textarea, input.color"),a=e.querySelector('input[type="checkbox"]'),s=e.querySelector('[data-type="text"] select');r?(o[t]=r.value||"",i[t]=r.placeholder||""):a?o[t]=a.checked:s&&(o[t]=s.value||"",i[t]=s.getAttribute("data-placeholder")||"")}),{overrideValues:o,themePlaceholders:i}})(n)}const r=CONTEXT_PATH+"styleguide/preset?themeId="+e+"&templateId="+(t||"themeFields"),a=new Headers,s=await fetch(r,{method:"GET",headers:a});try{const e=await s.json(),t=e.success&&JSON.stringify(e.data);document.querySelector("iframe.StyleguideFrame").contentWindow.postMessage({type:"BSP.Styleguide.ReturnThemePresets",presets:t,selectedPreset:n,themeOverrides:o?.overrideValues,themePlaceholders:o?.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 n=document.querySelector(".ThemeBundle")?.getAttribute("data-id"),t=e.preset?.key?.startsWith("brightspot-styleguide-template-values-")&&e.preset.key.replace("brightspot-styleguide-template-values-",""),o=document.querySelector(".ThemeBundleEditor-top"),a=o?.closest(".ThemeBundle.TC"),p=a?.querySelector(':scope > .ThemeBundleEditor-top ~ .CIG-row[data-tab="Overrides"][data-field-name$="_preset"]');if("BSP.Styleguide.RequestPresets"===e.type)M(n,e.label,e.templateName);else if("BSP.Styleguide.SetOverrides"===e.type||"BSP.Styleguide.RemovePreset"===e.type)(async(e,n,t,o)=>{const a=CONTEXT_PATH+"styleguide/preset?themeId="+e,d=new Headers;d.append("Brightspot-CSRF",i.A.get("bsp.csrf"));const l={};l.type=n.type,l.key=n.preset.key,l.values=n.preset.values,l.label=n.preset.label,l.presetId=n.preset.presetId||(0,r.A)();const p=await fetch(a,{method:"POST",headers:d,body:JSON.stringify(l)});try{(await p.json()).success&&M(e,n.preset.label,t)}catch(e){console.log(e)}if("brightspot-styleguide-theme-values"===n.preset.key){const e=o?.querySelector(":scope > .CIG-small select");if("BSP.Styleguide.RemovePreset"===n.type){const t=e?.querySelector(`option[value="${n.preset.presetId}"]`);t?.remove()}else if("BSP.Styleguide.SetOverrides"===n.type)if(n.preset.presetId){const t=e?.querySelector(`option[value="${n.preset.presetId}"]`);t.textContent=n.preset.label}else{const t=document.createElement("option");t.setAttribute("data-hide",`${s}, ${c}`),t.setAttribute("value",l.presetId),t.textContent=n.preset.label,e.appendChild(t)}}})(n,e,t,p);else if("BSP.Styleguide.SyncOverrideField"===e.type){const n=p?.querySelector(`:scope > .CIG-large > .CIG .CIG-row[data-field-name$=".${e.field}"]`);l(n,e.value),p.setAttribute("data-received-update","")}else if("BSP.Styleguide.SyncThemePresetField"===e.type){const n=p?.querySelector(":scope > .CIG-small select"),t="Custom"===e.preset?"":e.preset;n&&d(n,t)}})},9216(e,n,t){"use strict";t.d(n,{A:()=>l}),t(86634),t(57573),t(49371),t(42723),t(26780),t(96648);var o=t(88630),i=t.n(o),r=t(18101),a=t(39403),s=t(76394),c=t(60021),d=t(79365);class l{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 n of this._container.children){const t=n.dataset.tab;void 0!==t&&e(t,n)}}_toArray(e){if(e)try{const n=JSON.parse(e);return Array.isArray(n)?n:[]}catch{}return[]}_update(){this._observer&&(this._observer.disconnect(),this._observer=null);const e=(0,r.A)("div",{className:"TabBar",role:"tablist"}),n=(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}),t=(0,r.A)("div",{className:"TabBar-menuList",role:"menu","aria-label":window.BRIGHTSPOT?.ui.tooltips.tabs}),o=(0,r.A)("div",{className:"TabBar-menu"},n,t);n.onclick=()=>{(0,d.AM)(t,n,e)};const i="MENU"===this._container.dataset.tcMode,a=this._container.dataset.tcMain,l=this._toArray(this._container.dataset.tcExceptions),p=new Set;this._defaultTab=null;for(const e of this._container.children){const n=e.dataset.tab;void 0!==n&&(p.has(n)||(this._defaultTab||(this._defaultTab=n),p.add(n)))}const M=this._toArray(this._container.dataset.tcStart),u=this._toArray(this._container.dataset.tcEnd),b=[];for(const e of M)p.has(e)&&b.push(e);for(const e of p)M.includes(e)||u.includes(e)||b.push(e);for(const e of u)p.has(e)&&b.push(e);for(const n of b){const o=l.indexOf(n)>-1?i?e:t:i?t:e;o.insertBefore((0,r.A)("button",{className:"TabBar-item",dataset:{tab:n},role:"tab",onclick:e=>{e.preventDefault(),this.select(n,e)},onkeydown:e=>{var n=e.currentTarget,t=n.closest(".TabBar");switch(e.key){case"ArrowRight":return void(n.nextSibling?n.nextSibling.focus():t.firstChild.focus());case"ArrowLeft":return void(n.previousSibling?n.previousSibling.focus():t.lastChild.focus())}}},n),n===a?o.firstChild:null)}b.includes(a)&&(this._defaultTab=a),1===e.children.length&&t.insertBefore(e.children[0],t.firstChild);for(const e of t.children)e.className="TabBar-menuItem",e.setAttribute("role","menuitem");if((0,d.D1)(t,n),this._bar&&(this._bar.remove(),this._bar=null,this._menu=null,this._menuToggle=null,this._menuList=null),0===b.length||b.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),t.children.length>0&&(0===e.children.length&&(e.classList.add("is-menuOnly"),e.removeAttribute("role")),this._menu=o,this._menuToggle=n,this._menuList=t,this._bar.appendChild(o));const h=this._toggle();h.includes(this._defaultTab)||(this._defaultTab=h[0]),e.hidden=1===Array.from(t.children).filter(e=>!e.hidden).length;let z=!1;for(const e of(0,s.A)(this._container,".CIG-row > .Message.is-error")){let n,t=e;do{n=t,t=n.parentNode}while(t!==this._container);const o=(0,c.A)(this._bar,`[data-tab="${n.dataset.tab}"]`);o&&!o.classList.contains("is-error")&&(o.classList.add("is-error"),o.classList.contains("TabBar-menuItem")&&(z=!0))}z&&e.classList.add("is-menuError"),this.select()}_toggle(){const e=[];this._forEachChild((n,t)=>{t.hidden||t instanceof HTMLHeadingElement||e.push(n)});for(const n of[this._bar,this._menuList])if(n)for(const t of n.children)t!==this._menu&&(t.hidden=!e.includes(t.dataset.tab));return e}select(e,n){const t=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 n of this._bar.children){const t=n.dataset.tab===e;n.classList.toggle("is-selected",t),n.setAttribute("aria-selected",t),t?n.removeAttribute("tabindex"):n.setAttribute("tabindex","-1")}if(this._menuList){let n=!1;for(const t of this._menuList.children)t.classList.toggle("is-selected",t.dataset.tab===e)&&(n=e!==this._defaultTab);this._bar.classList.toggle("is-menuSelected",n),this._menuToggle.innerText=n?e:""}if(this._forEachChild((n,t)=>{t.classList.toggle("TC-unselected",n!==e)}),window.dispatchEvent(new Event("resize")),i()(this._container).find("> [data-tab]").trigger("tabbedShow"),i()(this._bar).trigger("tabbed-select"),t){const n=this._container.querySelector(`:scope > .CIG-row:not(.inputContainer-readOnly)[data-tab="${e}"] > .CIG-label > label`)?.htmlFor;n&&document.getElementById(n)?.focus()}else n&&n.target.scrollIntoView({block:"nearest"})}}},25539(){window.addEventListener("click",e=>{const n=e.target;if(n.classList.contains("Taxonomy-expand")){for(const e of n.closest("ul").querySelectorAll(".is-selected"))e.classList.remove("is-selected");n.closest("li").classList.add("is-selected")}},{capture:!0}),window.addEventListener("brightspot-frame-load",e=>{const n=e.target;n.classList.contains("Taxonomy-children")&&window.requestAnimationFrame(()=>{n.closest(".Taxonomy").scrollTo({left:3e4})})})},83026(e,n,t){"use strict";t(49371),t(96648);var o=t(18101),i=t(45055);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"]'),n=e.querySelector(".CIG-large");if(this._selectedPreset!==this._presetSelect.value||e.hasAttribute("data-received-update")){const t=this._presetSelect.closest(".CIG").querySelector(":scope > .TabBar .ThemeBundle-tabOverrides");t&&t.click(),n.style=this._presetSelect.value?"display: none;":"",e.classList.add("state-changed"),e.removeAttribute("data-received-update"),this._presetSelect.value||n.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,o.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,o.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 n=(0,o.A)("DIV",{className:"ThemeBundleEditor-stage-main"}),t=(0,o.A)("DIV",{className:"ThemeBundleEditor-stage-top"},(0,o.A)("a",{className:"Popup-heading ThemeBundleEditor-close",onclick:e=>{this._closeEditor()}},this._labels.close));if(this._editorStage.appendChild(t),this._editorStage.appendChild(n),e.appendChild(this._editorStage),e.querySelector('.CIG-row[data-field-name$="._preset"]')){const n=e.querySelector(".CIG-row");n&&e.insertBefore((0,o.A)("DIV",{className:"ThemeBundleEditor-top","data-tab":this._labels.tab},this._editorToggle),n)}}_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 n=await fetch(e.href),t=await n.text(),i=document.createElement("template");i.innerHTML=t,this._sg=i.content.querySelector('.Tab[data-tab="Styleguide"] iframe'),this._editorStage.querySelector(".ThemeBundleEditor-stage-main").appendChild(this._sg);const r=(0,o.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")}}},84410(e,n,t){"use strict";(0,t(53853).A)(".TimedContentPlayerNote",async()=>{window.BRIGHTSPOT?.ui.cms.enableV5UI||await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(2415)]).then(t.bind(t,27271)),await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(2415)]).then(t.bind(t,26602))})},38948(e,n,t){"use strict";(0,t(53853).A)(".VideoEditor",async()=>{window.BRIGHTSPOT?.ui.cms.enableV5UI||await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(4582),t.e(3543),t.e(4795),t.e(8863)]).then(t.bind(t,64583)),await Promise.all([t.e(8897),t.e(4114),t.e(1173),t.e(4582),t.e(3543),t.e(4795),t.e(8863)]).then(t.bind(t,71852))})},84164(e,n,t){"use strict";var o=t(45055),i=t(28211);(0,o.A)(".ViewMirror",async e=>{const n=e.dataset.contentUrl;if(!n)return;const t=e.dataset.refreshUrl;if(!t)return;const o=e.querySelector(".ViewMirror-content");if(!o)return;let r;const a=async()=>{o.innerHTML=await(await fetch(n,{cache:"no-cache"})).text();const e=o.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(t),s.onmessage=e=>{switch(JSON.parse(e.data).action){case"update-content":a();break;case"update-preview":r&&r.updatePreview()}})},1e3)})},28211(e,n,t){"use strict";t.d(n,{A:()=>s}),t(57573);var o=t(45055),i=t(23902);const r=window.BRIGHTSPOT?.ui.tooltips;let a=0;class s{get isVisible(){return this.__isVisible}set isVisible(e){this.__isVisible=e}constructor(e,n){this.__isVisible=!1,this.__preview=e,this.__onPreviewUpdate=n,this.__typeFrame=e.querySelector(".PreviewFrame-typeFrame"),this.__reloadButton=e.querySelector(".PreviewFrame-reload");const t=e.closest(".Page-content, .Popup");if(t){const e=t.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 n=document.createElement("IFRAME");n.name="PreviewFrame-preview"+a++,n.setAttribute("title",r.preview.iframeTitle);const t=this.__previewDisplay.querySelector("iframe[name^='PreviewFrame-preview']:not(.Preview-overlayFrame)"),o=this.__previewControls.querySelector(".deviceWidthSelect");let s=t?.style.width;if(!s){const e=o?.options[o?.selectedIndex],n=parseInt(e?.getAttribute("data-device-width")||"0",10);n&&(s=`${n}px`)}s&&(n.style.width=s),t?.style.transform&&(n.style.transform=t.style.transform);const c=t?.style.getPropertyValue("--PreviewFrame-scale");c&&n.style.setProperty("--PreviewFrame-scale",c),this.__previewDisplay.insertBefore(n,this.__previewDisplay.firstChild),n.setAttribute("data-container-id",this.containerId);const d=n.closest(".Popup"),l=(e=null)=>{const n=d??document;n.querySelector(".ContentEdit-previewButtonWrapper")?.classList.toggle("is-animating",e)};l(!0),n.onload=()=>{const e=[];this.__onPreviewUpdate&&this.__onPreviewUpdate(),l(!1);for(let t=n;t=t.nextElementSibling;)"IFRAME"!==t.tagName||t.classList.contains("Preview-overlayFrame")||e.push(t);const t=n.parentNode;e.forEach(e=>t.removeChild(e))},(0,i.A)(n,()=>l(!1)),e.target=n.name,e.submit()}}reloadPreview(){this.__reloadButton.click()}deletePreview(){this.__typeFrame.innerHTML=""}}(0,o.A)(".deviceWidthSelect",async e=>{let n=e.closest(".PreviewFrame-typeControlsContainer");if(!n)return;let t=n.querySelector("form");t&&e.addEventListener("change",e=>{document.querySelector("iframe[name='"+t.target+"']")&&(window.dispatchEvent(new Event("resize")),window.dispatchEvent(new Event("viewport-device-changed")))})}),(0,o.A)('select[name="_mainObjectId"]',e=>{const n=e.closest(".Page-content, .Popup");n&&e.addEventListener("change",()=>{n.classList.toggle("is-previewToEditDisabled",e.value)})})},64854(e,n,t){"use strict";t(49371),t(96648);var o=t(18101),i=t(60021),r=t(76394),a=t(45055),s=t(79365);const c=window.BRIGHTSPOT?.ui.tooltips;(0,a.A)('.Widget a[target="toolUserTfa"]',e=>{const n=e.closest(".Widget").querySelector(".Widget-controls");n&&(e.setAttribute("data-popup-mode","local"),n.insertBefore(e,n.firstChild))}),(0,a.A)(".Widget-controls",e=>{const n=e.closest(".Widget"),t=(0,r.A)(n,":scope > .widget-contentCreate li");if((0,i.A)(e,":scope > button:not(.FormFilter-icon)")&&e.closest(".Widget").querySelector("form").prepend(e),t.length<1)return;const a=(0,o.A)("ul",{className:"Widget-actionsList",role:"menu","aria-label":c.actions?.widget}),d=(0,o.A)("div",{className:"Widget-actions"}),l=(0,o.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,l,d)}});for(const e of t)a.appendChild(e);const p=(0,i.A)(e,':scope > button[name="action-delete"]');p&&a.appendChild((0,o.A)("li",p)),d.appendChild(l),d.appendChild(a),d.setAttribute("data-tether-anchor",""),e.appendChild(d),(0,s.D1)(a,l)}),(0,a.A)("[data-widget-id]:not(.Guide-tabCluster)",e=>{e.addEventListener("focusin",()=>{if(document.body.classList.contains("is-guideOpen")){const n=[...document.querySelectorAll(".Guide")].pop().querySelector(`.Guide-tabCluster[data-widget-id="${e.dataset.widgetId}"]`);if(n){const e=n.closest(".Guide-content");e.querySelectorAll(".is-focus").forEach(e=>e.classList.remove("is-focus")),e.scrollTo({top:0}),n.scrollIntoView(!0),n.nextElementSibling.classList.add("is-focus")}}})})},2565(e,n,t){"use strict";(0,t(53853).A)(".AppetizeioPreviewPage",async()=>{await Promise.all([t.e(8897),t.e(4114),t.e(2963)]).then(t.bind(t,77875))})},59981(){const e=window.fetch;window.fetch=function(){const n=[...arguments],t=n.length>1?n[1]:{};return"object"!=typeof t||t.credentials||(t.credentials="same-origin"),n[1]=t,e.apply(this,n)}},75633(e,n,t){"use strict";var o=t(88630),i=t.n(o);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}},6349(e,n,t){"use strict";var o=t(50195),i=t(88630);window.define=o.E8,window.require=o.Yp,window.requirejs=o.nw,(0,o.E8)("bsp-utils",[],()=>t(88097)),(0,o.E8)("iframeResizer",[],()=>t(34346)),(0,o.E8)("ColorRotator",[],()=>t(72404)),(0,o.E8)("jquery",[],()=>i),(0,o.E8)("v3/rtc",[],()=>t(23054).default)},22777(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(55408)},18101(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(25936)},76752(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(96203)},45055(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(91762)},23902(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(35083)},97204(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(46391)},23054(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>o.A});var o=t(75230)},72404(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>s});var o=t(36450),i=t.n(o);const r=(0,t(13904).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],n=window.BRIGHTSPOT?.ui.cms.enableV5UI?i().keyword.hex(e.v5):r.getColor(e.v4,5),[t,o,s]=i().hex.hsl(n);return`#${i().hsl.hex([t+20*Math.floor(this._index++/a.length),o,s])}`}}},93832(e,n,t){"use strict";t.d(n,{A:()=>o.A});var o=t(71669)},72117(e,n,t){"use strict";var o=t(45055),i=t(23054);(0,o.A)('.Widget[data-internal-name="com.psddev.assign.widget.AssignmentContentWidget"]',e=>{const n=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",t=>{const o=(t.mainObjectValues||t.values)["assign.assignments"];if(o)for(var i of o)if(i._ref===n){let n=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(n)&&n.click();break}})})},46131(e,n,t){"use strict";t(86634),t(49371),t(96648);var o=t(45055),i=t(22777),r=t(23054),a=t(18101),s=t(79365);(0,o.A)(".AssignmentDeskDashboard-actionsToggle",e=>{const n=e.closest(".AssignmentDeskDashboard-actionsWrapper").querySelector(".AssignmentDeskDashboard-actions");(0,s.D1)(n,e),e.addEventListener("click",t=>{(0,s.AM)(n,e)})}),(0,o.A)('.AssignmentDeskDashboard .SearchWidget-type .ComboInput-option:not([data-value*="-"])',e=>{e.remove()}),(0,o.A)(".AssignmentDeskDashboard .toolbar .AssignmentDeskDashboard-title",e=>{const n=e.closest(".SearchWidget");n.querySelector(":scope > .AssignmentDeskDashboard-title")?e.remove():n.appendChild(e)}),(0,o.A)(".AssignmentDeskDashboard.SearchWidget",e=>{const n=Array.from(document.querySelectorAll('select[name="st"] option'),e=>{if(e.value)return e.value});new MutationObserver(n=>{e.classList.remove("has-refresh")}).observe(e.querySelector(".SearchWidget-result"),{attributes:!0,attributeFilter:["class"]}),r.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",t=>{let o,i,r;if(t.mainObjectId?(i=t.contentTypeId,r=t.contentId,o=t.values):(i=t.mainObjectIdTypeId,r=t.mainObjectId,o=t.mainObjectValues),n.includes(i)){const n=e.querySelectorAll(`.SearchWidget-result a[href$="${r}"]:not([data-rtc-updated]):not([target="SingleFieldUpdateTarget"])`);if(n.length>0){for(const e of n){const n=e.closest("tr");if(n&&n.classList.contains("has-updateAttempt"))return}e.classList.add("has-refresh"),n.forEach(e=>{e.setAttribute("data-rtc-updated",!0),e.parentElement.insertBefore((0,a.A)("span",{class:"Label is-updated",title:`${t.userName} - ${new Date(t.date).toLocaleString()}`},"Updated"),e)})}e.classList.contains("has-refresh")||o["cms.content.publishDate"]!==o["cms.content.updateDate"]||e.classList.add("has-refresh")}})});const c=function(e){e.addEventListener("click",n=>{if(e.classList.contains("is-open")){const e=document.getElementById("calendarPopup");e&&(n.preventDefault(),n.stopImmediatePropagation(),e.dispatchEvent(new CustomEvent("close",{bubbles:!0})))}else e.classList.toggle("is-open")})};(0,o.A)(".SingleFieldUpdate-date",e=>{c(e)}),(0,o.A)(".SingleFieldUpdate-content .DateTimeInput",e=>{const n=e.closest(".Popup");if(n&&"SingleFieldUpdateTarget"===n.getAttribute("name")){e.click();const t=document.getElementById("calendarPopup"),o=n.querySelector(".SingleFieldUpdate-form");if(!o)return;const r=o.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=o.querySelector("button"),d=e.previousSibling;if(!(t&&s&&c&&d))return;t._tether=new i.A(s,t),t.onclose=()=>{s.classList.contains("is-open")&&s.classList.toggle("is-open"),n.classList.remove("is-visible","popup-show"),t.remove()},d.addEventListener("change",e=>{e.preventDefault();const n=s.closest("tr");n&&(n.classList.add("has-updateAttempt"),c.click(),t.dispatchEvent(new CustomEvent("close",{bubbles:!0})))})}}),(0,o.A)(".SingleFieldUpdate-success",e=>{e.parentNode.classList.remove("is-visible","popup-show");const n=document.querySelectorAll(`.SearchWidget-result a[href$="${e.dataset.objectid}"]:not([data-rtc-updated]):not([target="SingleFieldUpdateTarget"])`),t=e.content.firstElementChild;t&&(t.classList.add("is-updated"),n.length>0&&n.forEach(e=>{const n=e.closest("tr");if(n){const e=t.cloneNode(!0),o=e.querySelector(".SingleFieldUpdate-date");o&&c(o),n.replaceWith(e)}}),t.remove())}),(0,o.A)(".SingleFieldUpdate-error",e=>{window.alert(e.textContent),e.parentNode.classList.remove("is-visible","popup-show")})},44726(e,n,t){"use strict";(0,t(45055).A)(".AssociatedContent",e=>{const n=e.parentElement;n&&n.classList.add("is-associatedContentWidget")})},9386(e,n,t){"use strict";(0,t(45055).A)(".BulkUploadProcessor li[data-tab]",e=>{const n=e.getAttribute("data-tab"),t=e.closest(".objectInputs").querySelector('[data-tab="'+n+'"][data-upload-mime-type-count]');let o;if(t&&(o=t.getAttribute("data-upload-mime-type-count")),o){const n=document.createElement("SPAN");n.classList.add("MimeTypeCount"),n.innerText=o,e.append(n)}})},56435(e,n,t){"use strict";(0,t(45055).A)(document,".Calendar .calendarEvent",e=>{const n=e.dataset.color;n&&e.style.setProperty("--bg-color",n)})},58014(e,n,t){"use strict";(0,t(45055).A)(".ButtonForClosableWindow",e=>{e.addEventListener("click",n=>{const t=e.getAttribute("data-url");t&&(n.preventDefault(),window.open(t,"_blank"))})})},77469(e,n,t){"use strict";var o=t(45055),i=t(23054);(0,o.A)('.Widget[data-internal-name="com.psddev.assign.widget.PitchAssignmentsWidget"]',e=>{const n=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.assign.AssignmentRtcBroadcast",t=>{if(t.pitchId===n){let n=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(n)&&n.click()}})})},72168(e,n,t){"use strict";var o=t(45055),i=t(23054);(0,o.A)('.Widget[data-internal-name="com.psddev.assign.widget.PitchContentWidget"]',e=>{const n=e.closest(".ContentEdit[data-content-id]").getAttribute("data-content-id");i.default.receive("com.psddev.cms.tool.page.content.PublishBroadcast",t=>{const o=(t.mainObjectValues||t.values)["assign.pitches"];if(o)for(var i of o)if(i._ref===n){let n=e.querySelector(".AssignmentDeskWidget-refresh");document.contains(n)&&n.click();break}})})},39721(e,n,t){"use strict";var o=t(45055),i=t(79365);(0,o.A)(".Revisions-more",e=>{const n=e.nextSibling;(0,i.D1)(n,e),e.addEventListener("click",()=>{(0,i.AM)(n,e)})}),(0,o.A)(".Revisions-listItem.is-parentRevision",e=>{const n=e.querySelector(".Revisions-listItem-collapseButton"),t=e.querySelector(".Revisions-listItem-children"),o=e.dataset.id;n.addEventListener("click",e=>{e.preventDefault(),e.stopImmediatePropagation(),n.classList.contains("is-active")?(localStorage.removeItem(`BSP.ContentEdit.suggestionCollapsible.${o}`),n.classList.remove("is-active"),t.style.display="none"):(localStorage.setItem(`BSP.ContentEdit.suggestionCollapsible.${o}`,1),n.classList.add("is-active"),t.style.display="block")}),localStorage.getItem(`BSP.ContentEdit.suggestionCollapsible.${o}`)&&(n.classList.add("is-active"),t.style.display="block")}),(0,o.A)(".Revisions-statusLabel",e=>{const n=e.dataset.statusColor,t=e.style;!n||e.closest(".Revisions-listItem-children")?t.setProperty("--workflow-color","var(--color-gray6)"):t.setProperty("--workflow-color",n)}),(0,o.A)(".message.is-revision",e=>{const n=e.querySelector(".Message-icon"),t=e.dataset.statusColor;if(!t)return;const o=n?.style;o.setProperty("--Revision-revisionColor",t)})},16890(e,n,t){"use strict";t.d(n,{WA:()=>r,cX:()=>o});const o=!("undefined"==typeof navigator)&&(/Mac/.test(navigator.platform)||/macOS/.test(navigator.userAgentData?.platform)),i=o?"Alt+Tab":"F6";function r(e){return e.replace(/Alt\+Tab/g,i)}},75230(e,n,t){"use strict";t.d(n,{A:()=>p}),t(86634),t(57573);var o=t(43386),i=t(95408),r=(t(62953),t(94286));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,n,t){e&&(this._requests.push({message:e,callback:n,wait:t}),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:n,callback:t,wait:o}=e,i=new URLSearchParams;i.append("sessionId",this._sessionId),i.append("message",JSON.stringify(n));const r=n.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=>{t&&t(e?JSON.parse(e):null)}).catch(()=>{this._requests.unshift(e),this.reconnect()}).finally(()=>{this._processRequests()}),o){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 n=JSON.parse(e.data);n._first?("string"==typeof n.sessionId&&(this._sessionId=n.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)):n._ping||this._onReceive(n)},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,d=["com.psddev.cms.tool.page.content.PublishBroadcast","com.psddev.assign.AssignmentRtcBroadcast","com.psddev.cms.conversation.PostBroadcast","brightspot.liveblog.LiveBlogPostRtcBroadcast"];let l;if(window.DISABLE_RTC||!document.documentElement.dataset.userId)l={initialize:function(){},restore:function(){},receive:function(){},receiveOnce:function(){},execute:function(){}};else{const e="broadcast",n="callback",t="connect",r="connect",p="execute",M="restore",u={},b=(e,n)=>{if(!s||c||!d.includes(e))for(const t of u[e]??[])t(n)},h=(e,n)=>{for(const{broadcast:e,data:t}of n??[])b(e,t);e&&e(n)},z=`${(0,i.A)()}-`;let O=0;const f=new o.X2("brightspot-rtc"),m=(e,t)=>{const o=z+ ++O,i=({type:e,callbackId:r,broadcasts:a})=>{e===n&&r===o&&(f.removeEventListener("message",i),h(t,a))};f.addEventListener("message",i),f.postMessage({type:M,message:e,callbackId:o})},g=[],A={};let w;f.addEventListener("message",({type:n,broadcast:o,data:i})=>{if(n===t)for(const{message:e,callback:n}of g)m(e,n);else n===e&&b(o,i)});const v=(e,n)=>{w.send(e,e=>{h(n,e)})};(0,o.XS)(f).awaitLeadership().then(()=>{w=new a(`${window.ROOT_PATH}/_rtc`),f.addEventListener("message",({type:e,message:t,callbackId:o})=>{e===r||e===p?w.send(t):e===M&&w.send(t,e=>{f.postMessage({type:n,callbackId:o,broadcasts:e})})}),w.connect({onConnect:()=>{f.postMessage({type:t});for(const{message:e,callback:n}of g)v(e,n)},onReceive:({broadcast:n,data:t})=>{if(n&&t&&(f.postMessage({type:e,broadcast:n,data:t}),b(n,t),!s||c||!d.includes(n)))for(const e of A[n]??[])e(t)}})}),l={initialize:function(e,n,t){l.restore(e,n,t),window.addEventListener("unload",()=>{const o={type:"disconnect",className:e,data:n};w?w.send(o,t,!0):f.postMessage({type:r,message:o})})},restore:function(e,n,t){const o={type:"restore",className:e,data:n};g.push({type:M,message:o,callback:t}),w?v(o,t):m(o,t)},receive:function(e,n){n&&(u[e]??=[]).push(n)},receiveOnce:function(e,n){n&&(A[e]??=[]).push(n)},execute:function(e,n){const t={type:"execute",className:e,data:n};w?w.send(t):f.postMessage({type:p,message:t})}}}const p=l},37180(e,n,t){"use strict";t.d(n,{A:()=>f}),t(57573),t(49371),t(96648),t(56065);var o=t(71224),i=t(98474),r=t(67324),a=t(67102);function s(){s=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,n){["method","field"].forEach(function(t){n.forEach(function(n){n.kind===t&&"own"===n.placement&&this.defineClassElement(e,n)},this)},this)},initializeClassElements:function(e,n){var t=e.prototype;["method","field"].forEach(function(o){n.forEach(function(n){var i=n.placement;if(n.kind===o&&("static"===i||"prototype"===i)){var r="static"===i?e:t;this.defineClassElement(r,n)}},this)},this)},defineClassElement:function(e,n){var t=n.descriptor;if("field"===n.kind){var o=n.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===o?void 0:o.call(e)}}Object.defineProperty(e,n.key,t)},decorateClass:function(e,n){var t=[],o=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!l(e))return t.push(e);var n=this.decorateElement(e,i);t.push(n.element),t.push.apply(t,n.extras),o.push.apply(o,n.finishers)},this),!n)return{elements:t,finishers:o};var r=this.decorateConstructor(t,n);return o.push.apply(o,r.finishers),r.finishers=o,r},addElementPlacement:function(e,n,t){var o=n[e.placement];if(!t&&-1!==o.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");o.push(e.key)},decorateElement:function(e,n){for(var t=[],o=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=n[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,n),c.finisher&&o.push(c.finisher);var d=c.extras;if(d){for(var l=0;l<d.length;l++)this.addElementPlacement(d[l],n);t.push.apply(t,d)}}return{element:e,finishers:o,extras:t}},decorateConstructor:function(e,n){for(var t=[],o=n.length-1;o>=0;o--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,n[o])(i)||i);if(void 0!==r.finisher&&t.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:t}},fromElementDescriptor:function(e){var n={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(n.initializer=e.initializer),n},toElementDescriptors:function(e){if(void 0!==e)return(n=e,function(e){if(Array.isArray(e))return e}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return b(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(e,n):void 0}}(n)||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 n=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),n},this);var n},toElementDescriptor:function(e){var n=e.kind+"";if("method"!==n&&"field"!==n)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+n+'"');var t=u(e.key),o=e.placement+"";if("static"!==o&&"prototype"!==o&&"own"!==o)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 "'+o+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:n,key:t,placement:o,descriptor:Object.assign({},i)};return"field"!==n?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:M(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var n={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),n},toClassDescriptor:function(e){var n=e.kind+"";if("class"!==n)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+n+'"');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 t=M(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,n){for(var t=0;t<n.length;t++){var o=(0,n[t])(e);if(void 0!==o){if("function"!=typeof o)throw new TypeError("Finishers must return a constructor.");e=o}}return e},disallowProperty:function(e,n,t){if(void 0!==e[n])throw new TypeError(t+" can't have a ."+n+" property.")}};return e}function c(e){var n,t=u(e.key);"method"===e.kind?n={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?n={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?n={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(n={configurable:!0,writable:!0,enumerable:!0});var o={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:n};return e.decorators&&(o.decorators=e.decorators),"field"===e.kind&&(o.initializer=e.value),o}function d(e,n){void 0!==e.descriptor.get?n.descriptor.get=e.descriptor.get:n.descriptor.set=e.descriptor.set}function l(e){return e.decorators&&e.decorators.length}function p(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function M(e,n){var t=e[n];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+n+"' to be a function");return t}function u(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function b(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function h(e,n,t,o){var i=z(O(1&o?e.prototype:e),n,t);return 2&o&&"function"==typeof i?function(e){return i.apply(t,e)}:i}function z(){return z="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,n,t){var o=function(e,n){for(;!{}.hasOwnProperty.call(e,n)&&null!==(e=O(e)););return e}(e,n);if(o){var i=Object.getOwnPropertyDescriptor(o,n);return i.get?i.get.call(arguments.length<3?e:t):i.value}},z.apply(null,arguments)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}let f=(m=[(0,i.EM)("btu-table")],g=(0,r.m)((0,a.s)(o.WF)),A=s(),w=function(e,n){class t extends n{constructor(...n){super(...n),e(this)}}return{F:t,d:[{kind:"field",decorators:[(0,i.nJ)("table")],key:"_table",value:void 0},{kind:"method",key:"connectedCallback",value:function(){h(t,"connectedCallback",this,3)([]),this._table.then(e=>{const n=e.querySelector(':scope th > input[type="checkbox"]');n?.addEventListener("click",this._updateCheckAll),e.querySelectorAll(':scope > tbody input[type="checkbox"]').forEach(e=>{e.addEventListener("click",this._updateSelectAll)})})}},{kind:"method",key:"disconnectedCallback",value:function(){h(t,"disconnectedCallback",this,3)([]),this._table.then(e=>{const n=e.querySelector(':scope th > input[type="checkbox"]');n?.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 n=e.querySelector(':scope th > input[type="checkbox"]'),t=e.querySelectorAll(':scope > tbody input[type="checkbox"]'),o=e.querySelectorAll(':scope > tbody input[type="checkbox"]:checked');n&&(n.checked=t.length>0&&o.length===t.length,this.emit("btu-table-checked-all"))})}}},{kind:"field",key:"_updateCheckAll",value(){return e=>{this._table.then(n=>{const t=e.target;t instanceof HTMLInputElement&&(n.querySelectorAll(':scope > tbody input[type="checkbox"]').forEach(e=>{e.checked=t.checked}),this.emit("btu-table-checked-all"))})}}},{kind:"method",key:"render",value:function(){return o.s6}}]}}(function(e){A.initializeInstanceElements(e,v.elements)},g),v=A.decorateClass(function(e){for(var n=[],t=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},o=0;o<e.length;o++){var i,r=e[o];if("method"===r.kind&&(i=n.find(t)))if(p(r.descriptor)||p(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}d(r,i)}else n.push(r)}return n}(w.d.map(c)),m),A.initializeClassElements(w.F,v.elements),A.runClassFinishers(w.F,v.finishers));var m,g,A,w,v},13904(e,n,t){"use strict";t.d(n,{A:()=>M}),t(49371),t(96648),t(56065);var o=t(36450),i=t.n(o),r=t(25936),a=t(91762);const s=[90,81,72,38,14,8,4],c=[3,5,7,14,26,42,65],d={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 l(e){const[n,t,o]=e.map(e=>e/255).map(e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return 100*(.2126*n+.7152*t+.0722*o)}const p=new class{constructor(e){this._element=void 0,this._dark=!1,this._theme=void 0,this.createTable=(e,n,t)=>{const o=(0,r.A)("table",{className:"Theme-colors"}),i=(0,r.A)("tr");o.appendChild(i),i.appendChild((0,r.A)("td",{colspan:2}));const a=this._dark?t:n,s=a?JSON.parse(a):this._theme[this._dark?"darkLuminances":"luminances"],c=e?JSON.parse(e):this._theme.colors;return s.forEach((e,n)=>{i.appendChild((0,r.A)("td",(0,r.A)("input",{type:"text",name:"luminance-"+n,value:e,oninput:e=>{e.target instanceof HTMLInputElement&&(s[n]=parseInt(e.target.value,10)),this._updateColorAccent(),this._updateUI()},onkeydown:e=>{if(!(e.target instanceof HTMLInputElement))return;let t=parseInt(e.target.value,10);switch(e.key){case"ArrowUp":t++,e.target.value=t.toString(),s[n]=t,this._updateColorAccent(),this._updateUI();break;case"ArrowDown":t--,e.target.value=t.toString(),s[n]=t,this._updateColorAccent(),this._updateUI()}}})))}),Object.keys(c).forEach(e=>{if("accent"===e)return;const n=(0,r.A)("tr",(0,r.A)("td",e.charAt(0).toUpperCase()+e.slice(1)));n.appendChild((0,r.A)("td",(0,r.A)("input",{className:"color",type:"text",name:"color-"+e,value:c[e],onchange:n=>{n.target instanceof HTMLInputElement&&(c[e]=n.target.value),this._updateColorAccent(),this._updateUI()}})));for(let t=0;t<s.length;t++)n.appendChild((0,r.A)("td",{style:`background:var(--color-${e}${t+1});`}));o.appendChild(n)}),o},this._element=e,(0,a.A)(this._element,".themeColorContainer",e=>{const n=e.dataset.colors,t=e.dataset.luminances,o=e.dataset.darkLuminances,i=e.querySelector("input.appearance");i&&(i.value=this._dark.toString());const r=this.createTable(n,t,o);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 n=e.closest(".CIG-row");if(!n)return;const t=n.nextElementSibling;t&&("true"==e.getAttribute("aria-selected")?t.classList.remove("is-hidden"):t.classList.add("is-hidden"),new MutationObserver(e=>{e.forEach(e=>{if("attributes"===e.type){const n=e.target;n instanceof Element&&"true"==n.getAttribute("aria-selected")?t.classList.remove("is-hidden"):t.classList.add("is-hidden")}})}).observe(e,{attributes:!0}))});const n=window.localStorage.getItem("BSP.Theme");let t=!1;const o=document.documentElement.dataset.theme??"";try{JSON.parse(o),t=!0}catch(e){t=!1}this._theme=t?JSON.parse(o):n?JSON.parse(n):function(){const e=d.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 n of e)n.classList.toggle("is-dark",this._dark),n.classList.toggle("is-boxedInput",!!this._theme.boxedInput),n.classList.toggle("is-compact",!!this._theme.compact),n.classList.toggle("is-compactRails",!!this._theme.compactRails),n.classList.toggle("is-highContrast",!!this._theme.highContrast),"more"===this._theme.contrastChoices?n.classList.add("is-moreContrast"):"normal"===this._theme.contrastChoices&&n.classList.add("is-normalContrast");const n=this._element.style,t=this._theme.headerBackground;if(t){n.setProperty("--Page-headerBackground",t);for(const n of e)n.classList.toggle("is-lightHeader",l(i().hex.rgb(t))>Math.sqrt(100)!=this._dark)}else if(this._dark){n.setProperty("--Page-headerBackground","var(--color-dominant1)");for(const n of e)n.classList.add("is-lightHeader")}else{n.setProperty("--Page-headerBackground","var(--color-dominant7)");for(const n of e)n.classList.remove("is-lightHeader")}const o=i().hex.hsl(this._theme.colors.gray),r=this._guessColor(o[0],o[1],1),a=this._guessColor(o[0],o[1],100);this._dark?(this._setColorProperty(n,"black",a),this._setColorProperty(n,"white",r),n.setProperty("--color-iconHoverBackground","rgba(255, 255, 255, 0.08)")):(this._setColorProperty(n,"black",r),this._setColorProperty(n,"white",a),n.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,t]=i().hex.hsl(this._theme.colors[c]);s?.forEach((o,i)=>{this._setColorProperty(n,`${c}${i+1}`,this._guessColor(e,t,this._theme.highContrast&&3==i?this._dark?4.5*(o+5)-5:(o+5)/4.5-5:o))})}}_guessColor(e,n,t){let o=100,r=0;for(let a=0;a<=100;a+=.1){const s=Math.abs(t-l(i().hsl.rgb([e,n,a])));o>s&&(o=s,r=a)}return i().hsl.rgb([e,n,r])}_setColorProperty(e,n,t){e.setProperty(`--color-${n}`,"#"+i().rgb.hex(t)),e.setProperty(`--rgb-${n}`,t.join(" "))}_updateColorAccent(){this._theme.colors.accent=this._theme.colors.dominant}getColor(e,n){return this._element.style.getPropertyValue(`--color-${e}${n}`)}}(document.documentElement);function M(){return p}},39979(e,n,t){"use strict";function o(e,n){if(e<=0)return n;let t;return function(){clearTimeout(t),t=setTimeout(()=>{t=void 0,n.apply(this,[...arguments])},e)}}t.d(n,{A:()=>o})},44508(e,n,t){"use strict";function o(e,n){const t=e.closest(".ContentEdit")||e.closest("btu-widget");if(!t)return null;let o,i;if(t.classList.contains("ContentEdit")){if(o=t.getAttribute("data-type-id"),i=e.getAttribute(n),!o||!i)return null}else if(t instanceof HTMLElement&&(o=t.getAttribute("widgetid"),i=t.getAttribute("internalname"),!o||!i))return null;return o&&i?`BSP.ContentEdit.widgetCollapsed.${o}.${i}`:null}t.d(n,{A:()=>o})},39403(e,n,t){"use strict";function o(e){let n;return function(){n&&window.cancelAnimationFrame(n),n=window.requestAnimationFrame(()=>{n=void 0,e.apply(this,[...arguments])})}}t.d(n,{A:()=>o})},71669(e,n,t){"use strict";t.d(n,{A:()=>i});const o=window.localStorage,i={get:e=>o.getItem(e),set:(e,n)=>o.setItem(e,n),toggle:(e,n)=>(void 0===n&&(n=!o.getItem(e)),n?o.setItem(e,"1"):o.removeItem(e),n)}},98376(e,n,t){"use strict";t.d(n,{OK:()=>i,eu:()=>r,lj:()=>a});const o=/[\r\n%#()<>?[\\\]^`{|}]/g;function i(e){return e.indexOf("http://www.w3.org/2000/svg")<0&&(e=e.replace(/<svg/g,"<svg xmlns='http://www.w3.org/2000/svg'")),e}function r(e,n){const t=e.match(/<svg[^>]*>/);if(!t)return e;const o=t[0],i=`<mask id="${n}">`,r=e.indexOf(o)+o.length,a=e.lastIndexOf("</svg>");return e.slice(0,r)+i+e.slice(r,a)+"</mask>"+e.slice(a)}function a(e){return(e=(e=(e=e.replace(/"/g,"'")).replace(/>\s{1,}</g,"><")).replace(/\s{2,}/g," ")).replace(o,encodeURIComponent)}},94286(e,n,t){"use strict";function o(e,n){if(e<=0)return n;let t,o=0;return function(){if(t)return;const i=Date.now(),r=e-i+o;r<=0?(o=i,n.apply(this,[...arguments])):t=setTimeout(()=>{o=i,t=void 0,n.apply(this,[...arguments])},r)}}t.d(n,{A:()=>o}),Object.defineProperty(o,"name",{value:"default",configurable:!0})},12471(e,n,t){"use strict";function o(e){return Promise.allSettled(e.getAnimations().map(e=>e.finished))}t.d(n,{W:()=>o}),t(49371),t(56065)},77172(e,n,t){"use strict";t.a(e,async(e,n)=>{try{t(86634),t(49371),t(26780),t(96648);var o=t(88646),i=(t(29819),t(25421)),r=t(91762),a=t(25936),s=t(90127),c=t(71669),d=(t(96989),t(1356),t(61692),t(83046)),l=t(76375),p=(t(59909),t(12471)),M=(t(44479),t(35083)),u=(t(16918),t(63882)),b=t(94286),h=t(49309),z=t(66e3),O=(t(27802),e([o]));function f(e,n){const t=(window.BRIGHTSPOT?.icons?.materialToLucide??{})[e]??e,o=(0,l.s)(t,n);n.style.setProperty("--compat-icon",`'${o?.compat??""}'`),o?.encodedSvg?n.style.setProperty("--compat-icon-via-mask",`url("data:image/svg+xml,${o.encodedSvg}")`):n.style.removeProperty("--compat-icon-via-mask")}o=(O.then?(await O)():O)[0],(0,r.A)("html",e=>{for(let n=e.style.length-1;n>=0;n--){const t=e.style[n];(t?.startsWith("--color")||t?.startsWith("--rgb"))&&e.style.removeProperty(t)}}),(0,r.A)(".Page-nav",e=>{e.removeAttribute("inert");const n=document.querySelector(".Page-navToggle");n&&document.querySelector(".Page-header")?.insertAdjacentElement("afterbegin",n)}),(0,r.A)(".Page-navItemToggle",e=>{const n=new u.A;n.symbol="chevron-down",e?.prepend(n)}),(0,r.A)(".Page-navToggle",e=>{function n(n){const t=n?window.BRIGHTSPOT?.ui.tooltips.menu.close:window.BRIGHTSPOT?.ui.tooltips.menu.open;e.title=t,e.ariaLabel=t}e.onclick=()=>{const t="false"===e.ariaExpanded;e.ariaExpanded=t?"true":"false",n(t),(0,i.L)(t?"ON":"OFF");const o=document.querySelectorAll(".Page-main > btu-nav-rail a"),r=e.closest(".Page"),a=document.querySelector(".Page-main > btu-nav-rail");r?.classList.add("is-nav-animating"),a?(0,p.W)(a).then(()=>r?.classList.remove("is-nav-animating")):r?.classList.remove("is-nav-animating"),t?o.forEach(e=>{e.parentElement?.hasAttribute("aria-expanded")?e.title=e.parentElement?.classList.contains("is-expanded")?window.BRIGHTSPOT?.ui.tooltips.collapse:window.BRIGHTSPOT?.ui.tooltips.expand:e.title=""}):o.forEach(e=>{e.title=e.querySelector(":scope > span")?.textContent??""})};const t=(0,i.J)();window.matchMedia("not all and (min-width: 768px)").matches?e.setAttribute("aria-expanded","false"):null!==t&&e.setAttribute("aria-expanded","ON"===t?"true":"false"),n("true"===e.ariaExpanded),"false"===e.getAttribute("aria-expanded")&&document.querySelectorAll(".Page-main > btu-nav-rail a").forEach(e=>{e.title=e.querySelector(":scope > span")?.textContent??""})}),(0,r.A)(".toolUserDisplay",e=>{const n=e.querySelector(".toolUserSite");if(n){const e=document.querySelector(".toolTitle");e?.append(n)}}),(0,r.A)(".ContentEdit-top",e=>{const n=e.closest(".ContentEdit");e.querySelector(".WorkInProgressSaveStatus")&&e.classList.add("has-wips");const t=n?.querySelector(":scope .ContentEdit-main > .Message");if(t&&(e.insertAdjacentElement("afterend",t),!t.closest(".LiveBlogGrid"))){const e=t.closest(".Popup-content, .Page-content");e?.classList.add("has-message")}const o=n?.querySelector(".ContentEdit-title");if(!o)return;const i=o.querySelector("button.ContentEdit-overlay:not(empty)");i&&(e.prepend(i),e.classList.add("has-overlay"))}),(0,r.A)(".Page-header.mobile",e=>{const n=e.closest(".Page-header"),t=n?.querySelector(".Page-search");t&&(t.querySelector(":scope > button")?.removeAttribute("hidden"),t.querySelector("btu-search-input")?.setAttribute("hidden","true"))}),(0,r.A)(".Page .Page-search",e=>{e.querySelector(":scope > button")?.addEventListener("click",()=>{e.setAttribute("aria-expanded","true"===e.getAttribute("aria-expanded")?"false":"true"),"true"===e.getAttribute("aria-expanded")&&(e.querySelector("btu-search-input")?.removeAttribute("hidden"),e.querySelector(":scope > button")?.setAttribute("hidden","true"),e.querySelector("btu-search-input > btu-input > input")?.click())})}),(0,r.A)(".Page .Page-search > btu-search-input > btu-input > input",e=>{e.addEventListener("click",()=>{e.closest('.Page:has( .Popup[name="miscSearch"])')||(e.closest(".Page")?.classList.add("is-searchOpening"),(0,r.A)(".Page dialog:not(:modal)[open] .Popup.loaded.is-ready.is-visible .SearchWidget.is-transitioned",e=>{e.closest(".Page")?.classList.remove("is-searchOpening")}))})}),(0,r.A)("btu-dialog:has(.SearchWidget.is-global)",e=>{e.addEventListener("btu-dialog-closed",()=>{document.querySelector(".Page .Page-search")?.setAttribute("aria-expanded","false");const e=document.querySelector(".Page-header.mobile .Page-search");e?.querySelector("btu-search-input")?.setAttribute("hidden","true"),e?.querySelector(":scope > button")?.removeAttribute("hidden")})}),(0,r.A)(".Page-content:has(.SearchWidget-query)",e=>{e.previousElementSibling?.querySelector(".Page-search")?.setAttribute("aria-expanded","false")}),(0,r.A)(".siteSwitch-logo",e=>{const n=document.querySelector(".Page-title > a > img");n&&e.append(n.cloneNode())}),(0,r.A)(".TabBar.is-menuOnly",e=>{const n=e.querySelector(".TabBar-menu");if(!n)return;const t=n.querySelector(":scope .TabBar-menuList > .TabBar-menuItem.is-selected"),o=(0,a.A)("div",{className:"TabBar-selected-text",innerText:t?.dataset.tab});n.insertBefore(o,n.firstElementChild),n.querySelectorAll(".TabBar-menuItem").forEach(e=>{e.addEventListener("click",n=>{n?.preventDefault(),o.innerText=e.dataset.tab??""})})}),(0,r.A)(".SearchResult-views > ul",e=>{e.querySelectorAll(":scope > li > a").forEach(e=>{const n=e.textContent?.toLowerCase()??"";e.dataset.label=n,e.ariaLabel=n,e.title=n})}),(0,r.A)(".Guide-field > .Guide-embedded:empty",e=>{const n=(0,a.A)("a",{className:"Guide-edit",href:"#",disabled:!0,"aria-disabled":!0});e.append(n)}),(0,r.A)('.Popup[name="edit-guide"] .RCIG-item > btu-legacy-dropdown:not(:empty)',e=>{e?.closest(".RCIG-item")?.classList.add("has-dropdown-actions")}),(0,r.A)("table",e=>{if(["LinkList","LinkTable","term-results"].some(n=>e.classList.contains(n))&&!e.classList.contains("is-static")){const n=e.querySelector(":scope > thead > tr"),t=e.querySelectorAll("tbody > tr"),o=e.querySelector(".LinkTable-main, .LinkList-main, .term-stats-head"),i=o?.closest("tr");if(!i||!o)return;const r=e.querySelector('th > input[type="checkbox"], td > input[type="checkbox"]');if(n){const e=Array.from(i.children).indexOf(o);let t=e;for(let o=0;o<e;o++){const e=n.children[o];e instanceof HTMLTableCellElement&&e.colSpan>1&&(t=t-e.colSpan+1)}const a=n.children[t];r?n.insertBefore(a,n.children[1]):n.insertBefore(a,n.firstElementChild)}t.forEach(e=>{const n=e.querySelector(":scope > td.LinkTable-main, :scope > td.LinkList-main");n&&(r?e.insertBefore(n,e.children[1]):e.insertBefore(n,e.firstElementChild))})}if(e.closest(".DashboardWidget:not(.widget-scheduledEvents), .SearchWidget-result, #term-finder-result")){const n=e.querySelectorAll("tbody tr:first-child > td").length;if(1===n||2===n&&e.querySelector("tr td.LinkList-viewers"))return;const t=e.parentElement;if(!t)return;if(t.childElementCount>1){const n=(0,a.A)("div",{className:"LinkList-wrapper"});t.insertBefore(n,e),n.appendChild(e)}else t.classList.add("LinkList-wrapper")}}),(0,r.A)(".Notification-pagination",e=>{e.closest(".ToolUserNotifications")?.querySelector(".Notification")?.insertAdjacentElement("beforeend",e)}),(0,r.A)(".PR-pagination",e=>{e.closest(".PR")?.querySelector(".LinkList-wrapper, .LinkTable")?.insertAdjacentElement("afterend",e)}),(0,r.A)(".DashboardWidget-pagination",e=>{e.closest(".p-workStreams")?e.closest(".p-workStreams")?.querySelector(".block:not(:has(+ .block))")?.insertAdjacentElement("afterend",e):e.closest(".DashboardWidget:not(.widget-scheduledEvents)")?.querySelector(".LinkList-wrapper, .LinkTable, .LinkList")?.insertAdjacentElement("afterend",e)}),(0,r.A)('.LookingGlass-actions[data-action="copy"]',e=>{const n=document.createElement("btu-copy-to-clipboard");n.classList.add(...e.classList);const t=e.querySelector(":scope > a")?.getAttribute("href"),o=e.querySelector(":scope > a")?.textContent??"",i=e.querySelector(":scope > span")?.textContent??"";t&&(n.copydata=t,n.title=o,n.label=o,e.parentNode?.insertBefore(n,e),e.remove(),n.addEventListener("btu-copy-to-clipboard-copied",e=>{if(e.target instanceof HTMLElement){const n=e.target.querySelector("button");n&&(n.dataset.successLabel=i)}i&&(0,s.iP)(i)}))}),(0,r.A)(".Page-header",e=>{const n=window.matchMedia("not all and (min-width: 768px)");function t(n){const t=e.querySelector(".Page-search");n?(e.classList.add("mobile"),document.body.classList.remove("has-navrail-expanded"),t&&(t.setAttribute("aria-expanded","false"),t.querySelector(":scope > button")?.removeAttribute("hidden"),t.querySelector("btu-search-input")?.setAttribute("hidden","true"))):(e.classList.remove("mobile"),document.body.classList.toggle("has-navrail-expanded","ON"===(0,i.J)()),t&&(t.querySelector("btu-search-input")?.removeAttribute("hidden"),t.querySelector(":scope > button")?.setAttribute("hidden","true")))}t(n.matches),n.addEventListener("change",e=>t(e.matches))}),(0,r.A)([".DateStringCalendar .Month-dowLabel",".Week-day > .Week-dow"],e=>{const n=e.innerText.substring(0,2);e.innerText=n}),(0,r.A)(".Revisions-statusLabel, .Message.is-revision, .ContentSummary-link > .Label, .ComboInput-selected .Label, .ContentSelector-search > .Label, .LinkTable-label > .Label",e=>{const n=e.dataset.statusColor,t=e.style,o=n??t.getPropertyValue("background");o?(t.setProperty("--status-color",o),e.dataset.statusColor=o,t.removeProperty("background"),t.removeProperty("color")):t.removeProperty("--workflow-color")}),(0,r.A)(".Conversation-post .Conversation-reply",e=>{e.innerText?e.innerText=e.title+" ("+e.innerText+")":e.innerText=e.title;const n=e.closest(".Conversation-post");n?.append(e)}),(0,r.A)("ul.LinkTable",e=>{e.querySelectorAll(":scope > li").forEach(e=>{(e=e.querySelector(".ViewWatchers-item-name")||e).title=e.textContent||""})}),(0,r.A)(".DashboardWidget-maximize",e=>{e.closest(".DashboardRow-cell")?.matches(".is-maximized")&&e.setAttribute("aria-expanded","true"),e.addEventListener("click",async n=>{const t=n.target;if(!(t instanceof HTMLElement))return;const o=n=>{n instanceof HTMLElement&&(e.toggleAttribute("aria-expanded")?(n.classList.add("is-maximized"),document.body.classList.add("has-dashboardWidgetMaximized")):(n.classList.remove("is-maximized"),document.body.classList.remove("has-dashboardWidgetMaximized")))},i=t.closest(".DashboardRow-cell");if(i){if(i.classList.contains("is-maximized"))document.body.classList.remove("transition-backdrop"),o(i);else{document.body.classList.add("transition-backdrop"),i.classList.add("transition-dashboard-widget");const e=document.startViewTransition(()=>o(i));await e.finished,i.classList.remove("transition-dashboard-widget")}e.focus()}})}),(0,r.A)(".ImageEditor-groups",e=>{const n=(0,a.A)("button",{className:"ImageEditor-focusToggle",type:"button"});let t=null;e.prepend(n),n.addEventListener("click",n=>{const o=e.classList.toggle("is-focus-active");t||(t=e.querySelector(":scope > .ComboInput")),t&&(t.tabIndex=o?0:-1)})}),(0,r.A)(".SearchWidget-reset",e=>{e.innerText=e.title?.split(" ")[0]}),(0,r.A)(".SearchResult-images a[data-label-html] > figcaption > .contentTitle--v5 > .Label",e=>{e.classList.add("contentStatus--v5"),e.parentElement?.insertBefore(e,e.parentElement.firstChild)}),(0,r.A)(".SearchResult-images[data-height]",e=>{e.style.setProperty("--image-height",e.dataset.height+"dvh"),new MutationObserver(n=>{for(const t of n)"attributes"===t.type&&"data-height"===t.attributeName&&e.dataset.height&&e.style.setProperty("--image-height",e.dataset.height+"dvh")}).observe(e,{attributes:!0,attributeFilter:["data-height"]})}),(0,r.A)(".SearchResult-imageHeightInput",e=>{const n=(0,a.A)("button",{className:"SearchResult-imageHeightToggle v5-only",type:"button",ariaExpanded:"false",title:window.BRIGHTSPOT?.ui.tooltips.imageHeightOpen,ariaLabel:window.BRIGHTSPOT?.ui.tooltips.imageHeightOpen}),t=(0,a.A)("div",{className:"SearchResult-imageHeightContainer v5-only"});e.insertAdjacentElement("beforebegin",t),t.append(e),t.prepend(n),n?.addEventListener("click",()=>{"false"===n.ariaExpanded?(n.ariaExpanded="true",n.title=window.BRIGHTSPOT?.ui.tooltips.imageHeightClose,n.ariaLabel=window.BRIGHTSPOT?.ui.tooltips.imageHeightClose,e?.classList.add("is-open")):(n.ariaExpanded="false",n.title=window.BRIGHTSPOT?.ui.tooltips.imageHeightOpen,n.ariaLabel=window.BRIGHTSPOT?.ui.tooltips.imageHeightOpen,e?.classList.remove("is-open"))})}),(0,r.A)(".Page-askAi",e=>{document.querySelector(".Page-container")?.insertAdjacentElement("beforebegin",e),document.body.classList.add("has-ask-ai")}),(0,r.A)(".Page-notifications",e=>{const n=e.querySelector("a"),t=new u.A;t.symbol="bell",t.fill="gradient";const o=document.createElement("span");o.textContent=window.BRIGHTSPOT?.ui.tooltips.notifications,n?.appendChild(t),n?.appendChild(o);const i=document.querySelector("btu-nav-rail");if(!i)return;const r=i.querySelector(".Page-avatar"),a=r?.closest("li");if(a){const n=document.createElement("li");n.appendChild(e),i.querySelector("ul")?.insertBefore(n,a)}else i.addItem(e)}),(0,r.A)(".Widget-title + .AIChat-frame",e=>{const n=document.createElement("div");n.classList.add("AIChat-wrapper"),n.classList.add("!px-0"),e.parentElement?.insertBefore(n,e),n.appendChild(e)}),(0,r.A)(".SearchResult-board-fields",e=>{const n=e.closest(".SearchResult");if(!n)return;const t=n.querySelector(".SearchResult-sorts");t&&e.prepend(t)}),(0,r.A)(".ContentEdit-workstreamProgress .progressBar",e=>{e.classList.remove("hidden"),e.removeAttribute("hidden");const n=e.style.width;e.style.removeProperty("width"),e.style.setProperty("--progressPct",n)}),(0,r.A)(".ContentEditDrawer-widget-filters",e=>{const n="EXPANDED"===c.A.get("BSP.ContentEdit.shelfFilters"),t=e.closest(".ContentEditDrawer"),o=e.closest(".ContentEditDrawer-widget");if(!t||!o)return;const i=n?window.BRIGHTSPOT?.ui.tooltips.filtersHide:window.BRIGHTSPOT?.ui.tooltips.filtersShow,r=(0,a.A)("button",{className:"ContentEditDrawer-filtersToggle v5-only",type:"button",title:i,ariaLabel:i,ariaExpanded:n?"true":"false"});e?.classList.toggle("is-visible",n);const s=t?.querySelector(".closeButton"),d=t?.querySelector(".ContentEditDrawer-filtersToggle");d?.remove(),s?.parentNode?.insertBefore(r,s),o.classList.contains("is-loading")&&o.classList.remove("is-loading"),r.addEventListener("click",()=>{e?.classList.toggle("is-visible");const n=e?.classList.contains("is-visible"),t=n?window.BRIGHTSPOT?.ui.tooltips.filtersHide:window.BRIGHTSPOT?.ui.tooltips.filtersShow;c.A.set("BSP.ContentEdit.shelfFilters",n?"EXPANDED":"COLLAPSED"),r.title=t,r.ariaLabel=t,r.ariaExpanded=n?"true":"false"}),e.addEventListener("change",()=>{o.classList.add("is-loading")})}),(0,r.A)(".LiveBlogPostListNav.loaded",e=>{const n=e.closest(".Page-main"),t=n?.querySelector(".LiveBlogGrid");if(!t)return;const o=e.querySelector(".LiveBlogPostList-controls a:not(.LiveBlogPostListNav-refresh)");if(!o)return;const i=n=>{const t=e.querySelector("a.is-selected, tr.is-selected");t&&t.classList.remove("is-selected"),n.classList.add("is-selected")};(0,r.A)(".LiveBlogGrid .ContentEdit",n=>{const r=n?.classList.contains("is-new"),a=n?.dataset.objectId;t.classList.add("is-visible");const s=n.querySelector(".ContentEdit-right.is-visible");if(s&&s.classList.remove("is-visible"),r)i(o);else{if(!a)return;const n=e.querySelector(`tr[data-post-id="${a}"]`);n&&i(n)}});let s=t.querySelector(".LiveBlogPostList-open");s||(s=(0,a.A)("button",{className:"LiveBlogPostList-open",ariaLabel:window.BRIGHTSPOT?.ui.tooltips.listOpen,title:window.BRIGHTSPOT?.ui.tooltips.listOpen,type:"button",onclick:()=>{t.classList.remove("is-visible"),e.classList.add("is-visible")}}),t.insertBefore(s,t.firstElementChild)),e.addEventListener("click",n=>{if(n.target instanceof HTMLAnchorElement){const o=n.target;"postedit"===o.target&&(o.closest(".LiveBlogPostList-controls")||o.closest("tr[data-post-id]"))&&(t.classList.add("is-visible"),e.classList.remove("is-visible"))}})}),(0,r.A)(["[data-icon]","[data-icon-name]","[data-icon-button-name]"],e=>{const n=e.dataset.icon||e.dataset.iconName||e.dataset.iconButtonName;n&&f(n,e)}),document.addEventListener("btu-resolve-icon",e=>{const{name:n,element:t}=e.detail;n&&t&&f(n,t)});const m=e=>{const n=e.querySelector(".ContentLabel");if(!n)return;const t=e.closest(".ContentEdit");if(!t)return;const o=t.querySelector(".ContentEdit-top");if(!o)return;const i=()=>(n.textContent??"").replace(/(\r\n|\n|\r)/gm," "),a=()=>{const n=e.querySelector(".ContentEdit-typeName")?.textContent?.trim()||e.querySelector("select")?.selectedOptions[0]?.text||"",r=e.querySelector(".Label"),a=document.createElement("div");a.classList.add("ContentEdit-title--v5");const s=document.createElement("span");s.innerText=n,s.classList.add("ContentEdit-contentType--v5");const c=document.createElement("span");c.innerText=i(),c.classList.add("ContentEdit-contentTitle--v5");const d=document.createElement("span");d.classList.add("ContentEdit-status--v5");const l=e.querySelector("span.Label");if(d.innerText=l?.innerText??"",l){const e=Array.from(l.classList).find(e=>e.startsWith("is-"));e&&d.classList.add(e)}const p=r?.style?.getPropertyValue("background");p&&(d.dataset.statusColor=p,d.style.setProperty("--status-color",p));const M=t.querySelector(".Message.is-revision"),u=M?.querySelector(".ContentEdit-revisionLabel");if(u){d.innerText=u.innerText;const e=M?.dataset.statusColor||M?.style.getPropertyValue("--status-color")||M?.style.getPropertyValue("background");e&&(d.dataset.statusColor=e,d.style.setProperty("--status-color",e))}d.innerText&&""!=d.innerText||(t.classList.contains("is-notNew")&&(d.innerText=window.BRIGHTSPOT?.ui.workflow.published),t.classList.contains("is-new")&&(d.innerText=window.BRIGHTSPOT?.ui.tooltips.new)),a.replaceChildren(c,s,d);const b=o.querySelector(".ContentEdit-title--v5");b?o.replaceChild(a,b):o.prepend(a)},s=new MutationObserver(()=>{const e=o.querySelector(".ContentEdit-contentTitle--v5");e?e.innerText=i():a()});s.observe(n,{attributes:!0}),(0,M.A)(t,()=>s.disconnect()),a(),(0,r.A)(t,".Message.is-revision",e=>{const n=e.dataset.statusColor||e.style.getPropertyValue("--status-color")||e.style.getPropertyValue("background");if(!n)return;const t=o.querySelector(".ContentEdit-status--v5");if(!t)return;const i=e.querySelector(".ContentEdit-revisionLabel");i&&(t.innerText=i.innerText),t.dataset.statusColor=n,t.style.setProperty("--status-color",n)})};if("loading"===document.readyState)window.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector(".ContentEdit-title");e&&m(e)});else{const q=document.querySelector(".ContentEdit-title");q&&m(q)}(0,r.A)([".Popup.loaded .ContentEdit-title",".LiveBlogGrid .ContentEdit-title"],e=>{m(e)}),(0,r.A)('[aria-haspopup][aria-controls]:not([aria-controls=""])',e=>{const n=document.getElementById(e.getAttribute("aria-controls"));null!==n&&(n.setAttribute("popover",""),e.addEventListener("click",()=>{n.showPopover()}))});const g=(e,n,t=!0)=>{if(null===e)return void console.warn("root element provided to `Dialog._renderTitle` is null. Skipping render.");const o=e.querySelector(`:scope > :where(${n})`),i=e.querySelector(`:scope > * :where(${n})`);if(i&&!o){const n=i.cloneNode(!0);n.classList.remove("!hidden"),e.closest(".Popup-content")?.prepend(n),t&&i.classList.add("!hidden")}},A=e=>{if(!e)return;const n=e.closest(".Popup"),t=e.closest("dialog[open]");if(!n||!t)return;const o=n.ariaLabel;let i=t.ariaLabel;if(!i||o&&i!==o){if(o&&(i=o,n.removeAttribute("aria-label")),!i){const e=n.querySelector(":scope > .Popup-content > .Widget-title");i=e?.querySelector(":scope > span")?.textContent||e?.textContent||null}i&&(t.ariaLabel=i)}else n.removeAttribute("aria-label")};function w(e){const n=document.querySelector(".Page-askAiButton");n&&n.setAttribute("aria-expanded",e?"true":"false")}function v(e){const n=e.target;if(n instanceof HTMLElement&&n.classList.contains("AskAi-close")){const e=document.getElementById("askAi-container");e?.classList.remove("is-loaded"),w(!1)}}(0,r.A)("btu-dialog dialog[open] .Popup-content:not(:has(> .frame))",e=>{g(e,"h1,h2,h3,.Widget-title"),A(e)}),(0,r.A)("btu-dialog dialog[open] .Popup.loaded .frame.plugin-popup.loaded",async e=>{await(0,p.W)(e.closest("dialog[open]")),e.classList.add("is-transitioned"),e.querySelector(".SearchInput input:not([hidden]), [class^=Search] > btu-input input:not([hidden])")?.focus(),[".SearchWidget.is-global",'.Widget[name="diff"]','.Widget[name^="create-new-" i]','.Widget[name^="objectId-" i]:not(:has(.ContentReporting-status))','.Widget[name^="_copy" i]','.Widget[name^="DateStringCalendarFrame" i]'].some(n=>e.matches(n))||(g(e.closest(".Popup-content"),"h1,h2,h3,.Guide-title,.Widget-title"),A(e.closest(".Popup-content")))}),(0,r.A)('btu-dialog dialog[open] .Popup.loaded .plugin-popup.loaded.Widget[name^="objectId-" i]:has(.Admin > :where(.Admin-nav, .Admin-main))',e=>{g(e.closest(".Popup-content"),".Admin .Widget-title",!1),A(e.closest(".Popup-content"))}),(0,r.A)('.Popup:not(.PrePublish, [name="queryField"]), .PrePublishPopup',e=>{if(e.classList.contains("is-local")&&(n=e,!n.dataset?.popupSourceClass||!["rte2-toolbar-add-table"].includes(n.dataset.popupSourceClass)))return e.setAttribute("popover",""),e.addEventListener("toggle",n=>{"closed"===n.newState&&(e.dispatchEvent(new CustomEvent("legacy-popup-closed",{bubbles:!0,composed:!0})),e.remove())}),void e.showPopover();var n;const t=new d.A;t.addEventListener("btu-dialog-ready",()=>{M.A.resume()}),M.A.pause(),e.parentNode?.insertBefore(t,e),e.removeAttribute("role"),t.append(e)}),(0,r.A)(".PrePublish:has(.Popup-content)",async e=>{setTimeout(()=>e.classList.add("PrePublishPopup"),0)}),(0,r.A)(".ContentEdit-workflowToggle",e=>{const n=e.parentElement?.querySelector(".ContentEdit-workflow");if(!n)return;const t=new d.A;t.removeOnClose=!1,t.autoOpen=!1,t.addEventListener("btu-dialog-ready",()=>{M.A.resume()}),M.A.pause(),n.parentNode?.insertBefore(t,n),t.append(n),e.addEventListener("click",n=>{e.classList.contains("is-open")?t.show():t.close(n)})}),(0,r.A)(".QueryField-toggle",e=>{const n=e.parentElement?.querySelector(".QueryField");if(!n)return;const t=n.frame;if(!t)return;if(t._bspDialogSetup)return;t._bspDialogSetup=!0;const o=new d.A;o.removeOnClose=!1,o.autoOpen=!1;const i=()=>{const n=t.querySelector(".Popup");if(!n)return;t.removeEventListener("brightspot-frame-load",i),o.addEventListener("btu-dialog-ready",()=>{M.A.resume()}),M.A.pause(),t.parentNode?.insertBefore(o,t),o.append(t),e.addEventListener("click",e=>{o.show()}),o.addEventListener("btu-dialog-closed",e=>{n.classList.remove("is-visible")});const r=t.querySelector(".QueryField-button");r&&r.addEventListener("click",e=>{o.close(e)})};t.addEventListener("brightspot-frame-load",i)}),(0,r.A)("dialog btu-input > .sp-replacer",e=>{const n=e.getAttribute("aria-controls");if(!n)return;const t=document.querySelector(`#${n}`);t&&(t.setAttribute("popover",""),e.addEventListener("click",()=>{t.showPopover()}))}),(0,r.A)(".ProseMirror-spellcheck-suggestions.is-opening",e=>{e.setAttribute("popover",""),e.showPopover()}),document.addEventListener("click",e=>{const n=e.target;if(n instanceof HTMLDialogElement&&"DIALOG"===n.nodeName){const t=n.parentElement;if(t&&t.tagName===d.A.tagName){if(t.querySelector(".Popup.is-fromTop, .Popup.is-noGap"))return;t.close(e)}}}),document.addEventListener("legacy.popup.close",e=>{const n=e.target;if(n instanceof HTMLElement){const t=n.closest("btu-dialog");t?.close(e)}}),document.addEventListener("page-nav-rail-toggled",e=>{const n=document.querySelector('btu-dialog:has(dialog[open] .Popup[name="miscSearch"])');n?.closest(".Page")?.classList.remove("is-searchOpening"),n?.close(e)}),(0,r.A)(".Month-day:has(a.calendarEvents)",e=>{e.addEventListener("click",()=>{e.querySelector("a.calendarEvents")?.click()})}),(0,r.A)("#askAi-container .frame.loaded",e=>{e.parentElement?.classList.add("is-loaded"),w(!0),(e.closest(".AskAi")||e).addEventListener("click",v)}),(0,r.A)(".AskAi",e=>{e.addEventListener("click",v)}),(0,r.A)(".Page-header .Page-askAiLink",e=>{e.classList.remove("IconButton"),(0,r.A)(".Page-header + btu-nav-rail",n=>{const t=document.createElement("li");t.appendChild(e);const o=n.querySelector("li:has(> .Page-guideLink)");o?n.querySelector("ul")?.insertBefore(t,o):n.querySelector("ul > li")?.insertAdjacentElement("afterend",t)})}),(0,r.A)(".Page-header.mobile ~ .Page-container:not(:has(.ContentEdit-right.is-visible)) .ContentEdit-left",e=>{const n=document.querySelector(".Page-header.mobile");n&&e.addEventListener("scroll",(0,b.A)(100,()=>{const t=e.scrollTop,o=e.scrollHeight-e.clientHeight;t>10&&o>n.offsetHeight+10&&!n.classList.contains("is-scrolled")?n.classList.add("is-scrolled"):t<=10&&n.classList.contains("is-scrolled")&&n.classList.remove("is-scrolled")}))}),(0,r.A)(['.ContentReportingWidget .CIG-row[data-field="getPastReportResults"] .ContentSelector-edit',".CollectionList-item-edit.ContentSelector-edit"],e=>{e.removeAttribute("data-popup-mode")}),(0,r.A)('.Popup[name="siteSwitch"]',e=>{document.getElementById("SiteSwitch-link")?.classList.add("is-active")}),(0,r.A)(".LiveBlogPostList",e=>{document.body.classList.add("has-liveBlog-postList")}),(0,r.A)(".ToolUserAvatar",e=>{e.parentElement?.classList.add("ToolUserAvatar-container")}),document.addEventListener("legacy-popup-closed",e=>{e.target instanceof HTMLElement&&"siteSwitch"===e.target.getAttribute("name")&&document.getElementById("SiteSwitch-link")?.classList.remove("is-active")}),(0,r.A)(".Workflow-state",e=>{e.addEventListener("click",n=>{e.classList.contains("is-dragging")&&n.stopPropagation()},!0)}),(0,r.A)(z.kV,e=>{z.eN.registerFromAttribute(e)}),(0,r.A)(".Page-guide",e=>{const n=e.closest(".Page");if(!n)return;const t=n?.querySelector(".Page-container");function o(){const n=e.querySelector(".Guide-title-text");n?(n.id="Guide-title",e.setAttribute("aria-labelledby","Guide-title")):e.removeAttribute("aria-labelledby")}t&&t.parentNode?.insertBefore(e,t),z.eN.register({id:z.yy.PageGuide,element:e,isHidden:()=>!n.classList.contains("is-guideOpen")});const i=new MutationObserver(e=>{e.forEach(e=>{"childList"===e.type&&o()})});o(),i.observe(e,{childList:!0,subtree:!0})}),(0,r.A)(".Page-header",e=>{z.eN.register({id:z.yy.PageHeader,element:e,label:window.BRIGHTSPOT?.ui.tooltips.skipLinks.pageHeader})}),(0,r.A)('btu-nav-rail[role="navigation"]',e=>{z.eN.register({id:z.yy.PageNav,element:e,label:window.BRIGHTSPOT?.ui.tooltips.skipLinks.pageNavigation})}),(0,r.A)(".Page-content:not(:has(> .content-edit), :has(> .Admin))",e=>{z.eN.register({id:z.yy.PageMain,element:e,label:window.BRIGHTSPOT?.ui.tooltips.skipLinks.mainContent})}),(0,r.A)("dialog[open] .Popup-content > .Popup-close",e=>{z.eN.register({id:z.yy.ModalClose,element:e})}),(0,r.A)('.ContentEdit-right[role="region"]',e=>{const n=()=>{const n="chat_bubble"===e.dataset.rightTab;z.eN.register({id:z.yy.ContentEditRight,element:e,preferredFocus:()=>n?e.querySelector(".Conversation-newPost .ProseMirror"):null,isHidden:()=>!e.classList.contains("is-visible")})};e.classList.contains("is-visible")&&n(),new MutationObserver(t=>{for(const o of t)e.classList.contains("is-visible")&&n()}).observe(e,{attributeFilter:["class"]})}),(0,r.A)("section > .ContentEdit-toolbar",e=>{z.eN.register({id:z.yy.ContentEditToolbar,element:e})}),(0,r.A)('.ContentEdit-left[role="region"]',e=>{z.eN.register({id:z.yy.PageMain,element:e})}),(0,r.A)('.ContentEdit-top[role="region"]',e=>{z.eN.register({id:z.yy.ContentEditTop,element:e})}),(0,r.A)('.ContentEdit-preview[role="region"]:not([inert])',e=>{z.eN.register({id:z.yy.ContentEditPreview,element:e,isHidden:()=>e.hasAttribute("inert")})}),(0,r.A)('.ContentEditDrawer[role="region"].is-open',e=>{z.eN.register({id:z.yy.ContentEditDrawer,element:e,isHidden:()=>!e.classList.contains("is-open")})}),(0,r.A)("#ContentEditDrawer-title",e=>{const n=e.closest('.ContentEditDrawer[role="region"]');if(!n)return;const t=`ContentEditDrawer-title-${(0,h.A)().replace(/-/g,"")}`;e.id=t,n.setAttribute("aria-labelledby",t)}),(0,r.A)(".ContentEdit-right-title",e=>{const n=e.closest('[role="region"][data-right-tab]');if(!n)return;const t=`${e.id}-${(0,h.A)().replace(/-/g,"")}`;e.id=t,n.setAttribute("aria-labelledby",t)}),(0,r.A)('.Admin-nav[role="navigation"]',e=>{const n=e.getAttribute("aria-labelledby"),t=n?document.getElementById(n)?.textContent?.trim():null,o=t?`${t} ${window.BRIGHTSPOT?.ui.tooltips.skipLinks.navigation}`:window.BRIGHTSPOT?.ui.tooltips.skipLinks.navigation;z.eN.register({id:z.yy.LeftNav,element:e,label:o});const i=e.nextElementSibling;if(!i||!i.classList.contains("Admin-main"))return;z.eN.register({id:z.yy.PageMain,element:i,label:window.BRIGHTSPOT?.ui.tooltips.skipLinks.mainContent});const r=i.getAttribute("aria-labelledby");r&&(document.getElementById(r)||i.querySelector(".Widget-title")?.setAttribute("id",r))}),(0,r.A)(".ActionBar",e=>{const n=e.closest(".Widget");if(!n)return;const t=n.querySelector(".Widget-title");let o="";const i=e=>{o=e.pointerType,setTimeout(()=>{o=""},0)},r=n=>{if(o)return;const i=n.target;i instanceof HTMLElement&&requestAnimationFrame(()=>{const n=i.getBoundingClientRect();(n.bottom>e.getBoundingClientRect().top||n.top<(t?.getBoundingClientRect().bottom||0))&&i.scrollIntoView({block:"nearest",behavior:"smooth"})})};n.addEventListener("pointerdown",i,{passive:!0}),n.addEventListener("focusin",r,{passive:!0}),(0,M.A)(n,()=>{n.removeEventListener("pointerdown",i),n.removeEventListener("focusin",r)})}),n()}catch(k){n(k)}})},9818(e,n,t){"use strict";t.d(n,{A:()=>A}),t(57573),t(49371),t(96648),t(56065);var o=t(71224),i=t(98474),r=t(67324),a=t(44508),s=t(44209);function c(){c=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,n){["method","field"].forEach(function(t){n.forEach(function(n){n.kind===t&&"own"===n.placement&&this.defineClassElement(e,n)},this)},this)},initializeClassElements:function(e,n){var t=e.prototype;["method","field"].forEach(function(o){n.forEach(function(n){var i=n.placement;if(n.kind===o&&("static"===i||"prototype"===i)){var r="static"===i?e:t;this.defineClassElement(r,n)}},this)},this)},defineClassElement:function(e,n){var t=n.descriptor;if("field"===n.kind){var o=n.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===o?void 0:o.call(e)}}Object.defineProperty(e,n.key,t)},decorateClass:function(e,n){var t=[],o=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!p(e))return t.push(e);var n=this.decorateElement(e,i);t.push(n.element),t.push.apply(t,n.extras),o.push.apply(o,n.finishers)},this),!n)return{elements:t,finishers:o};var r=this.decorateConstructor(t,n);return o.push.apply(o,r.finishers),r.finishers=o,r},addElementPlacement:function(e,n,t){var o=n[e.placement];if(!t&&-1!==o.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");o.push(e.key)},decorateElement:function(e,n){for(var t=[],o=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=n[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,n),c.finisher&&o.push(c.finisher);var d=c.extras;if(d){for(var l=0;l<d.length;l++)this.addElementPlacement(d[l],n);t.push.apply(t,d)}}return{element:e,finishers:o,extras:t}},decorateConstructor:function(e,n){for(var t=[],o=n.length-1;o>=0;o--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,n[o])(i)||i);if(void 0!==r.finisher&&t.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:t}},fromElementDescriptor:function(e){var n={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(n.initializer=e.initializer),n},toElementDescriptors:function(e){if(void 0!==e)return(n=e,function(e){if(Array.isArray(e))return e}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return h(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,n):void 0}}(n)||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 n=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),n},this);var n},toElementDescriptor:function(e){var n=e.kind+"";if("method"!==n&&"field"!==n)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+n+'"');var t=b(e.key),o=e.placement+"";if("static"!==o&&"prototype"!==o&&"own"!==o)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 "'+o+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:n,key:t,placement:o,descriptor:Object.assign({},i)};return"field"!==n?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 n={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),n},toClassDescriptor:function(e){var n=e.kind+"";if("class"!==n)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+n+'"');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 t=u(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,n){for(var t=0;t<n.length;t++){var o=(0,n[t])(e);if(void 0!==o){if("function"!=typeof o)throw new TypeError("Finishers must return a constructor.");e=o}}return e},disallowProperty:function(e,n,t){if(void 0!==e[n])throw new TypeError(t+" can't have a ."+n+" property.")}};return e}function d(e){var n,t=b(e.key);"method"===e.kind?n={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?n={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?n={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(n={configurable:!0,writable:!0,enumerable:!0});var o={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:n};return e.decorators&&(o.decorators=e.decorators),"field"===e.kind&&(o.initializer=e.value),o}function l(e,n){void 0!==e.descriptor.get?n.descriptor.get=e.descriptor.get:n.descriptor.set=e.descriptor.set}function p(e){return e.decorators&&e.decorators.length}function M(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function u(e,n){var t=e[n];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+n+"' to be a function");return t}function b(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function h(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function z(){return z="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,n,t){var o=function(e,n){for(;!{}.hasOwnProperty.call(e,n)&&null!==(e=O(e)););return e}(e,n);if(o){var i=Object.getOwnPropertyDescriptor(o,n);return i.get?i.get.call(arguments.length<3?e:t):i.value}},z.apply(null,arguments)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}const f=window.localStorage,m=window.BRIGHTSPOT?.ui.tooltips.collapse,g=window.BRIGHTSPOT?.ui.tooltips.expand;let A=(w=[(0,i.EM)("btu-widget")],v=(0,r.m)(o.WF),q=c(),k=function(e,n){class t extends n{constructor(...n){super(...n),e(this)}}return{F:t,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 n=(0,a.A)(this,"data-internal-name");n&&(e?f.setItem(n,"1"):f.removeItem(n)),this.requestUpdate(),this.emit("btu-widget-toggle")}},{kind:"get",key:"collapsed",value:function(){return this._collapsed}},{kind:"method",key:"connectedCallback",value:function(){var e,n,o,i,r;if((e=t,n="connectedCallback",o=this,r=z(O(1&(i=3)?e.prototype:e),n,o),2&i&&"function"==typeof r?function(e){return r.apply(o,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"),n=this.firstChild;n instanceof Element&&!n.classList.contains("Widget-title")&&e&&this.insertBefore(e,n),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?o.qy`<h2
73
73
  class="Widget-title"
74
74
  @click="${()=>this.collapsed=!this.collapsed}"
75
75
  >