@brightspot/ui 5.4.0 → 5.4.1
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.
- package/README.md +113 -150
- package/dist/storybook/project.json +1 -1
- package/package.json +1 -1
- package/src/legacy/tool-ui/src/MenuView.css +9 -0
- package/src/legacy/tool-ui/src/PrePublish.ts +0 -24
- package/src/legacy/tool-ui/src/ThemeBundleEditor.css +4 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{v4.84f71eb0a38ed97f7d3a.js → v4.ba601ff96a3370471a41.js} +2 -2
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.060e8a546f81da35c4de.js → v5.4cdf07db0213a5d2f97e.js} +2 -2
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.ac655d942db92fdcddfc.css → v5.553c18f29cb4a71c3577.css} +1 -1
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.84f71eb0a38ed97f7d3a.js.LICENSE.txt → v4.ba601ff96a3370471a41.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.060e8a546f81da35c4de.js.LICENSE.txt → v5.4cdf07db0213a5d2f97e.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! For license information please see v4.
|
|
1
|
+
/*! For license information please see v4.ba601ff96a3370471a41.js.LICENSE.txt */
|
|
2
2
|
(()=>{var __webpack_modules__={42247(e,t,o){var n={"./af":88468,"./af.js":88468,"./ar":43504,"./ar-dz":56553,"./ar-dz.js":56553,"./ar-kw":32889,"./ar-kw.js":32889,"./ar-ly":41222,"./ar-ly.js":41222,"./ar-ma":75865,"./ar-ma.js":75865,"./ar-ps":96404,"./ar-ps.js":96404,"./ar-sa":80299,"./ar-sa.js":80299,"./ar-tn":77293,"./ar-tn.js":77293,"./ar.js":43504,"./az":86936,"./az.js":86936,"./be":67226,"./be.js":67226,"./bg":1548,"./bg.js":1548,"./bm":98450,"./bm.js":98450,"./bn":62829,"./bn-bd":10070,"./bn-bd.js":10070,"./bn.js":62829,"./bo":94532,"./bo.js":94532,"./br":15201,"./br.js":15201,"./bs":67912,"./bs.js":67912,"./ca":42209,"./ca.js":42209,"./cs":30055,"./cs.js":30055,"./cv":38938,"./cv.js":38938,"./cy":93417,"./cy.js":93417,"./da":34888,"./da.js":34888,"./de":5020,"./de-at":17876,"./de-at.js":17876,"./de-ch":10526,"./de-ch.js":10526,"./de.js":5020,"./dv":79851,"./dv.js":79851,"./el":65518,"./el.js":65518,"./en-au":62585,"./en-au.js":62585,"./en-ca":98459,"./en-ca.js":98459,"./en-gb":31408,"./en-gb.js":31408,"./en-ie":30577,"./en-ie.js":30577,"./en-il":56496,"./en-il.js":56496,"./en-in":82222,"./en-in.js":82222,"./en-nz":19291,"./en-nz.js":19291,"./en-sg":55313,"./en-sg.js":55313,"./eo":78473,"./eo.js":78473,"./es":43685,"./es-do":58683,"./es-do.js":58683,"./es-mx":20831,"./es-mx.js":20831,"./es-us":45264,"./es-us.js":45264,"./es.js":43685,"./et":49862,"./et.js":49862,"./eu":61399,"./eu.js":61399,"./fa":40434,"./fa.js":40434,"./fi":37242,"./fi.js":37242,"./fil":20648,"./fil.js":20648,"./fo":4248,"./fo.js":4248,"./fr":38461,"./fr-ca":43064,"./fr-ca.js":43064,"./fr-ch":76937,"./fr-ch.js":76937,"./fr.js":38461,"./fy":79818,"./fy.js":79818,"./ga":85309,"./ga.js":85309,"./gd":44352,"./gd.js":44352,"./gl":47368,"./gl.js":47368,"./gom-deva":89099,"./gom-deva.js":89099,"./gom-latn":62498,"./gom-latn.js":62498,"./gu":67881,"./gu.js":67881,"./he":39616,"./he.js":39616,"./hi":93980,"./hi.js":93980,"./hr":99875,"./hr.js":99875,"./hu":27792,"./hu.js":27792,"./hy-am":97925,"./hy-am.js":97925,"./id":34730,"./id.js":34730,"./is":11953,"./is.js":11953,"./it":19002,"./it-ch":83820,"./it-ch.js":83820,"./it.js":19002,"./ja":19518,"./ja.js":19518,"./jv":15501,"./jv.js":15501,"./ka":78665,"./ka.js":78665,"./kk":15303,"./kk.js":15303,"./km":50037,"./km.js":50037,"./kn":24186,"./kn.js":24186,"./ko":8779,"./ko.js":8779,"./ku":12221,"./ku-kmr":28876,"./ku-kmr.js":28876,"./ku.js":12221,"./ky":27457,"./ky.js":27457,"./lb":4095,"./lb.js":4095,"./lo":19450,"./lo.js":19450,"./lt":85373,"./lt.js":85373,"./lv":60819,"./lv.js":60819,"./me":84879,"./me.js":84879,"./mi":68603,"./mi.js":68603,"./mk":9413,"./mk.js":9413,"./ml":92646,"./ml.js":92646,"./mn":24904,"./mn.js":24904,"./mr":21060,"./mr.js":21060,"./ms":83437,"./ms-my":59158,"./ms-my.js":59158,"./ms.js":83437,"./mt":59886,"./mt.js":59886,"./my":75755,"./my.js":75755,"./nb":2741,"./nb.js":2741,"./ne":40470,"./ne.js":40470,"./nl":11743,"./nl-be":58657,"./nl-be.js":58657,"./nl.js":11743,"./nn":35817,"./nn.js":35817,"./oc-lnc":31561,"./oc-lnc.js":31561,"./pa-in":30402,"./pa-in.js":30402,"./pl":50713,"./pl.js":50713,"./pt":82033,"./pt-br":4e3,"./pt-br.js":4e3,"./pt.js":82033,"./ro":5748,"./ro.js":5748,"./ru":48218,"./ru.js":48218,"./sd":84172,"./sd.js":84172,"./se":31957,"./se.js":31957,"./si":65033,"./si.js":65033,"./sk":40959,"./sk.js":40959,"./sl":21604,"./sl.js":21604,"./sq":9473,"./sq.js":9473,"./sr":38438,"./sr-cyrl":28167,"./sr-cyrl.js":28167,"./sr.js":38438,"./ss":54455,"./ss.js":54455,"./sv":64906,"./sv.js":64906,"./sw":73595,"./sw.js":73595,"./ta":52024,"./ta.js":52024,"./te":51916,"./te.js":51916,"./tet":93798,"./tet.js":93798,"./tg":1370,"./tg.js":1370,"./th":2249,"./th.js":2249,"./tk":89294,"./tk.js":89294,"./tl-ph":88204,"./tl-ph.js":88204,"./tlh":14065,"./tlh.js":14065,"./tr":96855,"./tr.js":96855,"./tzl":33419,"./tzl.js":33419,"./tzm":61050,"./tzm-latn":62490,"./tzm-latn.js":62490,"./tzm.js":61050,"./ug-cn":18719,"./ug-cn.js":18719,"./uk":49437,"./uk.js":49437,"./ur":51148,"./ur.js":51148,"./uz":88580,"./uz-latn":50276,"./uz-latn.js":50276,"./uz.js":88580,"./vi":32202,"./vi.js":32202,"./x-pseudo":44782,"./x-pseudo.js":44782,"./yo":80589,"./yo.js":80589,"./zh-cn":36641,"./zh-cn.js":36641,"./zh-hk":30933,"./zh-hk.js":30933,"./zh-mo":78582,"./zh-mo.js":78582,"./zh-tw":88525,"./zh-tw.js":88525};function i(e){var t=r(e);return o(t)}function r(e){if(!o.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=r,e.exports=i,i.id=42247},66808(e,t,o){"use strict";var n=o(1439),i=o.n(n),r=o(56155);const a=window.BRIGHTSPOT?.web?.pagePaths["com.psddev.analytics.ui.AnalyticsDataToolPage"];class s{constructor(e){this.element=void 0,this.contentId=void 0,this.analyticsUrl=void 0,this.isLoaded=!1,this.cache={},this.currentPeriod="hours",this.loadingElement=void 0,this.contentElement=void 0,this.errorElement=void 0,this.periodSelector=void 0,this.element=e,this.contentId=e.dataset.contentId||"",this.analyticsUrl=a,this.loadingElement=e.querySelector(".AnalyticsWidget-loading"),this.contentElement=e.querySelector(".AnalyticsWidget-content"),this.errorElement=e.querySelector(".AnalyticsWidget-error"),this.periodSelector=e.querySelector(".AnalyticsWidget-periodSelector"),this.init()}init(){i()(this.element).closest("[data-tab]").on("tabbedShow",()=>{const e=this.element.closest("[data-tab]");this.isLoaded||e?.classList.contains("TC-unselected")||this.loadAnalyticsData()}),this.periodSelector&&this.periodSelector.addEventListener("change",e=>{const t=e.target;null!==t&&t instanceof HTMLSelectElement&&(this.currentPeriod=t.value,this.loadAnalyticsData())})}async loadAnalyticsData(){const e=this.currentPeriod;if(this.cache[e])this.displayData(this.cache[e]);else{if(!this.analyticsUrl)return console.error("Analytics data endpoint not found in pagePaths"),void this.showError();this.showLoading();try{const t=await fetch(`${this.analyticsUrl}?id=${this.contentId}&period=${e}`);if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);const o=await t.json();if("error"in o)throw new Error(o.error);this.cache[e]=o,this.displayData(o),this.isLoaded=!0}catch(e){console.error("Failed to load analytics data:",e),this.showError()}}}showLoading(){this.loadingElement&&(this.loadingElement.hidden=!1),this.contentElement&&(this.contentElement.hidden=!0),this.errorElement&&(this.errorElement.hidden=!0)}showError(){this.loadingElement&&(this.loadingElement.hidden=!0),this.contentElement&&(this.contentElement.hidden=!0),this.errorElement&&(this.errorElement.hidden=!1)}displayData(e){if(this.loadingElement&&(this.loadingElement.hidden=!0),this.errorElement&&(this.errorElement.hidden=!0),this.contentElement&&(this.contentElement.hidden=!1),!this.contentElement)return;this.contentElement.innerHTML="";const t=document.createElement("div");t.className=`numbersPeriod numbersPeriod-${e.periodLabel}`,t.addEventListener("highchart-loaded",()=>{t.classList.add("chart-loaded")}),e.chartData&&(t.innerHTML=e.chartData),this.contentElement.appendChild(t)}}(0,r.A)(".AnalyticsWidget",e=>{new s(e)})},40482(e,t,o){"use strict";o(67219),o(44764);var n={},i="function"==typeof Map?new Map:null,r="swap",a="move",s="layoutStart",c="layoutEnd",p="layoutAbort",b="remove",M="hideStart",d="filter",l="sort",z="move",u="send",O="beforeSend",A="receive",f="beforeReceive",h="dragReleaseEnd",m="ontouchstart"in window,q=!!window.PointerEvent,_=!!window.navigator.msPointerEnabled;function W(){this._events={},this._queue=[],this._counter=0,this._clearOnEmit=!1}W.prototype.on=function(e,t){if(!this._events||!e||!t)return this;var o=this._events[e];return o||(o=this._events[e]=[]),o.push(t),this},W.prototype.off=function(e,t){if(!this._events||!e||!t)return this;var o,n=this._events[e];if(!n||!n.length)return this;for(;-1!==(o=n.indexOf(t));)n.splice(o,1);return this},W.prototype.clear=function(e){if(!this._events||!e)return this;var t=this._events[e];return t&&(t.length=0,delete this._events[e]),this},W.prototype.emit=function(e){if(!this._events||!e)return this._clearOnEmit=!1,this;var t=this._events[e];if(!t||!t.length)return this._clearOnEmit=!1,this;var o,n=this._queue,i=n.length,r=arguments.length-1;r>3&&((o=[]).push.apply(o,arguments),o.shift()),n.push.apply(n,t),this._clearOnEmit&&(t.length=0,this._clearOnEmit=!1),++this._counter;for(var a=i,s=n.length;a<s;a++)if(0===r?n[a]():1===r?n[a](arguments[1]):2===r?n[a](arguments[1],arguments[2]):3===r?n[a](arguments[1],arguments[2],arguments[3]):n[a].apply(null,o),!this._events)return this;return--this._counter,this._counter||(n.length=0),this},W.prototype.burst=function(){return this._events?(this._clearOnEmit=!0,this.emit.apply(this,arguments),this):this},W.prototype.countListeners=function(e){if(!this._events)return 0;var t=this._events[e];return t?t.length:0},W.prototype.destroy=function(){return this._events?(this._queue.length=this._counter=0,this._events=null,this):this};var g=q?"pointerout":_?"MSPointerOut":"";function y(e){g&&(this._dragger=e,this._timeout=null,this._outEvent=null,this._isActive=!1,this._addBehaviour=this._addBehaviour.bind(this),this._removeBehaviour=this._removeBehaviour.bind(this),this._onTimeout=this._onTimeout.bind(this),this._resetData=this._resetData.bind(this),this._onStart=this._onStart.bind(this),this._onOut=this._onOut.bind(this),this._dragger.on("start",this._onStart))}y.prototype._addBehaviour=function(){this._isActive||(this._isActive=!0,this._dragger.on("move",this._resetData),this._dragger.on("cancel",this._removeBehaviour),this._dragger.on("end",this._removeBehaviour),window.addEventListener(g,this._onOut))},y.prototype._removeBehaviour=function(){this._isActive&&(this._dragger.off("move",this._resetData),this._dragger.off("cancel",this._removeBehaviour),this._dragger.off("end",this._removeBehaviour),window.removeEventListener(g,this._onOut),this._resetData(),this._isActive=!1)},y.prototype._resetData=function(){window.clearTimeout(this._timeout),this._timeout=null,this._outEvent=null},y.prototype._onStart=function(e){"mouse"!==e.pointerType&&this._addBehaviour()},y.prototype._onOut=function(e){this._dragger._getTrackedTouch(e)&&(this._resetData(),this._outEvent=e,this._timeout=window.setTimeout(this._onTimeout,100))},y.prototype._onTimeout=function(){var e=this._outEvent;this._resetData(),this._dragger.isActive()&&this._dragger._onCancel(e)},y.prototype.destroy=function(){g&&(this._dragger.off("start",this._onStart),this._removeBehaviour())};var v=["","webkit","moz","ms","o","Webkit","Moz","MS","O"],L={};function w(e,t){var o=L[t]||"";if(o)return o;for(var n=t[0].toUpperCase()+t.slice(1),i=0;i<v.length;){if((o=v[i]?v[i]+n:t)in e)return L[t]=o,o;++i}return""}function R(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}return e}var k=window.navigator.userAgent.toLowerCase(),T=k.indexOf("edge")>-1,S=k.indexOf("trident")>-1,E=k.indexOf("firefox")>-1,N=k.indexOf("android")>-1,B=!!R()&&{passive:!0},C="touchAction",D=w(document.documentElement.style,C);function x(e,t){this._element=e,this._emitter=new W,this._isDestroyed=!1,this._cssProps={},this._touchAction="",this._isActive=!1,this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._onStart=this._onStart.bind(this),this._onMove=this._onMove.bind(this),this._onCancel=this._onCancel.bind(this),this._onEnd=this._onEnd.bind(this),this._edgeHack=null,(T||S)&&(q||_)&&(this._edgeHack=new y(this)),this.setCssProps(t),this._touchAction||this.setTouchAction("auto"),e.addEventListener("dragstart",x._preventDefault,!1),e.addEventListener(x._inputEvents.start,this._onStart,B)}x._pointerEvents={start:"pointerdown",move:"pointermove",cancel:"pointercancel",end:"pointerup"},x._msPointerEvents={start:"MSPointerDown",move:"MSPointerMove",cancel:"MSPointerCancel",end:"MSPointerUp"},x._touchEvents={start:"touchstart",move:"touchmove",cancel:"touchcancel",end:"touchend"},x._mouseEvents={start:"mousedown",move:"mousemove",cancel:"",end:"mouseup"},x._inputEvents=m?x._touchEvents:q?x._pointerEvents:_?x._msPointerEvents:x._mouseEvents,x._emitter=new W,x._emitterEvents={start:"start",move:"move",end:"end",cancel:"cancel"},x._activeInstances=[],x._preventDefault=function(e){e.preventDefault&&!1!==e.cancelable&&e.preventDefault()},x._activateInstance=function(e){x._activeInstances.indexOf(e)>-1||(x._activeInstances.push(e),x._emitter.on(x._emitterEvents.move,e._onMove),x._emitter.on(x._emitterEvents.cancel,e._onCancel),x._emitter.on(x._emitterEvents.end,e._onEnd),1===x._activeInstances.length&&x._bindListeners())},x._deactivateInstance=function(e){var t=x._activeInstances.indexOf(e);-1!==t&&(x._activeInstances.splice(t,1),x._emitter.off(x._emitterEvents.move,e._onMove),x._emitter.off(x._emitterEvents.cancel,e._onCancel),x._emitter.off(x._emitterEvents.end,e._onEnd),x._activeInstances.length||x._unbindListeners())},x._bindListeners=function(){window.addEventListener(x._inputEvents.move,x._onMove,B),window.addEventListener(x._inputEvents.end,x._onEnd,B),x._inputEvents.cancel&&window.addEventListener(x._inputEvents.cancel,x._onCancel,B)},x._unbindListeners=function(){window.removeEventListener(x._inputEvents.move,x._onMove,B),window.removeEventListener(x._inputEvents.end,x._onEnd,B),x._inputEvents.cancel&&window.removeEventListener(x._inputEvents.cancel,x._onCancel,B)},x._getEventPointerId=function(e){return"number"==typeof e.pointerId?e.pointerId:e.changedTouches?e.changedTouches[0]?e.changedTouches[0].identifier:null:1},x._getTouchById=function(e,t){if("number"==typeof e.pointerId)return e.pointerId===t?e:null;if(e.changedTouches){for(var o=0;o<e.changedTouches.length;o++)if(e.changedTouches[o].identifier===t)return e.changedTouches[o];return null}return e},x._onMove=function(e){x._emitter.emit(x._emitterEvents.move,e)},x._onCancel=function(e){x._emitter.emit(x._emitterEvents.cancel,e)},x._onEnd=function(e){x._emitter.emit(x._emitterEvents.end,e)},x.prototype._reset=function(){this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._isActive=!1,x._deactivateInstance(this)},x.prototype._createEvent=function(e,t){var o=this._getTrackedTouch(t);return{type:e,srcEvent:t,distance:this.getDistance(),deltaX:this.getDeltaX(),deltaY:this.getDeltaY(),deltaTime:e===x._emitterEvents.start?0:this.getDeltaTime(),isFirst:e===x._emitterEvents.start,isFinal:e===x._emitterEvents.end||e===x._emitterEvents.cancel,pointerType:t.pointerType||(t.touches?"touch":"mouse"),identifier:this._pointerId,screenX:o.screenX,screenY:o.screenY,clientX:o.clientX,clientY:o.clientY,pageX:o.pageX,pageY:o.pageY,target:o.target}},x.prototype._emit=function(e,t){this._emitter.emit(e,this._createEvent(e,t))},x.prototype._getTrackedTouch=function(e){return null===this._pointerId?null:x._getTouchById(e,this._pointerId)},x.prototype._onStart=function(e){if(!this._isDestroyed&&null===this._pointerId&&(this._pointerId=x._getEventPointerId(e),null!==this._pointerId)){var t=this._getTrackedTouch(e);this._startX=this._currentX=t.clientX,this._startY=this._currentY=t.clientY,this._startTime=Date.now(),this._isActive=!0,this._emit(x._emitterEvents.start,e),this._isActive&&x._activateInstance(this)}},x.prototype._onMove=function(e){var t=this._getTrackedTouch(e);t&&(this._currentX=t.clientX,this._currentY=t.clientY,this._emit(x._emitterEvents.move,e))},x.prototype._onCancel=function(e){this._getTrackedTouch(e)&&(this._emit(x._emitterEvents.cancel,e),this._reset())},x.prototype._onEnd=function(e){this._getTrackedTouch(e)&&(this._emit(x._emitterEvents.end,e),this._reset())},x.prototype.isActive=function(){return this._isActive},x.prototype.setTouchAction=function(e){this._touchAction=e,D&&(this._cssProps[D]="",this._element.style[D]=e),m&&(this._element.removeEventListener(x._touchEvents.start,x._preventDefault,!0),(this._element.style[D]!==e||E&&N)&&this._element.addEventListener(x._touchEvents.start,x._preventDefault,!0))},x.prototype.setCssProps=function(e){if(e){var t,o,n=this._cssProps,i=this._element;for(t in n)i.style[t]=n[t],delete n[t];for(t in e)e[t]&&(t!==C?(o=w(i.style,t))&&(n[o]="",i.style[o]=e[t]):this.setTouchAction(e[t]))}},x.prototype.getDeltaX=function(){return this._currentX-this._startX},x.prototype.getDeltaY=function(){return this._currentY-this._startY},x.prototype.getDistance=function(){var e=this.getDeltaX(),t=this.getDeltaY();return Math.sqrt(e*e+t*t)},x.prototype.getDeltaTime=function(){return this._startTime?Date.now()-this._startTime:0},x.prototype.on=function(e,t){this._emitter.on(e,t)},x.prototype.off=function(e,t){this._emitter.off(e,t)},x.prototype.destroy=function(){if(!this._isDestroyed){var e=this._element;for(var t in this._edgeHack&&this._edgeHack.destroy(),this._reset(),this._emitter.destroy(),e.removeEventListener(x._inputEvents.start,this._onStart,B),e.removeEventListener("dragstart",x._preventDefault,!1),e.removeEventListener(x._touchEvents.start,x._preventDefault,!0),this._cssProps)e.style[t]=this._cssProps[t],delete this._cssProps[t];this._element=null,this._isDestroyed=!0}};var X=1e3/60,Y=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return this.setTimeout(function(){e(Date.now())},X)}).bind(window);function P(e){this._nextStep=null,this._lanes=[],this._stepQueue=[],this._stepCallbacks={},this._step=this._step.bind(this);for(var t=0;t<e;t++)this._lanes.push(new I)}function I(){this.queue=[],this.indices={},this.callbacks={}}P.prototype._step=function(e){var t,o,n,i,r,a,s=this._lanes,c=this._stepQueue,p=this._stepCallbacks;for(this._nextStep=null,t=0;t<s.length;t++){for(i=s[t].queue,r=s[t].callbacks,a=s[t].indices,o=0;o<i.length;o++)(n=i[o])&&(c.push(n),p[n]=r[n],delete r[n],delete a[n]);i.length=0}for(t=0;t<c.length;t++)p[n=c[t]]&&p[n](e),delete p[n];c.length=0},P.prototype.add=function(e,t,o){this._lanes[e].add(t,o),this._nextStep||(this._nextStep=Y(this._step))},P.prototype.remove=function(e,t){this._lanes[e].remove(t)},I.prototype.add=function(e,t){var o=this.indices[e];void 0!==o&&(this.queue[o]=void 0),this.queue.push(e),this.callbacks[e]=t,this.indices[e]=this.queue.length-1},I.prototype.remove=function(e){var t=this.indices[e];void 0!==t&&(this.queue[t]=void 0,delete this.callbacks[e],delete this.indices[e])};var H="layoutRead",j="layoutWrite",F="visibilityRead",G="visibilityWrite",$="dragStartRead",U="dragStartWrite",V="dragMoveRead",J="dragMoveWrite",K="dragScrollRead",Q="dragScrollWrite",Z="dragSortRead",ee="placeholderLayoutRead",te="placeholderLayoutWrite",oe="placeholderResizeWrite",ne="autoScrollRead",ie="autoScrollWrite",re="debounceRead",ae=new P(3);function se(e){ae.remove(0,H+e),ae.remove(2,j+e)}function ce(e){ae.remove(0,F+e),ae.remove(2,G+e)}function pe(e){ae.remove(0,$+e),ae.remove(2,U+e)}function be(e){ae.remove(0,V+e),ae.remove(2,J+e)}function Me(e){ae.remove(0,K+e),ae.remove(2,Q+e)}function de(e,t){ae.add(1,Z+e,t)}function le(e){ae.remove(0,ee+e),ae.remove(2,te+e)}function ze(e,t){ae.add(0,ne,e),ae.add(2,ie,t)}function ue(e){return"function"==typeof e}var Oe="function"==typeof WeakMap?new WeakMap:null;function Ae(e,t){var o=Oe&&Oe.get(e);return o||(o=window.getComputedStyle(e,null),Oe&&Oe.set(e,o)),o.getPropertyValue(t)}function fe(e,t){return parseFloat(Ae(e,t))||0}var he,me=document.documentElement,qe=document.body,_e={value:0,offset:0};function We(e){return e===window||e===me||e===qe?window:e}function ge(e){return e===window?e.pageXOffset:e.scrollLeft}function ye(e){return e===window?e.pageYOffset:e.scrollTop}function ve(e){return e===window?me.scrollWidth-me.clientWidth:e.scrollWidth-e.clientWidth}function Le(e){return e===window?me.scrollHeight-me.clientHeight:e.scrollHeight-e.clientHeight}function we(e,t){if(t=t||{},e===window)t.width=me.clientWidth,t.height=me.clientHeight,t.left=0,t.right=t.width,t.top=0,t.bottom=t.height;else{var o=e.getBoundingClientRect(),n=e.clientLeft||fe(e,"border-left-width"),i=e.clientTop||fe(e,"border-top-width");t.width=e.clientWidth,t.height=e.clientHeight,t.left=o.left+n,t.right=t.left+t.width,t.top=o.top+i,t.bottom=t.top+t.height}return t}function Re(e){return e._drag._getGrid()._settings.dragAutoScroll}function ke(e){e._drag&&e._drag._prepareScroll()}function Te(e){if(e._drag&&e._isActive){var t=e._drag;t._scrollDiffX=t._scrollDiffY=0,e._setTranslate(t._left,t._top)}}function Se(e,t,o,n){return _e.value=Math.min(n/2,e),_e.offset=Math.max(0,o+2*_e.value+n*t-n)/2,_e}function Ee(){this.reset()}function Ne(){this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0}function Be(e,t){this.pool=[],this.createItem=e,this.releaseItem=t}function Ce(e,t){var o=function(e,t){return function(e,t){return!(e.left+e.width<=t.left||t.left+t.width<=e.left||e.top+e.height<=t.top||t.top+t.height<=e.top)}(e,t)?(Math.min(e.left+e.width,t.left+t.width)-Math.max(e.left,t.left))*(Math.min(e.top+e.height,t.top+t.height)-Math.max(e.top,t.top)):0}(e,t);return o?o/(Math.min(e.width,t.width)*Math.min(e.height,t.height))*100:0}Ee.prototype.reset=function(){this.isActive&&this.onStop(),this.item=null,this.element=null,this.isActive=!1,this.isEnding=!1,this.direction=null,this.value=null,this.maxValue=0,this.threshold=0,this.distance=0,this.speed=0,this.duration=0,this.action=null},Ee.prototype.hasReachedEnd=function(){return 4&this.direction?this.value>=this.maxValue:this.value<=0},Ee.prototype.computeCurrentScrollValue=function(){return null===this.value?1&this.direction?ge(this.element):ye(this.element):Math.max(0,Math.min(this.value,this.maxValue))},Ee.prototype.computeNextScrollValue=function(e){var t=this.speed*(e/1e3),o=4&this.direction?this.value+t:this.value-t;return Math.max(0,Math.min(o,this.maxValue))},Ee.prototype.computeSpeed=(he={direction:null,threshold:0,distance:0,value:0,maxValue:0,deltaTime:0,duration:0,isEnding:!1},function(e){var t=this.item,o=Re(t).speed;return ue(o)?(he.direction=this.direction,he.threshold=this.threshold,he.distance=this.distance,he.value=this.value,he.maxValue=this.maxValue,he.duration=this.duration,he.speed=this.speed,he.deltaTime=e,he.isEnding=this.isEnding,o(t,this.element,he)):o}),Ee.prototype.tick=function(e){return this.isActive||(this.isActive=!0,this.onStart()),this.value=this.computeCurrentScrollValue(),this.speed=this.computeSpeed(e),this.value=this.computeNextScrollValue(e),this.duration+=e,this.value},Ee.prototype.onStart=function(){var e=this.item,t=Re(e).onStart;ue(t)&&t(e,this.element,this.direction)},Ee.prototype.onStop=function(){var e=this.item,t=Re(e).onStop;ue(t)&&t(e,this.element,this.direction),e._drag&&e._drag.sort()},Ne.prototype.reset=function(){this.requestX&&(this.requestX.action=null),this.requestY&&(this.requestY.action=null),this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0},Ne.prototype.addRequest=function(e){1&e.direction?(this.removeRequest(this.requestX),this.requestX=e):(this.removeRequest(this.requestY),this.requestY=e),e.action=this},Ne.prototype.removeRequest=function(e){e&&(this.requestX===e?(this.requestX=null,e.action=null):this.requestY===e&&(this.requestY=null,e.action=null))},Ne.prototype.computeScrollValues=function(){this.scrollLeft=this.requestX?this.requestX.value:ge(this.element),this.scrollTop=this.requestY?this.requestY.value:ye(this.element)},Ne.prototype.scroll=function(){var e=this.element;e&&(e.scrollTo?e.scrollTo(this.scrollLeft,this.scrollTop):(e.scrollLeft=this.scrollLeft,e.scrollTop=this.scrollTop))},Be.prototype.pick=function(){return this.pool.pop()||this.createItem()},Be.prototype.release=function(e){this.releaseItem(e),-1===this.pool.indexOf(e)&&this.pool.push(e)},Be.prototype.reset=function(){this.pool.length=0};var De={width:0,height:0,left:0,right:0,top:0,bottom:0},xe={width:0,height:0,left:0,right:0,top:0,bottom:0};function Xe(){this._isDestroyed=!1,this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,this._items=[],this._actions=[],this._requests={},this._requests[1]={},this._requests[2]={},this._requestOverlapCheck={},this._dragPositions={},this._dragDirections={},this._overlapCheckInterval=150,this._requestPool=new Be(function(){return new Ee},function(e){e.reset()}),this._actionPool=new Be(function(){return new Ne},function(e){e.reset()}),this._readTick=this._readTick.bind(this),this._writeTick=this._writeTick.bind(this)}Xe.AXIS_X=1,Xe.AXIS_Y=2,Xe.FORWARD=4,Xe.BACKWARD=8,Xe.LEFT=9,Xe.RIGHT=5,Xe.UP=10,Xe.DOWN=6,Xe.smoothSpeed=function(e,t,o){return function(n,i,r){var a=0;if(!r.isEnding)if(r.threshold>0){var s=r.threshold-Math.max(0,r.distance);a=e/r.threshold*s}else a=e;var c=r.speed,p=a;return c===a?p:c<a?(p=c+t*(r.deltaTime/1e3),Math.min(a,p)):(p=c-o*(r.deltaTime/1e3),Math.max(a,p))}},Xe.pointerHandle=function(e){var t={left:0,top:0,width:0,height:0},o=e||1;return function(e,n,i,r,a,s,c){return t.left=s-.5*o,t.top=c-.5*o,t.width=o,t.height=o,t}},Xe.prototype._readTick=function(e){this._isDestroyed||(e&&this._tickTime?(this._tickDeltaTime=e-this._tickTime,this._tickTime=e,this._updateRequests(),this._updateActions()):(this._tickTime=e,this._tickDeltaTime=0))},Xe.prototype._writeTick=function(){this._isDestroyed||(this._applyActions(),ze(this._readTick,this._writeTick))},Xe.prototype._startTicking=function(){this._isTicking=!0,ze(this._readTick,this._writeTick)},Xe.prototype._stopTicking=function(){this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,ae.remove(0,ne),ae.remove(2,ie)},Xe.prototype._getItemHandleRect=function(e,t,o){var n=e._drag;if(t){var i=n._dragMoveEvent||n._dragStartEvent,r=t(e,n._clientX,n._clientY,e._width,e._height,i.clientX,i.clientY);o.left=r.left,o.top=r.top,o.width=r.width,o.height=r.height}else o.left=n._clientX,o.top=n._clientY,o.width=e._width,o.height=e._height;return o.right=o.left+o.width,o.bottom=o.top+o.height,o},Xe.prototype._requestItemScroll=function(e,t,o,n,i,r,a){var s=this._requests[t],c=s[e._id];c?c.element===o&&c.direction===n||c.reset():c=this._requestPool.pick(),c.item=e,c.element=o,c.direction=n,c.threshold=i,c.distance=r,c.maxValue=a,s[e._id]=c},Xe.prototype._cancelItemScroll=function(e,t){var o=this._requests[t],n=o[e._id];n&&(n.action&&n.action.removeRequest(n),this._requestPool.release(n),delete o[e._id])},Xe.prototype._checkItemOverlap=function(e,t,o){var n=Re(e),i=ue(n.targets)?n.targets(e):n.targets,r=n.threshold,a=n.safeZone;if(!i||!i.length)return t&&this._cancelItemScroll(e,1),void(o&&this._cancelItemScroll(e,2));var s=this._dragDirections[e._id],c=s[0],p=s[1];if(!c&&!p)return t&&this._cancelItemScroll(e,1),void(o&&this._cancelItemScroll(e,2));for(var b=this._getItemHandleRect(e,n.handle,De),M=xe,d=null,l=null,z=!0,u=!0,O=0,A=0,f=null,h=null,m=0,q=0,_=0,W=null,g=-1/0,y=0,v=0,L=null,w=0,R=0,k=null,T=-1/0,S=0,E=0,N=null,B=0,C=0,D=0;D<i.length;D++)d=i[D],z=t&&c&&2!==d.axis,u=o&&p&&1!==d.axis,A=d.priority||0,(!z||A<g)&&(!u||A<T)||(l=We(d.element||d),q=z?ve(l):-1,_=u?Le(l):-1,(q||_)&&((O=Ce(b,M=we(l,M)))<=0||(z&&A>=g&&q>0&&(A>g||O>v)&&(h=null,f=Se("number"==typeof d.threshold?d.threshold:r,a,b.width,M.width),5===c?(m=M.right+f.offset-b.right)<=f.value&&ge(l)<q&&(h=5):9===c&&(m=b.left-(M.left-f.offset))<=f.value&&ge(l)>0&&(h=9),null!==h&&(W=l,g=A,y=f.value,v=O,L=h,w=m,R=q)),u&&A>=T&&_>0&&(A>T||O>E)&&(h=null,f=Se("number"==typeof d.threshold?d.threshold:r,a,b.height,M.height),6===p?(m=M.bottom+f.offset-b.bottom)<=f.value&&ye(l)<_&&(h=6):10===p&&(m=b.top-(M.top-f.offset))<=f.value&&ye(l)>0&&(h=10),null!==h&&(k=l,T=A,S=f.value,E=O,N=h,B=m,C=_)))));t&&(W?this._requestItemScroll(e,1,W,L,y,w,R):this._cancelItemScroll(e,1)),o&&(k?this._requestItemScroll(e,2,k,N,S,B,C):this._cancelItemScroll(e,2))},Xe.prototype._updateScrollRequest=function(e){for(var t=e.item,o=Re(t),n=ue(o.targets)?o.targets(t):o.targets,i=n&&n.length||0,r=o.threshold,a=o.safeZone,s=this._getItemHandleRect(t,o.handle,De),c=xe,p=null,b=null,M=!1,d=null,l=null,z=null,u=null,O=null,A=0;A<i;A++)if((b=We((p=n[A]).element||p))===e.element){if(M=!!(1&e.direction)){if(2===p.axis)continue}else if(1===p.axis)continue;if((u=M?ve(b):Le(b))<=0)break;if(Ce(s,c=we(b,c))<=0)break;if(d=Se("number"==typeof p.threshold?p.threshold:r,a,M?s.width:s.height,M?c.width:c.height),(l=9===e.direction?s.left-(c.left-d.offset):5===e.direction?c.right+d.offset-s.right:10===e.direction?s.top-(c.top-d.offset):c.bottom+d.offset-s.bottom)>d.value)break;if(z=M?ge(b):ye(b),O=4&e.direction?z>=u:z<=0)break;return e.maxValue=u,e.threshold=d.value,e.distance=l,e.isEnding=!1,!0}return!0===o.smoothStop&&e.speed>0?(null===O&&(O=e.hasReachedEnd()),e.isEnding=!O):e.isEnding=!1,e.isEnding},Xe.prototype._updateRequests=function(){for(var e,t,o,n,i,r,a,s=this._items,c=this._requests[1],p=this._requests[2],b=0;b<s.length;b++)e=s[b],i=(n=this._requestOverlapCheck[e._id])>0&&this._tickTime-n>this._overlapCheckInterval,r=!0,(t=c[e._id])&&t.isActive&&(r=!this._updateScrollRequest(t))&&(i=!0,this._cancelItemScroll(e,1)),a=!0,(o=p[e._id])&&o.isActive&&(a=!this._updateScrollRequest(o))&&(i=!0,this._cancelItemScroll(e,2)),i&&(this._requestOverlapCheck[e._id]=0,this._checkItemOverlap(e,r,a))},Xe.prototype._requestAction=function(e,t){for(var o=this._actions,n=1===t,i=null,r=0;r<o.length;r++){if(i=o[r],e.element===i.element){if(n?i.requestX:i.requestY)return void this._cancelItemScroll(e.item,t);break}i=null}i||(i=this._actionPool.pick()),i.element=e.element,i.addRequest(e),e.tick(this._tickDeltaTime),o.push(i)},Xe.prototype._updateActions=function(){var e,t,o,n,i=this._items,r=this._requests,a=this._actions;for(n=0;n<i.length;n++)e=i[n]._id,t=r[1][e],o=r[2][e],t&&this._requestAction(t,1),o&&this._requestAction(o,2);for(n=0;n<a.length;n++)a[n].computeScrollValues()},Xe.prototype._applyActions=function(){var e,t=this._actions,o=this._items;if(t.length){for(e=0;e<t.length;e++)t[e].scroll(),this._actionPool.release(t[e]);for(t.length=0,e=0;e<o.length;e++)ke(o[e]);for(e=0;e<o.length;e++)Te(o[e])}},Xe.prototype._updateDragDirection=function(e){var t=this._dragPositions[e._id],o=this._dragDirections[e._id],n=e._drag._left,i=e._drag._top;if(t.length){var r=t[0],a=t[1];o[0]=n>r?5:n<r?9:o[0]||0,o[1]=i>a?6:i<a?10:o[1]||0}t[0]=n,t[1]=i},Xe.prototype.addItem=function(e){this._isDestroyed||-1===this._items.indexOf(e)&&(this._items.push(e),this._requestOverlapCheck[e._id]=this._tickTime,this._dragDirections[e._id]=[0,0],this._dragPositions[e._id]=[],this._isTicking||this._startTicking())},Xe.prototype.updateItem=function(e){this._isDestroyed||this._dragDirections[e._id]&&(this._updateDragDirection(e),this._requestOverlapCheck[e._id]||(this._requestOverlapCheck[e._id]=this._tickTime))},Xe.prototype.removeItem=function(e){if(!this._isDestroyed){var t=this._items.indexOf(e);if(-1!==t){var o=e._id;this._requests[1][o]&&(this._cancelItemScroll(e,1),delete this._requests[1][o]),this._requests[2][o]&&(this._cancelItemScroll(e,2),delete this._requests[2][o]),delete this._requestOverlapCheck[o],delete this._dragPositions[o],delete this._dragDirections[o],this._items.splice(t,1),this._isTicking&&!this._items.length&&this._stopTicking()}}},Xe.prototype.isItemScrollingX=function(e){var t=this._requests[1][e._id];return!(!t||!t.isActive)},Xe.prototype.isItemScrollingY=function(e){var t=this._requests[2][e._id];return!(!t||!t.isActive)},Xe.prototype.isItemScrolling=function(e){return this.isItemScrollingX(e)||this.isItemScrollingY(e)},Xe.prototype.destroy=function(){if(!this._isDestroyed){for(var e=this._items.slice(0),t=0;t<e.length;t++)this.removeItem(e[t]);this._actions.length=0,this._requestPool.reset(),this._actionPool.reset(),this._isDestroyed=!0}};var Ye=window.Element.prototype,Pe=Ye.matches||Ye.matchesSelector||Ye.webkitMatchesSelector||Ye.mozMatchesSelector||Ye.msMatchesSelector||Ye.oMatchesSelector||function(){return!1};function Ie(e,t){return Pe.call(e,t)}function He(e,t){t&&(e.classList?e.classList.add(t):Ie(e,"."+t)||(e.className+=" "+t))}var je=[];function Fe(e,t,o){var n="number"==typeof o?o:-1;n<0&&(n=e.length-n+1),e.splice.apply(e,je.concat(n,0,t)),je.length=0}function Ge(e,t,o){var n=Math.max(0,e.length-1+(o||0));return t>n?n:t<0?Math.max(n+t+1,0):t}function $e(e,t,o){if(!(e.length<2)){var n=Ge(e,t),i=Ge(e,o);n!==i&&e.splice(i,0,e.splice(n,1)[0])}}function Ue(e,t,o){if(!(e.length<2)){var n,i=Ge(e,t),r=Ge(e,o);i!==r&&(n=e[i],e[i]=e[r],e[r]=n)}}var Ve=w(document.documentElement.style,"transform")||"transform",Je=/([A-Z])/g,Ke=/^(webkit-|moz-|ms-|o-)/,Qe=/^(-m-s-)/;function Ze(e){var t=e.replace(Je,"-$1").toLowerCase();return(t=t.replace(Ke,"-$1")).replace(Qe,"-ms-")}var et=Ze(Ve);function tt(e){var t=Ae(e,et);if(!t||"none"===t)return!1;var o=Ae(e,"display");return"inline"!==o&&"none"!==o}function ot(e){for(var t=document,o=e||t;o&&o!==t&&"static"===Ae(o,"position")&&!tt(o);)o=o.parentElement||t;return o}var nt={},it={},rt={};function at(e,t){var o,n=t||{};return n.left=0,n.top=0,e===document||(n.left=window.pageXOffset||0,n.top=window.pageYOffset||0,e.self===window.self||(o=e.getBoundingClientRect(),n.left+=o.left,n.top+=o.top,n.left+=fe(e,"border-left-width"),n.top+=fe(e,"border-top-width"))),n}function st(e,t,o){return rt.left=0,rt.top=0,e===t||o&&(e=ot(e))===(t=ot(t))||(at(e,nt),at(t,it),rt.left=it.left-nt.left,rt.top=it.top-nt.top),rt}function ct(e){return"auto"===e||"scroll"===e||"overlay"===e}function pt(e){return ct(Ae(e,"overflow"))||ct(Ae(e,"overflow-x"))||ct(Ae(e,"overflow-y"))}function bt(e,t){for(t=t||[];e&&e!==document;)e.getRootNode&&e instanceof DocumentFragment?e=e.getRootNode().host:(pt(e)&&t.push(e),e=e.parentNode);return t.push(window),t}var Mt={},dt=/^matrix3d/,lt=/([^,]*,){4}/,zt=/([^,]*,){12}/,ut=/[^,]*,/;function Ot(e){Mt.x=0,Mt.y=0;var t=Ae(e,et);if(!t||"none"===t)return Mt;var o=dt.test(t),n=t.replace(o?zt:lt,""),i=n.replace(ut,"");return Mt.x=parseFloat(n)||0,Mt.y=parseFloat(i)||0,Mt}function At(e,t){t&&(e.classList?e.classList.remove(t):Ie(e,"."+t)&&(e.className=(" "+e.className+" ").replace(" "+t+" "," ").trim()))}var ft,ht,mt,qt,_t=/^(iPad|iPhone|iPod)/.test(window.navigator.platform)||/^Mac/.test(window.navigator.platform)&&window.navigator.maxTouchPoints>1,Wt=!!R()&&{passive:!0};function gt(e){var t=e._element,o=e.getGrid(),n=o._settings;this._item=e,this._gridId=o._id,this._isDestroyed=!1,this._isMigrating=!1,this._startPredicate=ue(n.dragStartPredicate)?n.dragStartPredicate:gt.defaultStartPredicate,this._startPredicateState=0,this._startPredicateResult=void 0,this._isSortNeeded=!1,this._sortTimer=void 0,this._blockedSortIndex=null,this._sortX1=0,this._sortX2=0,this._sortY1=0,this._sortY2=0,this._reset(),this._preStartCheck=this._preStartCheck.bind(this),this._preEndCheck=this._preEndCheck.bind(this),this._onScroll=this._onScroll.bind(this),this._prepareStart=this._prepareStart.bind(this),this._applyStart=this._applyStart.bind(this),this._prepareMove=this._prepareMove.bind(this),this._applyMove=this._applyMove.bind(this),this._prepareScroll=this._prepareScroll.bind(this),this._applyScroll=this._applyScroll.bind(this),this._handleSort=this._handleSort.bind(this),this._handleSortDelayed=this._handleSortDelayed.bind(this),this._handle=n.dragHandle&&t.querySelector(n.dragHandle)||t,this._dragger=new x(this._handle,n.dragCssProps),this._dragger.on("start",this._preStartCheck),this._dragger.on("move",this._preStartCheck),this._dragger.on("cancel",this._preEndCheck),this._dragger.on("end",this._preEndCheck)}function yt(e,t){var o,n,i={};if(Array.isArray(t))for(n=0;n<t.length;n++)i[o=t[n]]=Ae(e,Ze(o));else for(o in t)i[o]=Ae(e,Ze(o));return i}gt.autoScroller=new Xe,gt.defaultStartPredicate=function(e,t,o){var n=e._drag;if(t.isFirst&&t.srcEvent.button)return!1;if(!_t&&t.isFirst&&!0===t.srcEvent.isTrusted&&!1===t.srcEvent.defaultPrevented&&!1===t.srcEvent.cancelable)return!1;if(!t.isFinal){var i=n._startPredicateData;if(!i){var r=o||n._getGrid()._settings.dragStartPredicate||{};n._startPredicateData=i={distance:Math.max(r.distance,0)||0,delay:Math.max(r.delay,0)||0}}return i.delay&&(i.event=t,i.delayTimer||(i.delayTimer=window.setTimeout(function(){i.delay=0,n._resolveStartPredicate(i.event)&&(n._forceResolveStartPredicate(i.event),n._resetStartPredicate())},i.delay))),n._resolveStartPredicate(t)}n._finishStartPredicate(t)},gt.defaultSortPredicate=(ft={},ht={},mt={},qt=[],function(e,t){var o=e._drag,n=o._getGrid(),i=t&&"number"==typeof t.threshold?t.threshold:50,s=t&&t.action===r?r:a,c=t&&t.migrateAction===r?r:a;i=Math.min(Math.max(i,1),100),ft.width=e._width,ft.height=e._height,ft.left=o._clientX,ft.top=o._clientY;var p=function(e,t,o){var n,i,r,a,s,c,p,b,M,d,l=null,z=t._settings.dragSort,u=-1;if(!0===z?(qt[0]=t,i=qt):ue(z)&&(i=z.call(t,e)),!i||!Array.isArray(i)||!i.length)return l;for(d=0;d<i.length;d++)if(!(r=i[d])._isDestroyed){for(r._updateBoundingRect(),c=Math.max(0,r._left),p=Math.max(0,r._top),b=Math.min(window.innerWidth,r._right),M=Math.min(window.innerHeight,r._bottom),a=r._element.parentNode;a&&a!==document&&a!==document.documentElement&&a!==document.body;)if(a.getRootNode&&a instanceof DocumentFragment)a=a.getRootNode().host;else{if("visible"!==Ae(a,"overflow")&&(s=a.getBoundingClientRect(),c=Math.max(c,s.left),p=Math.max(p,s.top),b=Math.min(b,s.right),M=Math.min(M,s.bottom)),"fixed"===Ae(a,"position"))break;a=a.parentNode}c>=b||p>=M||(ht.left=c,ht.top=p,ht.width=b-c,ht.height=M-p,(n=Ce(ft,ht))>o&&n>u&&(u=n,l=r))}return qt.length=0,l}(e,n,i);if(!p)return null;var b,M,d,l=e.getGrid()!==p,z=0,u=0,O=0,A=-1,f=!1;for(p===n?(ft.left=o._gridX+e._marginLeft,ft.top=o._gridY+e._marginTop):(p._updateBorders(1,0,1,0),z=p._left+p._borderLeft,u=p._top+p._borderTop),d=0;d<p._items.length;d++)(b=p._items[d])._isActive&&b!==e&&(f=!0,ht.width=b._width,ht.height=b._height,ht.left=b._left+b._marginLeft+z,ht.top=b._top+b._marginTop+u,(M=Ce(ft,ht))>O&&(A=d,O=M));return l&&O<i&&(A=f?A:0,O=i),O>=i?(mt.grid=p,mt.index=A,mt.action=l?c:s,mt):null}),gt.prototype.stop=function(){if(this._isActive)if(this._isMigrating)this._finishMigration();else{var e=this._item,t=e._id;if(gt.autoScroller.removeItem(e),pe(t),be(t),Me(t),this._cancelSort(),this._isStarted){this._unbindScrollListeners();var o=e._element,n=this._getGrid(),i=n._settings.itemDraggingClass;o.parentNode!==n._element&&(n._element.appendChild(o),e._setTranslate(this._gridX,this._gridY),i&&o.clientWidth),At(o,i)}this._reset()}},gt.prototype.sort=function(e){var t=this._item;this._isActive&&t._isActive&&this._dragMoveEvent&&(!0===e?this._handleSort():de(t._id,this._handleSort))},gt.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._dragger.destroy(),gt.autoScroller.removeItem(this._item),this._isDestroyed=!0)},gt.prototype._getGrid=function(){return n[this._gridId]||null},gt.prototype._reset=function(){this._isActive=!1,this._isStarted=!1,this._container=null,this._containingBlock=null,this._dragStartEvent=null,this._dragMoveEvent=null,this._dragPrevMoveEvent=null,this._scrollEvent=null,this._scrollers=[],this._left=0,this._top=0,this._gridX=0,this._gridY=0,this._clientX=0,this._clientY=0,this._scrollDiffX=0,this._scrollDiffY=0,this._moveDiffX=0,this._moveDiffY=0,this._containerDiffX=0,this._containerDiffY=0},gt.prototype._bindScrollListeners=function(){var e,t,o=this._getGrid()._element,n=this._container,i=this._scrollers;if(i.length=0,bt(this._item._element.parentNode,i),n!==o)for(bt(o,e=[]),t=0;t<e.length;t++)i.indexOf(e[t])<0&&i.push(e[t]);for(t=0;t<i.length;t++)i[t].addEventListener("scroll",this._onScroll,Wt)},gt.prototype._unbindScrollListeners=function(){var e,t=this._scrollers;for(e=0;e<t.length;e++)t[e].removeEventListener("scroll",this._onScroll,Wt);t.length=0},gt.prototype._resolveStartPredicate=function(e){var t=this._startPredicateData;if(!(e.distance<t.distance||t.delay))return this._resetStartPredicate(),!0},gt.prototype._forceResolveStartPredicate=function(e){this._isDestroyed||1!==this._startPredicateState||(this._startPredicateState=2,this._onStart(e))},gt.prototype._finishStartPredicate=function(e){var t=this._item._element,o=Math.abs(e.deltaX)<2&&Math.abs(e.deltaY)<2&&e.deltaTime<200;this._resetStartPredicate(),o&&function(e){if("a"===e.tagName.toLowerCase()){var t=e.getAttribute("href");if(t){var o=e.getAttribute("target");o&&"_self"!==o?window.open(t,o):window.location.href=t}}}(t)},gt.prototype._resetHeuristics=function(e,t){this._blockedSortIndex=null,this._sortX1=this._sortX2=e,this._sortY1=this._sortY2=t},gt.prototype._checkHeuristics=function(e,t){var o=this._getGrid()._settings.dragSortHeuristics,n=o.minDragDistance;if(n<=0)return this._blockedSortIndex=null,!0;var i=e-this._sortX2,r=t-this._sortY2,a=n>3&&o.minBounceBackAngle>0;if(a||(this._blockedSortIndex=null),Math.abs(i)>n||Math.abs(r)>n){if(a){var s=Math.atan2(i,r),c=Math.atan2(this._sortX2-this._sortX1,this._sortY2-this._sortY1),p=Math.atan2(Math.sin(s-c),Math.cos(s-c));Math.abs(p)>o.minBounceBackAngle&&(this._blockedSortIndex=null)}return this._sortX1=this._sortX2,this._sortY1=this._sortY2,this._sortX2=e,this._sortY2=t,!0}return!1},gt.prototype._resetStartPredicate=function(){var e=this._startPredicateData;e&&(e.delayTimer&&(e.delayTimer=window.clearTimeout(e.delayTimer)),this._startPredicateData=null)},gt.prototype._handleSort=function(){if(this._isActive){var e=this._getGrid()._settings;if(!e.dragSort||!e.dragAutoScroll.sortDuringScroll&>.autoScroller.isItemScrolling(this._item))return this._sortX1=this._sortX2=this._gridX,this._sortY1=this._sortY2=this._gridY,this._isSortNeeded=!0,void(void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)));var t=this._checkHeuristics(this._gridX,this._gridY);if(this._isSortNeeded||t){var o=e.dragSortHeuristics.sortInterval;o<=0||this._isSortNeeded?(this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),this._checkOverlap()):void 0===this._sortTimer&&(this._sortTimer=window.setTimeout(this._handleSortDelayed,o))}}},gt.prototype._handleSortDelayed=function(){this._isSortNeeded=!0,this._sortTimer=void 0,de(this._item._id,this._handleSort)},gt.prototype._cancelSort=function(){var e;this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),e=this._item._id,ae.remove(1,Z+e)},gt.prototype._finishSort=function(){var e=this._getGrid()._settings.dragSort&&(this._isSortNeeded||void 0!==this._sortTimer);this._cancelSort(),e&&this._checkOverlap()},gt.prototype._checkOverlap=function(){if(this._isActive){var e,t,o,n,i,s,c,p,b=this._item,M=this._getGrid()._settings;(e=ue(M.dragSortPredicate)?M.dragSortPredicate(b,this._dragMoveEvent):gt.defaultSortPredicate(b,M.dragSortPredicate))&&"number"==typeof e.index&&(c=e.action===r?r:a,p=(t=b.getGrid())!==(n=e.grid||t),o=t._items.indexOf(b),i=Ge(n._items,e.index,p&&c===a?1:0),(p||i!==this._blockedSortIndex)&&(p?(this._blockedSortIndex=null,s=n._items[i],t._hasListeners(O)&&t._emit(O,{item:b,fromGrid:t,fromIndex:o,toGrid:n,toIndex:i}),n._hasListeners(f)&&n._emit(f,{item:b,fromGrid:t,fromIndex:o,toGrid:n,toIndex:i}),b._gridId=n._id,this._isMigrating=b._gridId!==this._gridId,t._items.splice(o,1),Fe(n._items,b,i),b._sortData=null,t._hasListeners(u)&&t._emit(u,{item:b,fromGrid:t,fromIndex:o,toGrid:n,toIndex:i}),n._hasListeners(A)&&n._emit(A,{item:b,fromGrid:t,fromIndex:o,toGrid:n,toIndex:i}),c===r&&s&&s.isActive()&&n._items.indexOf(s)>-1&&n.send(s,t,o,{appendTo:this._container||document.body,layoutSender:!1,layoutReceiver:!1}),t.layout(),n.layout()):o!==i&&(this._blockedSortIndex=o,(c===r?Ue:$e)(t._items,o,i),t._hasListeners(z)&&t._emit(z,{item:b,fromIndex:o,toIndex:i,action:c}),t.layout())))}},gt.prototype._finishMigration=function(){var e,t,o=this._item,n=o._dragRelease,i=o._element,r=o._isActive,a=o.getGrid(),s=a._element,c=a._settings,p=c.dragContainer||s,b=this._getGrid()._settings,M=i.parentNode,d=r?b.itemVisibleClass:b.itemHiddenClass,l=r?c.itemVisibleClass:c.itemHiddenClass;this._isMigrating=!1,this.destroy(),b.itemClass!==c.itemClass&&(At(i,b.itemClass),He(i,c.itemClass)),d!==l&&(At(i,d),He(i,l)),p!==M&&(p.appendChild(i),t=st(M,p,!0),(e=Ot(i)).x-=t.left,e.y-=t.top),o._refreshDimensions(),t=st(p,s,!0),n._containerDiffX=t.left,n._containerDiffY=t.top,o._drag=c.dragEnabled?new gt(o):null,p!==M&&o._setTranslate(e.x,e.y),o._visibility.setStyles(r?c.visibleStyles:c.hiddenStyles),n.start()},gt.prototype._preStartCheck=function(e){0===this._startPredicateState&&(this._startPredicateState=1),1===this._startPredicateState?(this._startPredicateResult=this._startPredicate(this._item,e),!0===this._startPredicateResult?(this._startPredicateState=2,this._onStart(e)):!1===this._startPredicateResult&&(this._resetStartPredicate(e),this._dragger._reset(),this._startPredicateState=0)):2===this._startPredicateState&&this._isActive&&this._onMove(e)},gt.prototype._preEndCheck=function(e){var t=2===this._startPredicateState;this._startPredicate(this._item,e),this._startPredicateState=0,t&&this._isActive&&(this._isStarted?this._onEnd(e):this.stop())},gt.prototype._onStart=function(e){var t,o,n,i=this._item;i._isActive&&(this._isActive=!0,this._dragStartEvent=e,gt.autoScroller.addItem(i),t=i._id,o=this._prepareStart,n=this._applyStart,ae.add(0,$+t,o),ae.add(2,U+t,n))},gt.prototype._prepareStart=function(){if(this._isActive){var e=this._item;if(e._isActive){var t=e._element,o=this._getGrid(),n=o._settings,i=o._element,r=n.dragContainer||i,a=ot(r),s=Ot(t),c=t.getBoundingClientRect(),p=r!==i;if(this._container=r,this._containingBlock=a,this._clientX=c.left,this._clientY=c.top,this._left=this._gridX=s.x,this._top=this._gridY=s.y,this._scrollDiffX=this._scrollDiffY=0,this._moveDiffX=this._moveDiffY=0,this._resetHeuristics(this._gridX,this._gridY),p){var b=st(a,i);this._containerDiffX=b.left,this._containerDiffY=b.top}}}},gt.prototype._applyStart=function(){if(this._isActive){var e=this._item;if(e._isActive){var t=this._getGrid(),o=e._element,n=e._dragRelease,i=e._migrate,r=this._container!==t._element;e.isPositioning()&&e._layout.stop(!0,this._left,this._top),i._isActive&&(this._left-=i._containerDiffX,this._top-=i._containerDiffY,this._gridX-=i._containerDiffX,this._gridY-=i._containerDiffY,i.stop(!0,this._left,this._top)),e.isReleasing()&&n._reset(),t._settings.dragPlaceholder.enabled&&e._dragPlaceholder.create(),this._isStarted=!0,t._emit("dragInit",e,this._dragStartEvent),r&&(o.parentNode===this._container?(this._gridX-=this._containerDiffX,this._gridY-=this._containerDiffY):(this._left+=this._containerDiffX,this._top+=this._containerDiffY,this._container.appendChild(o),e._setTranslate(this._left,this._top))),He(o,t._settings.itemDraggingClass),this._bindScrollListeners(),t._emit("dragStart",e,this._dragStartEvent)}}},gt.prototype._onMove=function(e){var t,o,n,i=this._item;i._isActive?(this._dragMoveEvent=e,t=i._id,o=this._prepareMove,n=this._applyMove,ae.add(0,V+t,o),ae.add(2,J+t,n),de(i._id,this._handleSort)):this.stop()},gt.prototype._prepareMove=function(){if(this._isActive&&this._item._isActive){var e=this._getGrid()._settings.dragAxis,t=this._dragMoveEvent,o=this._dragPrevMoveEvent||this._dragStartEvent||t;if("y"!==e){var n=t.clientX-o.clientX;this._left=this._left-this._moveDiffX+n,this._gridX=this._gridX-this._moveDiffX+n,this._clientX=this._clientX-this._moveDiffX+n,this._moveDiffX=n}if("x"!==e){var i=t.clientY-o.clientY;this._top=this._top-this._moveDiffY+i,this._gridY=this._gridY-this._moveDiffY+i,this._clientY=this._clientY-this._moveDiffY+i,this._moveDiffY=i}this._dragPrevMoveEvent=t}},gt.prototype._applyMove=function(){if(this._isActive){var e=this._item;e._isActive&&(this._moveDiffX=this._moveDiffY=0,e._setTranslate(this._left,this._top),this._getGrid()._emit("dragMove",e,this._dragMoveEvent),gt.autoScroller.updateItem(e))}},gt.prototype._onScroll=function(e){var t,o,n,i=this._item;i._isActive?(this._scrollEvent=e,t=i._id,o=this._prepareScroll,n=this._applyScroll,ae.add(0,K+t,o),ae.add(2,Q+t,n),de(i._id,this._handleSort)):this.stop()},gt.prototype._prepareScroll=function(){if(this._isActive){var e=this._item;if(e._isActive){var t=e._element,o=this._getGrid()._element,n=t.getBoundingClientRect();if(this._container!==o){var i=st(this._containingBlock,o);this._containerDiffX=i.left,this._containerDiffY=i.top}var r=this._clientX-this._moveDiffX-n.left;this._left=this._left-this._scrollDiffX+r,this._scrollDiffX=r;var a=this._clientY-this._moveDiffY-n.top;this._top=this._top-this._scrollDiffY+a,this._scrollDiffY=a,this._gridX=this._left-this._containerDiffX,this._gridY=this._top-this._containerDiffY}}},gt.prototype._applyScroll=function(){if(this._isActive){var e=this._item;e._isActive&&(this._scrollDiffX=this._scrollDiffY=0,e._setTranslate(this._left,this._top),this._getGrid()._emit("dragScroll",e,this._scrollEvent))}},gt.prototype._onEnd=function(e){var t=this._item,o=t._element,n=this._getGrid(),i=n._settings,r=t._dragRelease;t._isActive?(pe(t._id),be(t._id),Me(t._id),this._finishSort(),this._unbindScrollListeners(),r._containerDiffX=this._containerDiffX,r._containerDiffY=this._containerDiffY,this._reset(),At(o,i.itemDraggingClass),gt.autoScroller.removeItem(t),n._emit("dragEnd",t,e),this._isMigrating?this._finishMigration():r.start()):this.stop()};var vt=/^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/,Lt={};function wt(e){var t=Lt[e];return t||((t=e.replace(vt,""))!==e&&(t=t[0].toLowerCase()+t.slice(1)),Lt[e]=t,t)}function Rt(e,t){for(var o in t)e.style[o]=t[o]}var kt,Tt,St=!(!Element||!ue(Element.prototype.animate)),Et=!!(Element&&(kt=Element.prototype.animate,Tt=window.Symbol,kt&&ue(Tt)&&ue(Tt.toString)&&Tt(kt).toString().indexOf("[native code]")>-1));function Nt(e){this._element=e,this._animation=null,this._duration=0,this._easing="",this._callback=null,this._props=[],this._values=[],this._isDestroyed=!1,this._onFinish=this._onFinish.bind(this)}function Bt(e,t){var o={};for(var n in e)o[t?n:wt(n)]=e[n];return o}function Ct(e,t){return"translateX("+e+"px) translateY("+t+"px)"}function Dt(e){this._item=e,this._animation=new Nt,this._element=null,this._className="",this._didMigrate=!1,this._resetAfterLayout=!1,this._left=0,this._top=0,this._transX=0,this._transY=0,this._nextTransX=0,this._nextTransY=0,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this),this._updateDimensions=this._updateDimensions.bind(this),this._onLayoutStart=this._onLayoutStart.bind(this),this._onLayoutEnd=this._onLayoutEnd.bind(this),this._onReleaseEnd=this._onReleaseEnd.bind(this),this._onMigrate=this._onMigrate.bind(this),this._onHide=this._onHide.bind(this)}function xt(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}function Xt(e){var t=e._element,o=t.style;this._item=e,this._isActive=!1,this._isDestroyed=!1,this._isInterrupted=!1,this._currentStyles={},this._targetStyles={},this._nextLeft=0,this._nextTop=0,this._offsetLeft=0,this._offsetTop=0,this._skipNextAnimation=!1,this._animOptions={onFinish:this._finish.bind(this),duration:0,easing:0},o.left="0px",o.top="0px",e._setTranslate(0,0),this._animation=new Nt(t),this._queue="layout-"+e._id,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}function Yt(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._container=!1,this._containerDiffX=0,this._containerDiffY=0}function Pt(e){var t=e._isActive,o=e._element,n=o.children[0],i=e.getGrid()._settings;if(!n)throw new Error("No valid child element found within item element.");this._item=e,this._isDestroyed=!1,this._isHidden=!t,this._isHiding=!1,this._isShowing=!1,this._childElement=n,this._currentStyleProps=[],this._animation=new Nt(n),this._queue="visibility-"+e._id,this._finishShow=this._finishShow.bind(this),this._finishHide=this._finishHide.bind(this),o.style.display=t?"":"none",He(o,t?i.itemVisibleClass:i.itemHiddenClass),this.setStyles(t?i.visibleStyles:i.hiddenStyles)}Nt.prototype.start=function(e,t,o){if(!this._isDestroyed){var n=this._element,i=o||{};if(!St)return Rt(n,t),this._callback=ue(i.onFinish)?i.onFinish:null,void this._onFinish();var r,a,s,c=this._animation,p=this._props,b=this._values,M=i.duration||300,d=i.easing||"ease",l=!1;if(c&&(a=0,M===this._duration&&d===this._easing||(l=!0),!l)){for(r in t)if(++a,-1===(s=p.indexOf(r))||t[r]!==b[s]){l=!0;break}a!==p.length&&(l=!0)}if(l&&c.cancel(),this._callback=ue(i.onFinish)?i.onFinish:null,!c||l){for(r in p.length=b.length=0,t)p.push(r),b.push(t[r]);this._duration=M,this._easing=d,this._animation=n.animate([Bt(e,Et),Bt(t,Et)],{duration:M,easing:d}),this._animation.onfinish=this._onFinish,Rt(n,t)}}},Nt.prototype.stop=function(){!this._isDestroyed&&this._animation&&(this._animation.cancel(),this._animation=this._callback=null,this._props.length=this._values.length=0)},Nt.prototype.getCurrentStyles=function(){return yt(element,currentProps)},Nt.prototype.isAnimating=function(){return!!this._animation},Nt.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=null,this._isDestroyed=!0)},Nt.prototype._onFinish=function(){var e=this._callback;this._animation=this._callback=null,this._props.length=this._values.length=0,e&&e()},Dt.prototype._updateDimensions=function(){this.isActive()&&Rt(this._element,{width:this._item._width+"px",height:this._item._height+"px"})},Dt.prototype._onLayoutStart=function(e,t){var o=this._item;if(-1!==e.indexOf(o)){var n=o._left,i=o._top,r=this._left,a=this._top;if(this._left=n,this._top=i,t||this._didMigrate||r!==n||a!==i){var s,c,p,b=n+o._marginLeft,M=i+o._marginTop,d=o.getGrid();if(t||!(d._settings.layoutDuration>0)||this._didMigrate)return le(o._id),this._element.style[Ve]=Ct(b,M),this._animation.stop(),void(this._didMigrate&&(d.getElement().appendChild(this._element),this._didMigrate=!1));this._nextTransX=b,this._nextTransY=M,s=o._id,c=this._setupAnimation,p=this._startAnimation,ae.add(0,ee+s,c),ae.add(2,te+s,p)}}else this.reset()},Dt.prototype._setupAnimation=function(){if(this.isActive()){var e=Ot(this._element);this._transX=e.x,this._transY=e.y}},Dt.prototype._startAnimation=function(){if(this.isActive()){var e=this._animation,t=this._transX,o=this._transY,n=this._nextTransX,i=this._nextTransY;if(t!==n||o!==i){var r=this._item.getGrid()._settings,a={},s={};a[Ve]=Ct(t,o),s[Ve]=Ct(n,i),e.start(a,s,{duration:r.layoutDuration,easing:r.layoutEasing,onFinish:this._onLayoutEnd})}else e.isAnimating()&&(this._element.style[Ve]=Ct(n,i),e.stop())}},Dt.prototype._onLayoutEnd=function(){this._resetAfterLayout&&this.reset()},Dt.prototype._onReleaseEnd=function(e){if(e._id===this._item._id){if(!this._animation.isAnimating())return void this.reset();this._resetAfterLayout=!0}},Dt.prototype._onMigrate=function(e){if(e.item===this._item){var t=this._item.getGrid(),o=e.toGrid;t.off(h,this._onReleaseEnd),t.off(s,this._onLayoutStart),t.off(O,this._onMigrate),t.off(M,this._onHide),o.on(h,this._onReleaseEnd),o.on(s,this._onLayoutStart),o.on(O,this._onMigrate),o.on(M,this._onHide),this._didMigrate=!0}},Dt.prototype._onHide=function(e){e.indexOf(this._item)>-1&&this.reset()},Dt.prototype.create=function(){if(this.isActive())this._resetAfterLayout=!1;else{var e,t=this._item,o=t.getGrid(),n=o._settings,i=this._animation;this._left=t._left,this._top=t._top,e=ue(n.dragPlaceholder.createElement)?n.dragPlaceholder.createElement(t):document.createElement("div"),this._element=e,i._element=e,this._className=n.itemPlaceholderClass||"",this._className&&He(e,this._className),Rt(e,{position:"absolute",left:"0px",top:"0px",width:t._width+"px",height:t._height+"px"}),e.style[Ve]=Ct(t._left+t._marginLeft,t._top+t._marginTop),o.on(s,this._onLayoutStart),o.on(h,this._onReleaseEnd),o.on(O,this._onMigrate),o.on(M,this._onHide),ue(n.dragPlaceholder.onCreate)&&n.dragPlaceholder.onCreate(t,e),o.getElement().appendChild(e)}},Dt.prototype.reset=function(){if(this.isActive()){var e,t=this._element,o=this._item,n=o.getGrid(),i=n._settings,r=this._animation;this._resetAfterLayout=!1,le(o._id),e=o._id,ae.remove(2,oe+e),r.stop(),r._element=null,n.off(h,this._onReleaseEnd),n.off(s,this._onLayoutStart),n.off(O,this._onMigrate),n.off(M,this._onHide),this._className&&(At(t,this._className),this._className=""),t.parentNode.removeChild(t),this._element=null,ue(i.dragPlaceholder.onRemove)&&i.dragPlaceholder.onRemove(o,t)}},Dt.prototype.isActive=function(){return!!this._element},Dt.prototype.getElement=function(){return this._element},Dt.prototype.updateDimensions=function(){var e,t;this.isActive()&&(e=this._item._id,t=this._updateDimensions,ae.add(2,oe+e,t))},Dt.prototype.destroy=function(){this.reset(),this._animation.destroy(),this._item=this._animation=null},xt.prototype.start=function(){if(!this._isDestroyed&&!this._isActive){var e=this._item,t=e.getGrid(),o=t._settings;this._isActive=!0,He(e._element,o.itemReleasingClass),o.dragRelease.useDragContainer||this._placeToGrid(),t._emit("dragReleaseStart",e),t._nextLayoutData||e._layout.start(!1)}},xt.prototype.stop=function(e,t,o){if(!this._isDestroyed&&this._isActive){var n=this._item,i=n.getGrid();e||void 0!==t&&void 0!==o||(t=n._left,o=n._top);var r=this._placeToGrid(t,o);this._reset(r),e||i._emit(h,n)}},xt.prototype.isJustReleased=function(){return this._isActive&&!1===this._isPositioningStarted},xt.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},xt.prototype._placeToGrid=function(e,t){if(!this._isDestroyed){var o=this._item,n=o._element,i=o.getGrid()._element,r=!1;if(n.parentNode!==i){if(void 0===e||void 0===t){var a=Ot(n);e=a.x-this._containerDiffX,t=a.y-this._containerDiffY}i.appendChild(n),o._setTranslate(e,t),r=!0}return this._containerDiffX=0,this._containerDiffY=0,r}},xt.prototype._reset=function(e){if(!this._isDestroyed){var t=this._item,o=t.getGrid()._settings.itemReleasingClass;this._isActive=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0,o&&(e&&t._element.clientWidth,At(t._element,o))}},Xt.prototype.start=function(e,t){if(!this._isDestroyed){var o,n,i,r=this._item,a=r._dragRelease,s=r.getGrid()._settings,c=this._isActive,p=a.isJustReleased(),b=p?s.dragRelease.duration:s.layoutDuration,M=p?s.dragRelease.easing:s.layoutEasing,d=!e&&!this._skipNextAnimation&&b>0;if(c&&(se(r._id),r._emitter.burst(this._queue,!0,r)),p&&(a._isPositioningStarted=!0),ue(t)&&r._emitter.on(this._queue,t),this._skipNextAnimation=!1,!d)return this._updateOffsets(),r._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._animation.isAnimating()&&(this._animation._animation.onfinish=null),this._isActive=!0,this._animOptions.easing=M,this._animOptions.duration=b,this._isInterrupted=c,o=r._id,n=this._setupAnimation,i=this._startAnimation,ae.add(0,H+o,n),ae.add(2,j+o,i)}},Xt.prototype.stop=function(e,t,o){if(!this._isDestroyed&&this._isActive){var n=this._item;if(se(n._id),this._animation.isAnimating()){if(void 0===t||void 0===o){var i=Ot(n._element);t=i.x,o=i.y}n._setTranslate(t,o),this._animation.stop()}At(n._element,n.getGrid()._settings.itemPositioningClass),this._isActive=!1,e&&n._emitter.burst(this._queue,!0,n)}},Xt.prototype.destroy=function(){if(!this._isDestroyed){var e=this._item._element.style;this.stop(!0,0,0),this._item._emitter.clear(this._queue),this._animation.destroy(),e[Ve]="",e.left="",e.top="",this._item=null,this._currentStyles=null,this._targetStyles=null,this._animOptions=null,this._isDestroyed=!0}},Xt.prototype._updateOffsets=function(){if(!this._isDestroyed){var e=this._item,t=e._migrate,o=e._dragRelease;this._offsetLeft=o._isActive?o._containerDiffX:t._isActive?t._containerDiffX:0,this._offsetTop=o._isActive?o._containerDiffY:t._isActive?t._containerDiffY:0,this._nextLeft=this._item._left+this._offsetLeft,this._nextTop=this._item._top+this._offsetTop}},Xt.prototype._finish=function(){if(!this._isDestroyed){var e=this._item,t=e._migrate,o=e._dragRelease;e._tX=this._nextLeft,e._tY=this._nextTop,this._isActive&&(this._isActive=!1,At(e._element,e.getGrid()._settings.itemPositioningClass)),o._isActive&&o.stop(),t._isActive&&t.stop(),e._emitter.burst(this._queue,!1,e)}},Xt.prototype._setupAnimation=function(){var e=this._item;if(void 0===e._tX||void 0===e._tY){var t=Ot(e._element);e._tX=t.x,e._tY=t.y}},Xt.prototype._startAnimation=function(){var e=this._item,t=e.getGrid()._settings,o=this._animOptions.duration<=0;this._updateOffsets();var n=Math.abs(e._left-(e._tX-this._offsetLeft)),i=Math.abs(e._top-(e._tY-this._offsetTop));if(o||n<2&&i<2)return(n||i||this._isInterrupted)&&e._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._isInterrupted||He(e._element,t.itemPositioningClass),this._currentStyles[Ve]=Ct(e._tX,e._tY),this._targetStyles[Ve]=Ct(this._nextLeft,this._nextTop),e._tX=e._tY=void 0,this._animation.start(this._currentStyles,this._targetStyles,this._animOptions)},Yt.prototype.start=function(e,t,o){if(!this._isDestroyed){var n,i,r,a,s,c,p,b,M,d,l=this._item,z=l._element,h=l.isActive(),m=l.isVisible(),q=l.getGrid(),_=q._settings,W=e._settings,g=e._element,y=e._items,v=q._items.indexOf(l),L=o||document.body;if("number"==typeof t)n=Ge(y,t,1);else{if(!(i=e.getItem(t)))return;n=y.indexOf(i)}(l.isPositioning()||this._isActive||l.isReleasing())&&(p=(c=Ot(z)).x,b=c.y),l.isPositioning()&&l._layout.stop(!0,p,b),this._isActive&&(p-=this._containerDiffX,b-=this._containerDiffY,this.stop(!0,p,b)),l.isReleasing()&&(p-=l._dragRelease._containerDiffX,b-=l._dragRelease._containerDiffY,l._dragRelease.stop(!0,p,b)),l._visibility.stop(!0),l._drag&&l._drag.destroy(),q._hasListeners(O)&&q._emit(O,{item:l,fromGrid:q,fromIndex:v,toGrid:e,toIndex:n}),e._hasListeners(f)&&e._emit(f,{item:l,fromGrid:q,fromIndex:v,toGrid:e,toIndex:n}),_.itemClass!==W.itemClass&&(At(z,_.itemClass),He(z,W.itemClass)),(M=m?_.itemVisibleClass:_.itemHiddenClass)!==(d=m?W.itemVisibleClass:W.itemHiddenClass)&&(At(z,M),He(z,d)),q._items.splice(v,1),Fe(y,l,n),l._gridId=e._id,h?L!==(r=z.parentNode)&&(L.appendChild(z),a=st(L,r,!0),c||(p=(c=Ot(z)).x,b=c.y),l._setTranslate(p+a.left,b+a.top)):g.appendChild(z),l._visibility.setStyles(m?W.visibleStyles:W.hiddenStyles),h&&(s=st(L,g,!0)),l._refreshDimensions(),l._sortData=null,l._drag=W.dragEnabled?new gt(l):null,h?(this._isActive=!0,this._container=L,this._containerDiffX=s.left,this._containerDiffY=s.top):(this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0),q._hasListeners(u)&&q._emit(u,{item:l,fromGrid:q,fromIndex:v,toGrid:e,toIndex:n}),e._hasListeners(A)&&e._emit(A,{item:l,fromGrid:q,fromIndex:v,toGrid:e,toIndex:n})}},Yt.prototype.stop=function(e,t,o){if(!this._isDestroyed&&this._isActive){var n,i=this._item,r=i._element,a=i.getGrid()._element;this._container!==a&&(void 0!==t&&void 0!==o||(e?(t=(n=Ot(r)).x-this._containerDiffX,o=n.y-this._containerDiffY):(t=i._left,o=i._top)),a.appendChild(r),i._setTranslate(t,o)),this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0}},Yt.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},Pt.prototype.show=function(e,t){if(!this._isDestroyed){var o=this._item,n=o._element,i=ue(t)?t:null,r=o.getGrid()._settings;this._isShowing||this._isHidden?!this._isShowing||e?(this._isShowing||(o._emitter.burst(this._queue,!0,o),At(n,r.itemHiddenClass),He(n,r.itemVisibleClass),this._isHiding||(n.style.display="")),i&&o._emitter.on(this._queue,i),this._isShowing=!0,this._isHiding=this._isHidden=!1,this._startAnimation(!0,e,this._finishShow)):i&&o._emitter.on(this._queue,i):i&&i(!1,o)}},Pt.prototype.hide=function(e,t){if(!this._isDestroyed){var o=this._item,n=o._element,i=ue(t)?t:null,r=o.getGrid()._settings;this._isHiding||!this._isHidden?!this._isHiding||e?(this._isHiding||(o._emitter.burst(this._queue,!0,o),He(n,r.itemHiddenClass),At(n,r.itemVisibleClass)),i&&o._emitter.on(this._queue,i),this._isHidden=this._isHiding=!0,this._isShowing=!1,this._startAnimation(!1,e,this._finishHide)):i&&o._emitter.on(this._queue,i):i&&i(!1,o)}},Pt.prototype.stop=function(e){if(!this._isDestroyed&&(this._isHiding||this._isShowing)){var t=this._item;ce(t._id),this._animation.stop(),e&&t._emitter.burst(this._queue,!0,t)}},Pt.prototype.setStyles=function(e){var t=this._childElement,o=this._currentStyleProps;for(var n in this._removeCurrentStyles(),e)o.push(n),t.style[n]=e[n]},Pt.prototype.destroy=function(){if(!this._isDestroyed){var e=this._item,t=e._element,o=e.getGrid()._settings;this.stop(!0),e._emitter.clear(this._queue),this._animation.destroy(),this._removeCurrentStyles(),At(t,o.itemVisibleClass),At(t,o.itemHiddenClass),t.style.display="",this._isHiding=this._isShowing=!1,this._isDestroyed=this._isHidden=!0}},Pt.prototype._startAnimation=function(e,t,o){if(!this._isDestroyed){var n,i=this._item,r=this._animation,a=this._childElement,s=i.getGrid()._settings,c=e?s.visibleStyles:s.hiddenStyles,p=e?s.showDuration:s.hideDuration,b=e?s.showEasing:s.hideEasing,M=t||p<=0;if(c){if(ce(i._id),M)return Rt(a,c),r.stop(),void(o&&o());var d,l,z;r.isAnimating()&&(r._animation.onfinish=null),d=i._id,l=function(){n=yt(a,c)},z=function(){r.start(n,c,{duration:p,easing:b,onFinish:o})},ae.add(0,F+d,l),ae.add(2,G+d,z)}else o&&o()}},Pt.prototype._finishShow=function(){this._isHidden||(this._isShowing=!1,this._item._emitter.burst(this._queue,!1,this._item))},Pt.prototype._finishHide=function(){if(this._isHidden){var e=this._item;this._isHiding=!1,e._layout.stop(!0,0,0),e._element.style.display="none",e._emitter.burst(this._queue,!1,e)}},Pt.prototype._removeCurrentStyles=function(){for(var e=this._childElement,t=this._currentStyleProps,o=0;o<t.length;o++)e.style[t[o]]="";t.length=0};var It=0;function Ht(){return++It}function jt(e,t,o){var n=e._settings;if(i){if(i.has(t))throw new Error("You can only create one Muuri Item per element!");i.set(t,this)}this._id=Ht(),this._gridId=e._id,this._element=t,this._isDestroyed=!1,this._left=0,this._top=0,this._width=0,this._height=0,this._marginLeft=0,this._marginRight=0,this._marginTop=0,this._marginBottom=0,this._tX=void 0,this._tY=void 0,this._sortData=null,this._emitter=new W,t.parentNode!==e._element&&e._element.appendChild(t),He(t,n.itemClass),"boolean"!=typeof o&&(o="none"!==Ae(t,"display")),this._isActive=o,this._visibility=new Pt(this),this._layout=new Xt(this),this._migrate=new Yt(this),this._drag=n.dragEnabled?new gt(this):null,this._dragRelease=new xt(this),this._dragPlaceholder=new Dt(this)}function Ft(e){var t,o,n,i,r,a=.001,s=.5;function c(e){return((1e3*e+.5|0)/10|0)/100}function p(){this.currentRects=[],this.nextRects=[],this.rectTarget={},this.rectStore=[],this.slotSizes=[],this.rectId=0,this.slotIndex=-1,this.slotData={left:0,top:0,width:0,height:0},this.sortRectsLeftTop=this.sortRectsLeftTop.bind(this),this.sortRectsTopLeft=this.sortRectsTopLeft.bind(this)}if(p.prototype.computeLayout=function(e,t){var o,n,i,r,a,s,p=e.items,b=e.slots,M=!!(1&t),d=!!(2&t),l=!!(4&t),z=!!(8&t),u=!!(16&t),O="number"==typeof p[0];if(!p.length)return e;for(n=O?2:1,o=0;o<p.length;o+=n)O?(r=p[o],a=p[o+1]):(r=(i=p[o])._width+i._marginLeft+i._marginRight,a=i._height+i._marginTop+i._marginBottom),u&&(r=c(r),a=c(a)),s=this.computeNextSlot(e,r,a,M,d),d?s.left+s.width>e.width&&(e.width=s.left+s.width):s.top+s.height>e.height&&(e.height=s.top+s.height),b[++this.slotIndex]=s.left,b[++this.slotIndex]=s.top,(l||z)&&this.slotSizes.push(s.width,s.height);if(l)for(o=0;o<b.length;o+=2)b[o]=e.width-(b[o]+this.slotSizes[o]);if(z)for(o=1;o<b.length;o+=2)b[o]=e.height-(b[o]+this.slotSizes[o]);return this.slotSizes.length=0,this.currentRects.length=0,this.nextRects.length=0,this.rectStore.length=0,this.rectId=0,this.slotIndex=-1,e},p.prototype.computeNextSlot=function(e,t,o,n,i){var r,c,p,b,M,d=this.slotData,l=this.currentRects,z=this.nextRects,u=!1;for(z.length=0,d.left=null,d.top=null,d.width=t,d.height=o,b=0;b<l.length;b++)if((c=l[b])&&(r=this.getRect(c),d.width<=r.width+a&&d.height<=r.height+a)){d.left=r.left,d.top=r.top;break}if(null===d.left&&(i?(d.left=e.width,d.top=0):(d.left=0,d.top=e.height),n||(u=!0)),!i&&d.top+d.height>e.height+a&&(d.left>s&&z.push(this.addRect(0,e.height,d.left,1/0)),d.left+d.width<e.width-s&&z.push(this.addRect(d.left+d.width,e.height,e.width-d.left-d.width,1/0)),e.height=d.top+d.height),i&&d.left+d.width>e.width+a&&(d.top>s&&z.push(this.addRect(e.width,0,1/0,d.top)),d.top+d.height<e.height-s&&z.push(this.addRect(e.width,d.top+d.height,1/0,e.height-d.top-d.height)),e.width=d.left+d.width),!u)for(n&&(b=0);b<l.length;b++)if(c=l[b])for(r=this.getRect(c),p=this.splitRect(r,d),M=0;M<p.length;M++)c=p[M],r=this.getRect(c),(i?r.left+a<e.width-a:r.top+a<e.height-a)&&z.push(c);return z.length>1&&this.purgeRects(z).sort(i?this.sortRectsLeftTop:this.sortRectsTopLeft),this.currentRects=z,this.nextRects=l,d},p.prototype.addRect=function(e,t,o,n){var i=++this.rectId;return this.rectStore[i]=e||0,this.rectStore[++this.rectId]=t||0,this.rectStore[++this.rectId]=o||0,this.rectStore[++this.rectId]=n||0,i},p.prototype.getRect=function(e,t){return t||(t=this.rectTarget),t.left=this.rectStore[e]||0,t.top=this.rectStore[++e]||0,t.width=this.rectStore[++e]||0,t.height=this.rectStore[++e]||0,t},p.prototype.splitRect=(t=[],o=0,n=0,function(e,i){return t.length=0,e.left+e.width<=i.left+a||i.left+i.width<=e.left+a||e.top+e.height<=i.top+a||i.top+i.height<=e.top+a?(t.push(this.addRect(e.left,e.top,e.width,e.height)),t):((o=i.left-e.left)>=s&&t.push(this.addRect(e.left,e.top,o,e.height)),(o=e.left+e.width-(i.left+i.width))>=s&&t.push(this.addRect(i.left+i.width,e.top,o,e.height)),(n=i.top-e.top)>=s&&t.push(this.addRect(e.left,e.top,e.width,n)),(n=e.top+e.height-(i.top+i.height))>=s&&t.push(this.addRect(e.left,i.top+i.height,e.width,n)),t)}),p.prototype.isRectAWithinRectB=function(e,t){return e.left+a>=t.left&&e.top+a>=t.top&&e.left+e.width-a<=t.left+t.width&&e.top+e.height-a<=t.top+t.height},p.prototype.purgeRects=(i={},r={},function(e){for(var t,o=e.length;o--;)if(t=e.length,e[o])for(this.getRect(e[o],i);t--;)if(e[t]&&o!==t&&(this.getRect(e[t],r),this.isRectAWithinRectB(i,r))){e[o]=0;break}return e}),p.prototype.sortRectsTopLeft=function(){var e={},t={};return function(o,n){return this.getRect(o,e),this.getRect(n,t),e.top<t.top&&e.top+a<t.top?-1:e.top>t.top&&e.top-a>t.top?1:e.left<t.left&&e.left+a<t.left?-1:e.left>t.left&&e.left-a>t.left?1:0}}(),p.prototype.sortRectsLeftTop=function(){var e={},t={};return function(o,n){return this.getRect(o,e),this.getRect(n,t),e.left<t.left&&e.left+a<t.left?-1:e.left>t.left&&e.left-a<t.left?1:e.top<t.top&&e.top+a<t.top?-1:e.top>t.top&&e.top-a>t.top?1:0}}(),e){var b=new p;self.onmessage=function(e){var t=new Float32Array(e.data),o=t.subarray(4,t.length),n=new Float32Array(o.length),i=t[3],r={items:o,slots:n,width:t[1],height:t[2]};b.computeLayout(r,i),t[1]=r.width,t[2]=r.height,t.set(r.slots,4),postMessage(t.buffer,[t.buffer])}}return p}jt.prototype.getGrid=function(){return n[this._gridId]},jt.prototype.getElement=function(){return this._element},jt.prototype.getWidth=function(){return this._width},jt.prototype.getHeight=function(){return this._height},jt.prototype.getMargin=function(){return{left:this._marginLeft,right:this._marginRight,top:this._marginTop,bottom:this._marginBottom}},jt.prototype.getPosition=function(){return{left:this._left,top:this._top}},jt.prototype.isActive=function(){return this._isActive},jt.prototype.isVisible=function(){return!!this._visibility&&!this._visibility._isHidden},jt.prototype.isShowing=function(){return!(!this._visibility||!this._visibility._isShowing)},jt.prototype.isHiding=function(){return!(!this._visibility||!this._visibility._isHiding)},jt.prototype.isPositioning=function(){return!(!this._layout||!this._layout._isActive)},jt.prototype.isDragging=function(){return!(!this._drag||!this._drag._isActive)},jt.prototype.isReleasing=function(){return!(!this._dragRelease||!this._dragRelease._isActive)},jt.prototype.isDestroyed=function(){return this._isDestroyed},jt.prototype._refreshDimensions=function(e){if(!(this._isDestroyed||!0!==e&&this._visibility._isHidden)){var t=this._element,o=this._dragPlaceholder,n=t.getBoundingClientRect();this._width=n.width,this._height=n.height,this._marginLeft=Math.max(0,fe(t,"margin-left")),this._marginRight=Math.max(0,fe(t,"margin-right")),this._marginTop=Math.max(0,fe(t,"margin-top")),this._marginBottom=Math.max(0,fe(t,"margin-bottom")),o&&o.updateDimensions()}},jt.prototype._refreshSortData=function(){if(!this._isDestroyed){var e,t=this._sortData={},o=this.getGrid()._settings.sortData;for(e in o)t[e]=o[e](this,this._element)}},jt.prototype._addToLayout=function(e,t){!0!==this._isActive&&(this._isActive=!0,this._left=e||0,this._top=t||0)},jt.prototype._removeFromLayout=function(){!1!==this._isActive&&(this._isActive=!1,this._left=0,this._top=0)},jt.prototype._canSkipLayout=function(e,t){return this._left===e&&this._top===t&&!this._migrate._isActive&&!this._layout._skipNextAnimation&&!this._dragRelease.isJustReleased()},jt.prototype._setTranslate=function(e,t){return(this._tX!==e||this._tY!==t)&&(this._tX=e,this._tY=t,this._element.style[Ve]=Ct(e,t),!0)},jt.prototype._destroy=function(e){if(!this._isDestroyed){var t=this._element,o=this.getGrid()._settings;this._dragPlaceholder.destroy(),this._dragRelease.destroy(),this._migrate.destroy(),this._layout.destroy(),this._visibility.destroy(),this._drag&&this._drag.destroy(),this._emitter.destroy(),At(t,o.itemClass),e&&t.parentNode.removeChild(t),i&&i.delete(t),this._isActive=!1,this._isDestroyed=!0}};var Gt=Ft(),$t=null,Ut=[];function Vt(e,t){if(this._options=0,this._processor=null,this._layoutQueue=[],this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={},this._workers=[],this._onWorkerMessage=this._onWorkerMessage.bind(this),this.setOptions(t),(e="number"==typeof e?Math.max(0,e):0)&&window.Worker&&window.URL&&window.Blob)try{this._workers=function(e,t){var o=[];if(e>0){$t||($t=URL.createObjectURL(new Blob(["("+Ft.toString()+")(true)"],{type:"application/javascript"})));for(var n,i=0;i<e;i++)n=new Worker($t),t&&(n.onmessage=t),o.push(n),Ut.push(n)}return o}(e,this._onWorkerMessage)}catch(e){this._processor=new Gt}else this._processor=new Gt}Vt.prototype._sendToWorker=function(){if(this._layoutQueue.length&&this._workers.length){var e=this._layoutQueue.shift(),t=this._workers.pop(),o=this._layoutWorkerData[e];delete this._layoutWorkerData[e],this._layoutWorkers[e]=t,t.postMessage(o.buffer,[o.buffer])}},Vt.prototype._onWorkerMessage=function(e){var t=new Float32Array(e.data),o=t[0],n=this._layouts[o],i=this._layoutCallbacks[o],r=this._layoutWorkers[o];n&&delete this._layouts[o],i&&delete this._layoutCallbacks[o],r&&delete this._layoutWorkers[o],n&&i&&(n.width=t[1],n.height=t[2],n.slots=t.subarray(4,t.length),this._finalizeLayout(n),i(n)),r&&(this._workers.push(r),this._sendToWorker())},Vt.prototype._finalizeLayout=function(e){var t=e._grid,o=2&e._settings,n="border-box"===t._boxSizing;return delete e._grid,delete e._settings,e.styles={},o?e.styles.width=(n?e.width+t._borderLeft+t._borderRight:e.width)+"px":e.styles.height=(n?e.height+t._borderTop+t._borderBottom:e.height)+"px",e},Vt.prototype.setOptions=function(e){var t,o,n,i,r;e&&(t="boolean"==typeof e.fillGaps?e.fillGaps?1:0:1&this._options,o="boolean"==typeof e.horizontal?e.horizontal?2:0:2&this._options,n="boolean"==typeof e.alignRight?e.alignRight?4:0:4&this._options,i="boolean"==typeof e.alignBottom?e.alignBottom?8:0:8&this._options,r="boolean"==typeof e.rounding?e.rounding?16:0:16&this._options,this._options=t|o|n|i|r)},Vt.prototype.createLayout=function(e,t,o,n,i,r){if(this._layouts[t])throw new Error("A layout with the provided id is currently being processed.");var a=2&this._options,s={id:t,items:o,slots:null,width:a?0:n,height:a?i:0,_grid:e,_settings:this._options};if(!o.length)return s.slots=[],this._finalizeLayout(s),void r(s);if(this._processor)return s.slots=window.Float32Array?new Float32Array(2*o.length):new Array(2*o.length),this._processor.computeLayout(s,s._settings),this._finalizeLayout(s),void r(s);var c,p,b,M=new Float32Array(4+2*o.length);for(M[0]=t,M[1]=s.width,M[2]=s.height,M[3]=s._settings,c=0,p=3;c<o.length;c++)b=o[c],M[++p]=b._width+b._marginLeft+b._marginRight,M[++p]=b._height+b._marginTop+b._marginBottom;return this._layoutQueue.push(t),this._layouts[t]=s,this._layoutCallbacks[t]=r,this._layoutWorkerData[t]=M,this._sendToWorker(),this.cancelLayout.bind(this,t)},Vt.prototype.cancelLayout=function(e){if(this._layouts[e]&&(delete this._layouts[e],delete this._layoutCallbacks[e],this._layoutWorkerData[e])){delete this._layoutWorkerData[e];var t=this._layoutQueue.indexOf(e);t>-1&&this._layoutQueue.splice(t,1)}},Vt.prototype.destroy=function(){for(var e in this._layoutWorkers)this._workers.push(this._layoutWorkers[e]);!function(e){for(var t,o,n=0;n<e.length;n++)(t=e[n]).onmessage=null,t.onerror=null,t.onmessageerror=null,t.terminate(),(o=Ut.indexOf(t))>-1&&Ut.splice(o,1);$t&&!Ut.length&&(URL.revokeObjectURL($t),$t=null)}(this._workers),this._workers.length=0,this._layoutQueue.length=0,this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={}};var Jt=0;function Kt(e){var t=Object.prototype.toString.call(e);return"[object HTMLCollection]"===t||"[object NodeList]"===t}var Qt=Object.prototype.toString;function Zt(e){return"object"==typeof e&&"[object Object]"===Qt.call(e)}function eo(){}var to,oo="number",no="string",io="instant",ro=0;function ao(e,t){if(typeof e===no&&(e=document.querySelector(e)),!(e.getRootNode?e.getRootNode({composed:!0})===document:document.body.contains(e))||e===document.documentElement)throw new Error("Container element must be an existing DOM element.");var o,i,r=function(e,t){var o=so({},e);return t&&(o=so(o,t)),t&&t.visibleStyles?o.visibleStyles=t.visibleStyles:e&&e.visibleStyles&&(o.visibleStyles=e.visibleStyles),t&&t.hiddenStyles?o.hiddenStyles=t.hiddenStyles:e&&e.hiddenStyles&&(o.hiddenStyles=e.hiddenStyles),o}(ao.defaultOptions,t);r.visibleStyles=co(r.visibleStyles),r.hiddenStyles=co(r.hiddenStyles),ue(r.dragSort)||(r.dragSort=!!r.dragSort),this._id=Ht(),this._element=e,this._settings=r,this._isDestroyed=!1,this._items=[],this._layout={id:0,items:[],slots:[]},this._isLayoutFinished=!0,this._nextLayoutData=null,this._emitter=new W,this._onLayoutDataReceived=this._onLayoutDataReceived.bind(this),n[this._id]=this,He(e,r.containerClass),o=this,typeof(i=r.layoutOnResize)!==oo&&(i=!0===i?0:-1),i>=0&&(o._resizeHandler=function(e,t){var o=++Jt,n=0,i=0,r=!1,a=function(t){r||(i&&(n-=t-i),i=t,n>0?function(e,t){ae.add(0,re+e,t)}(o,a):(n=i=0,e()))};return function(s){if(!r){if(!(t<=0))return!0===s?(r=!0,n=i=0,a=void 0,void function(e){ae.remove(0,re+e)}(o)):void(n<=0?(n=t,a(0)):n=t);!0!==s&&e()}}}(function(){o.refreshItems().layout()},i),window.addEventListener("resize",o._resizeHandler)),this.add(function(e,t){if("*"===t)return e.children;if(typeof t===no){for(var o=[],n=e.children,i=0;i<n.length;i++)Ie(n[i],t)&&o.push(n[i]);return o}return Array.isArray(t)||Kt(t)?t:[]}(e,r.items),{layout:!1}),r.layoutOnInit&&this.layout(!0)}function so(e,t){var o,n,i,r=Object.keys(t),a=r.length;for(i=0;i<a;i++)o=Zt(t[n=r[i]]),Zt(e[n])&&o?e[n]=so(so({},e[n]),t[n]):o?e[n]=so({},t[n]):Array.isArray(t[n])?e[n]=t[n].slice(0):e[n]=t[n];return e}function co(e){var t,o,n={},i=document.documentElement.style;for(t in e)e[t]&&(o=w(i,t))&&(n[o]=e[t]);return n}function po(e){for(var t={},o=0;o<e.length;o++)t[e[o]._id]=o;return t}function bo(e,t,o){return e[t._id]-e[o._id]}ao.Item=jt,ao.ItemLayout=Xt,ao.ItemVisibility=Pt,ao.ItemMigrate=Yt,ao.ItemDrag=gt,ao.ItemDragRelease=xt,ao.ItemDragPlaceholder=Dt,ao.Emitter=W,ao.Animator=Nt,ao.Dragger=x,ao.Packer=Vt,ao.AutoScroller=Xe,ao.defaultPacker=new Vt(2),ao.defaultOptions={items:"*",showDuration:300,showEasing:"ease",hideDuration:300,hideEasing:"ease",visibleStyles:{opacity:"1",transform:"scale(1)"},hiddenStyles:{opacity:"0",transform:"scale(0.5)"},layout:{fillGaps:!1,horizontal:!1,alignRight:!1,alignBottom:!1,rounding:!1},layoutOnResize:150,layoutOnInit:!0,layoutDuration:300,layoutEasing:"ease",sortData:null,dragEnabled:!1,dragContainer:null,dragHandle:null,dragStartPredicate:{distance:0,delay:0},dragAxis:"xy",dragSort:!0,dragSortHeuristics:{sortInterval:100,minDragDistance:10,minBounceBackAngle:1},dragSortPredicate:{threshold:50,action:a,migrateAction:a},dragRelease:{duration:300,easing:"ease",useDragContainer:!0},dragCssProps:{touchAction:"none",userSelect:"none",userDrag:"none",tapHighlightColor:"rgba(0, 0, 0, 0)",touchCallout:"none",contentZooming:"none"},dragPlaceholder:{enabled:!1,createElement:null,onCreate:null,onRemove:null},dragAutoScroll:{targets:[],handle:null,threshold:50,safeZone:.2,speed:Xe.smoothSpeed(1e3,2e3,2500),sortDuringScroll:!0,smoothStop:!1,onStart:null,onStop:null},containerClass:"muuri",itemClass:"muuri-item",itemVisibleClass:"muuri-item-shown",itemHiddenClass:"muuri-item-hidden",itemPositioningClass:"muuri-item-positioning",itemDraggingClass:"muuri-item-dragging",itemReleasingClass:"muuri-item-releasing",itemPlaceholderClass:"muuri-item-placeholder"},ao.prototype.on=function(e,t){return this._emitter.on(e,t),this},ao.prototype.off=function(e,t){return this._emitter.off(e,t),this},ao.prototype.getElement=function(){return this._element},ao.prototype.getItem=function(e){if(this._isDestroyed||!e&&0!==e)return null;if(typeof e===oo)return this._items[e>-1?e:this._items.length+e]||null;if(e instanceof jt)return e._gridId===this._id?e:null;if(i){var t=i.get(e);return t&&t._gridId===this._id?t:null}for(var o=0;o<this._items.length;o++)if(this._items[o]._element===e)return this._items[o];return null},ao.prototype.getItems=function(e){if(this._isDestroyed||void 0===e)return this._items.slice(0);var t,o,n=[];if(Array.isArray(e)||Kt(e))for(t=0;t<e.length;t++)(o=this.getItem(e[t]))&&n.push(o);else(o=this.getItem(e))&&n.push(o);return n},ao.prototype.refreshItems=function(e,t){if(this._isDestroyed)return this;var o,n,i,r,a=e||this._items;if(!0===t)for(r=[],o=0;o<a.length;o++)(n=a[o]).isVisible()||n.isHiding()||((i=n.getElement().style).visibility="hidden",i.display="",r.push(i));for(o=0;o<a.length;o++)a[o]._refreshDimensions(t);if(!0===t){for(o=0;o<r.length;o++)(i=r[o]).visibility="",i.display="none";r.length=0}return this},ao.prototype.refreshSortData=function(e){if(this._isDestroyed)return this;for(var t=e||this._items,o=0;o<t.length;o++)t[o]._refreshSortData();return this},ao.prototype.synchronize=function(){if(this._isDestroyed)return this;var e,t,o=this._items;if(!o.length)return this;for(var n=0;n<o.length;n++)(t=o[n]._element).parentNode===this._element&&(e=e||document.createDocumentFragment()).appendChild(t);return e?(this._element.appendChild(e),this._emit("synchronize"),this):this},ao.prototype.layout=function(e,t){if(this._isDestroyed)return this;var o=this._nextLayoutData;o&&ue(o.cancel)&&o.cancel();var n=ro=ro%16777216+1;this._nextLayoutData={id:n,instant:e,onFinish:t,cancel:null};for(var i=this._items,r=[],a=0;a<i.length;a++)i[a]._isActive&&r.push(i[a]);this._refreshDimensions();var s,c=this._width-this._borderLeft-this._borderRight,p=this._height-this._borderTop-this._borderBottom,b=this._settings.layout;return ue(b)?s=b(this,n,r,c,p,this._onLayoutDataReceived):(ao.defaultPacker.setOptions(b),s=ao.defaultPacker.createLayout(this,n,r,c,p,this._onLayoutDataReceived)),ue(s)&&this._nextLayoutData&&this._nextLayoutData.id===n&&(this._nextLayoutData.cancel=s),this},ao.prototype.add=function(e,t){if(this._isDestroyed||!e)return[];var o,n=Kt(o=e)?Array.prototype.slice.call(o):Array.prototype.concat(o);if(!n.length)return n;var i,r,a,s,c=t||{},p=c.layout?c.layout:void 0===c.layout,b=this._items,M=!1;for(s=0;s<n.length;s++)(r=n[s]).parentNode!==this._element&&(i=i||document.createDocumentFragment()).appendChild(r);for(i&&this._element.appendChild(i),s=0;s<n.length;s++)r=n[s],(a=n[s]=new jt(this,r,c.active))._isActive&&(M=!0,a._layout._skipNextAnimation=!0);for(s=0;s<n.length;s++)(a=n[s])._refreshDimensions(),a._refreshSortData();return Fe(b,n,c.index),this._hasListeners("add")&&this._emit("add",n.slice(0)),M&&p&&this.layout(p===io,ue(p)?p:void 0),n},ao.prototype.remove=function(e,t){if(this._isDestroyed||!e.length)return[];var o,n,i,r=t||{},a=r.layout?r.layout:void 0===r.layout,s=!1,c=this.getItems(),p=[],M=[];for(i=0;i<e.length;i++)(n=e[i])._isDestroyed||-1!==(o=this._items.indexOf(n))&&(n._isActive&&(s=!0),p.push(n),M.push(c.indexOf(n)),n._destroy(r.removeElements),this._items.splice(o,1));return this._hasListeners(b)&&this._emit(b,p.slice(0),M),s&&a&&this.layout(a===io,ue(a)?a:void 0),p},ao.prototype.show=function(e,t){return!this._isDestroyed&&e.length&&this._setItemsVisibility(e,!0,t),this},ao.prototype.hide=function(e,t){return!this._isDestroyed&&e.length&&this._setItemsVisibility(e,!1,t),this},ao.prototype.filter=function(e,t){if(this._isDestroyed||!this._items.length)return this;var o,n,i=[],r=[],a=typeof e===no,s=ue(e),c=t||{},p=!0===c.instant,b=c.syncWithLayout,M=c.layout?c.layout:void 0===c.layout,l=ue(c.onFinish)?c.onFinish:null,z=-1,u=eo;if(l&&(u=function(){++z&&l(i.slice(0),r.slice(0))}),s||a)for(n=0;n<this._items.length;n++)o=this._items[n],(s?e(o):Ie(o._element,e))?i.push(o):r.push(o);return i.length?this.show(i,{instant:p,syncWithLayout:b,onFinish:u,layout:!1}):u(),r.length?this.hide(r,{instant:p,syncWithLayout:b,onFinish:u,layout:!1}):u(),(i.length||r.length)&&(this._hasListeners(d)&&this._emit(d,i.slice(0),r.slice(0)),M&&this.layout(M===io,ue(M)?M:void 0)),this},ao.prototype.sort=function(){var e,t,o,n;function i(i,r){for(var a,s,c,p,b=0,M=0;M<e.length;M++)if(a=e[M][0],s=e[M][1],c=(i._sortData?i:i._refreshSortData())._sortData[a],p=(r._sortData?r:r._refreshSortData())._sortData[a],b="desc"===s||!s&&t?p<c?-1:p>c?1:0:c<p?-1:c>p?1:0)return b;return b||(n||(n=po(o)),b=t?bo(n,r,i):bo(n,i,r)),b}function r(i,r){var a=t?-e(i,r):e(i,r);return a||(n||(n=po(o)),a=t?bo(n,r,i):bo(n,i,r)),a}return function(a,s){if(this._isDestroyed||this._items.length<2)return this;var c=this._items,p=s||{},b=p.layout?p.layout:void 0===p.layout;if(t=!!p.descending,o=c.slice(0),n=null,ue(a))e=a,c.sort(r);else if(typeof a===no)e=a.trim().split(" ").filter(function(e){return e}).map(function(e){return e.split(":")}),c.sort(i);else{if(!Array.isArray(a))throw e=t=o=n=null,new Error("Invalid comparer argument provided.");c.length=0,c.push.apply(c,a)}return this._hasListeners(l)&&this._emit(l,c.slice(0),o),b&&this.layout(b===io,ue(b)?b:void 0),e=t=o=n=null,this}}(),ao.prototype.move=function(e,t,o){if(this._isDestroyed||this._items.length<2)return this;var n,i,s=this._items,c=o||{},p=c.layout?c.layout:void 0===c.layout,b=c.action===r,M=b?r:a,d=this.getItem(e),l=this.getItem(t);return d&&l&&d!==l&&(n=s.indexOf(d),i=s.indexOf(l),b?Ue(s,n,i):$e(s,n,i),this._hasListeners(z)&&this._emit(z,{item:d,fromIndex:n,toIndex:i,action:M}),p&&this.layout(p===io,ue(p)?p:void 0)),this},ao.prototype.send=function(e,t,o,n){if(this._isDestroyed||t._isDestroyed||this===t)return this;if(!(e=this.getItem(e)))return this;var i=n||{},r=i.appendTo||document.body,a=i.layoutSender?i.layoutSender:void 0===i.layoutSender,s=i.layoutReceiver?i.layoutReceiver:void 0===i.layoutReceiver;return e._migrate.start(t,o,r),e._migrate._isActive&&e._isActive&&(a&&this.layout(a===io,ue(a)?a:void 0),s&&t.layout(s===io,ue(s)?s:void 0)),this},ao.prototype.destroy=function(e){if(this._isDestroyed)return this;var t,o,i,r=this._element,a=this._items.slice(0),s=this._layout&&this._layout.styles||{};for((i=this)._resizeHandler&&(i._resizeHandler(!0),window.removeEventListener("resize",i._resizeHandler),i._resizeHandler=null),t=0;t<a.length;t++)a[t]._destroy(e);for(o in this._items.length=0,At(r,this._settings.containerClass),s)r.style[o]="";return this._emit("destroy"),this._emitter.destroy(),delete n[this._id],this._isDestroyed=!0,this},ao.prototype._emit=function(){this._isDestroyed||this._emitter.emit.apply(this._emitter,arguments)},ao.prototype._hasListeners=function(e){return!this._isDestroyed&&this._emitter.countListeners(e)>0},ao.prototype._updateBoundingRect=function(){var e=this._element.getBoundingClientRect();this._width=e.width,this._height=e.height,this._left=e.left,this._top=e.top,this._right=e.right,this._bottom=e.bottom},ao.prototype._updateBorders=function(e,t,o,n){var i=this._element;e&&(this._borderLeft=fe(i,"border-left-width")),t&&(this._borderRight=fe(i,"border-right-width")),o&&(this._borderTop=fe(i,"border-top-width")),n&&(this._borderBottom=fe(i,"border-bottom-width"))},ao.prototype._refreshDimensions=function(){this._updateBoundingRect(),this._updateBorders(1,1,1,1),this._boxSizing=Ae(this._element,"box-sizing")},ao.prototype._onLayoutDataReceived=(to=[],function(e){if(!this._isDestroyed&&this._nextLayoutData&&this._nextLayoutData.id===e.id){var t,o,n,i,r=this,a=this._nextLayoutData.instant,b=this._nextLayoutData.onFinish,M=e.items.length,d=M;for(this._nextLayoutData=null,!this._isLayoutFinished&&this._hasListeners(p)&&this._emit(p,this._layout.items.slice(0)),this._layout=e,to.length=0,i=0;i<M;i++)(t=e.items[i])?(o=e.slots[2*i],n=e.slots[2*i+1],t._canSkipLayout(o,n)?--d:(t._left=o,t._top=n,t.isActive()&&!t.isDragging()?to.push(t):--d)):--d;if(e.styles&&Rt(this._element,e.styles),!this._hasListeners(s)||(this._emit(s,e.items.slice(0),!0===a),this._layout.id===e.id)){var l=function(){if(!(--d>0)){var t=r._layout.id!==e.id,o=ue(a)?a:b;t||(r._isLayoutFinished=!0),ue(o)&&o(e.items.slice(0),t),!t&&r._hasListeners(c)&&r._emit(c,e.items.slice(0))}};if(!to.length)return l(),this;for(this._isLayoutFinished=!1,i=0;i<to.length&&this._layout.id===e.id;i++)to[i]._layout.start(!0===a,l);return this._layout.id===e.id&&(to.length=0),this}}}),ao.prototype._setItemsVisibility=function(e,t,o){var n,i,r=this,a=e.slice(0),c=o||{},p=!0===c.instant,b=c.onFinish,d=c.layout?c.layout:void 0===c.layout,l=a.length,z=t?"showStart":M,u=t?"showEnd":"hideEnd",O=t?"show":"hide",A=!1,f=[],h=[];if(l){for(i=0;i<a.length;i++)n=a[i],(t&&!n._isActive||!t&&n._isActive)&&(A=!0),n._layout._skipNextAnimation=!(!t||n._isActive),t&&n._visibility._isHidden&&h.push(n),t?n._addToLayout():n._removeFromLayout();h.length&&(this.refreshItems(h,!0),h.length=0),A&&!1!==c.syncWithLayout?this.on(s,m):m(),A&&d&&this.layout(d===io,ue(d)?d:void 0)}else ue(b)&&b(a);function m(){for(A&&!1!==c.syncWithLayout&&r.off(s,m),r._hasListeners(z)&&r._emit(z,a.slice(0)),i=0;i<a.length;i++)a[i]._gridId===r._id?a[i]._visibility[O](p,function(e,t){e||f.push(t),--l<1&&(ue(b)&&b(f.slice(0)),r._hasListeners(u)&&r._emit(u,f.slice(0)))}):--l<1&&(ue(b)&&b(f.slice(0)),r._hasListeners(u)&&r._emit(u,f.slice(0)))}};const Mo=ao;var lo=o(88903),zo=o(38745),uo=o(56155);const Oo=[];let Ao,fo;const ho=()=>{let e=document.querySelector(".SearchResult-dragContainer");return e||(e=(0,zo.A)("div",{className:"SearchResult-dragContainer"}),document.body.appendChild(e)),e},mo=()=>{const e=fo.querySelector(":scope .SearchResult-board"),t=()=>{if(e){const n=e.lastChild;if(n instanceof Element){const i=n.classList.contains("frame")?e.querySelector(".SearchResult-board-column:nth-last-child(-n+2)"):e.lastChild;i instanceof Element&&o.observe(i),Ao.off("layoutEnd",t);const r=e.closest(".Popup");r instanceof HTMLDivElement&&document.body.style.setProperty("--BoardContainer-zIndex",(parseInt(r.style.zIndex)+1).toString())}}},o=new IntersectionObserver(e=>{for(const t of e){const{isIntersecting:e,target:n}=t;if(e&&!n.classList.contains("frame")){o.unobserve(n);const e=fo.querySelector(":scope button.moreColumns-button");e&&e.click()}}},{root:fo,rootMargin:"25px",threshold:.75});Ao.on("layoutEnd",t)},qo=(e,t)=>{const o=t.parentNode;if(o instanceof HTMLDivElement){const n=new IntersectionObserver(e=>{for(const t of e){const{isIntersecting:e,target:i}=t;if(e){n.unobserve(i);const e=o?.querySelector(":scope button.moreCards-button");e&&e.click()}}},{root:o,rootMargin:"25px",threshold:.75}),i=()=>{const o=t.lastChild;o instanceof Element&&(n.observe(o),e.off("layoutEnd",i))};e.on("layoutEnd",i)}};let _o,Wo,go;(0,uo.A)(".is-muuri .SearchResult-boardContainer",e=>{fo=e;const t=e.querySelector(":scope div.SearchResult-board");if(!t)return;Ao=new Mo(t,{items:".SearchResult-board-column",layoutDuration:300,layoutEasing:"cubic-bezier(0.625, 0.225, 0.100, 0.890)",layout:(e,t,o,n,i,r)=>(Mo.defaultPacker.setOptions({horizontal:!0}),Mo.defaultPacker.createLayout(e,t,o,n,i,e=>{delete e.styles,r(e)})),dragEnabled:!1,dragAxis:"x",dragSortHeuristics:{sortInterval:0},dragHandle:".BoardView-title",dragRelease:{duration:300,easing:"cubic-bezier(0.625, 0.225, 0.100, 0.890)",useDragContainer:!1},dragAutoScroll:{targets:[{element:fo,axis:Mo.AutoScroller.AXIS_X}]}});const o=fo.querySelector(".SearchResult-board-errors");(0,uo.A)(".SearchResult-board-errors-close",e=>{e.onclick=()=>{o&&(o.innerHTML="")}}),mo()}),(0,uo.A)(".SearchResult-items .SearchResult-boardContainer",e=>{const t=e.closest(".SearchResult-items");t?.classList.add("is-muuri")}),(0,uo.A)("ol.BoardView-list",e=>{const t=e.closest(".SearchResult-board"),o=!!t?.hasAttribute("data-dragEnabled"),n=new Mo(e,{items:".BoardView-card",showDuration:300,showEasing:"ease",hideDuration:300,hideEasing:"ease",layoutDuration:300,layoutEasing:"cubic-bezier(0.625, 0.225, 0.100, 0.890)",dragEnabled:o,dragSort:()=>Oo.filter(e=>t?.contains(e.getElement())),dragContainer:ho(),dragRelease:{duration:300,easing:"cubic-bezier(0.625, 0.225, 0.100, 0.890)",useDragContainer:!0},dragStartPredicate:(e,t)=>{const o=t.target,n=e.getElement();return!("A"===o.tagName||o.className.includes("ContentSummary-info")||n&&n.hasAttribute("data-archived"))},dragPlaceholder:{enabled:!0,createElement:e=>{const t=e.getElement();return t?.cloneNode(!0)}},dragAutoScroll:{targets:e=>[window,{element:fo,priority:1,axis:Mo.AutoScroller.AXIS_X},{element:e.getGrid()?.getElement().parentNode,priority:1,axis:Mo.AutoScroller.AXIS_Y}],sortDuringScroll:!1}});let i;new MutationObserver(e=>{for(const t of e){const e=t.target;if("childList"===t.type&&e instanceof HTMLElement){new ResizeObserver((t,o)=>{n.refreshItems().layout(),o.unobserve(e)}).observe(e)}}}).observe(e,{childList:!0,subtree:!0}),n.on("dragReleaseEnd",e=>{if(i===e){const t=e.getElement();t instanceof HTMLElement&&t.classList.add("is-saving"),r(e);let o=null,i=null;if(_o){const e=_o.getElement().closest(".SearchResult-board-column");o=e?.querySelector(".BoardView-title")}if(n){const e=n.getElement().closest(".SearchResult-board-column");i=e?.querySelector(".BoardView-title")}if(o instanceof HTMLElement){const e=o.dataset.count;e&&(o.dataset.count=(parseInt(e)-1).toString())}if(i instanceof HTMLElement){const e=i.dataset.count;e&&(i.dataset.count=(parseInt(e)+1).toString())}}i=null,Wo=0}),n.on("dragStart",e=>{const t=e.getGrid();if(t instanceof Mo){_o=t,Wo=n.getItems().indexOf(e);const o=n.getElement();if(o){const e=o.closest(".SearchResult-board-column"),t=e?.getAttribute("data-boardFieldValue");t&&(go=t)}const i=e.getElement();i&&(i.style.width=e.getWidth()+"px",i.style.height=e.getHeight()+"px")}}),n.on("dragMove",e=>{n===_o&&null!==Wo&&n.move(e,Wo,{layout:"instant"})}),n.on("layoutStart",()=>{Ao&&Ao.refreshItems().layout()}),n.on("receive",e=>{i=e.item});const r=async e=>{const t=e.getElement(),o=t?.getAttribute("data-objectId"),i=document.querySelector('li[data-objectId="'+o+'"]');let r,a,s;if(i){const e=i.closest(".SearchResult-board");e&&(r=e.getAttribute("data-boardField"),s=e.getAttribute("data-search"))}if(t){const e=t.closest(".SearchResult-board-column");a=e?.getAttribute("data-boardFieldValue")}const c=new Headers,p=lo.A.get("bsp.csrf");p&&c.append("Brightspot-CSRF",p);const b=new FormData;o&&b.append("objectId",o),r&&b.append("boardField",r),a&&b.append("boardFieldValue",a),s&&b.append("search",s),b.append("previousBoardFieldValue",go);const M=await fetch(window.CONTEXT_PATH+"board/fieldUpdate",{method:"post",credentials:"include",headers:c,body:b}),d=await M.text();if(M.ok){const t=n.getItems().indexOf(e);n.remove([e],{removeElements:!0});const o=document.createElement("template");o.innerHTML=d;const i=o.content.firstChild;i instanceof HTMLElement&&n.add(i,{index:t})}else if(d){n.send(e,_o,Wo);const t=document.querySelector(".SearchResult-board-errors");t&&(t.innerHTML=d)}};qo(n,e),Oo.push(n)}),window.addEventListener("brightspot-frame-load",e=>{const t=e.target;if(t instanceof HTMLElement)if(t.classList.contains("BoardResults")){const e=[...t.querySelectorAll("li.BoardView-card")],o=t.closest(".BoardView-listContainer"),n=o?.querySelector("ol.BoardView-list");Oo.forEach(t=>{t instanceof Object&&t.getElement()===n&&(qo(t,n),t.add(e))})}else t.classList.contains("BoardResults-Horiz")&&(mo(),Ao.add([...t.querySelectorAll("div.SearchResult-board-column")]))})},94473(e,t,o){"use strict";(0,o(56155).A)(".Page .Page-broadcastAlert",e=>{const t=e.querySelector(".pagination");if(!t)return;const o=t.querySelector(".pagination-count");if(!o)return;const n=e.querySelectorAll(".Page-broadcastAlert-messages > *");if(!n)return;const i=t.querySelector(".previous");if(!i)return;const r=i.querySelector(":scope > a");if(!r)return;const a=t.querySelector(".next");if(!a)return;const s=a.querySelector(":scope > a");if(!s)return;const c=n.length;for(let e=1;e<c;e++)n[e].hidden=!0;let p=0;const b=()=>{o.textContent=`${p+1} / ${c}`};b();const M=e=>{n[p].hidden=!0,p+=e?1:-1,n[p].hidden=!1,b();const t=0===p;i.classList.toggle("is-disabled",t),r.tabIndex=t?-1:0;const o=p===c-1;a.classList.toggle("is-disabled",o),s.tabIndex=o?-1:0};i.addEventListener("click",e=>{e.preventDefault(),p>0&&M(!1)}),a.addEventListener("click",e=>{e.preventDefault(),p<c-1&&M(!0)})})},34409(e,t,o){"use strict";var n=o(56155),i=o(38745),r=o(88903),a=o(99022),s=o(30473);(0,n.A)(".BulkWorkflow-button",e=>{let t=null;e.addEventListener("keydown",t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e.click())}),e.addEventListener("click",async o=>{o.preventDefault(),o.stopPropagation();const n=o.target;let c;if(n instanceof HTMLElement&&(c=n.getAttribute("action-url")),!c)return;if(!t){const e=new Headers,o=r.A.get("bsp.csrf");o&&e.append("Brightspot-CSRF",o);const n=await fetch(c,{headers:e}),a=await n.text();t=(0,i.A)("div",{className:"BulkWorkflow",innerHTML:a,role:"dialog","aria-modal":"true"}),document.body.appendChild(t),t.addEventListener("keydown",e=>{if("Escape"===e.key){e.stopPropagation();const o=t?.querySelector(".closeButton");o&&o.click()}})}e.closest(".Popup")&&(t.style.zIndex=(0,s.default)().toString()),a.A.toggle(e,t,()=>{const o=e.classList.toggle("is-open");return t?.classList.toggle("is-open"),o&&requestAnimationFrame(()=>{const e=t?.querySelector(".closeButton");e&&e.focus()}),o});const p=t.querySelector(".closeButton");p?.addEventListener("click",()=>{const o=a.A.toggles.get(e);o&&o.closeListener&&window.removeEventListener("click",o.closeListener,!0),e.classList.remove("is-open"),t?.classList.remove("is-open"),t?.remove(),t=null;const n=e.closest(".SearchResult")?.querySelector(".SearchResult-actions-toggle");n&&n.focus()})})})},70660(e,t,o){"use strict";o.d(t,{A:()=>q}),o(44764),o(84978),o(13722),o(25809),o(91672);var n=o(29171),i=o(17319),r=o(76904),a=o(80133),s=o(31400);function c(){c=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!M(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?u(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=z(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:l(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=l(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function p(e){var t,o=z(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function b(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function M(e){return e.decorators&&e.decorators.length}function d(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function l(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function z(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},O.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}const f=window.localStorage,h=window.BRIGHTSPOT?.ui.tooltips.collapse,m=window.BRIGHTSPOT?.ui.tooltips.expand;let q=(_=[(0,i.EM)("btu-cig-cluster")],W=(0,r.j)((0,a.m)(n.WF)),g=c(),y=function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",key:"_collapsed",value:()=>!0},{kind:"field",decorators:[(0,i.MZ)({type:String,reflect:!0,attribute:"cluster-title"})],key:"clusterTitle",value:void 0},{kind:"field",decorators:[(0,i.MZ)({type:String})],key:"tab",value:void 0},{kind:"set",decorators:[(0,i.MZ)()],key:"collapsed",value:function(e){this._collapsed=e;const t=this.closest(".CIG"),o=t?.dataset.type,n=this.clusterTitle?.trim(),i=`BSP.ContentEdit.clusterExpanded.${o}.${n}`;o&&n&&(e?f.removeItem(i):f.setItem(i,"1")),this._collapsed?this.states.delete("btu-expanded"):this.states.add("btu-expanded"),this.requestUpdate()}},{kind:"get",key:"collapsed",value:function(){return this._collapsed}},{kind:"method",key:"_toggleRowVisibility",value:function(e){this.querySelectorAll(":scope > :not(.CIG-title)").forEach(t=>{t.childNodes.length&&(t.toggleAttribute("hidden",e),t.classList.toggle("TC-unselected",e))})}},{kind:"method",key:"connectedCallback",value:function(){var e,t,n,i,r;(e=o,t="connectedCallback",n=this,r=O(A(1&(i=3)?e.prototype:e),t,n),2&i&&"function"==typeof r?function(e){return r.apply(n,e)}:r)([]);const a=this.closest(".CIG"),s=a?.dataset.type,c=`BSP.ContentEdit.clusterExpanded.${s}.${this.clusterTitle}`;this.collapsed=!f.getItem(c)}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"firstUpdated",value:function(){this.emit("btu-cig-cluster-ready");const e=this.querySelector(".CIG-title"),t=this.firstChild;t instanceof Element&&!t.classList.contains("CIG-title")&&e&&this.insertBefore(e,t),this.dataset.tab=this.tab;const o=Array.from(this.querySelectorAll(".CIG-row")).filter(e=>e.childNodes.length);this.toggleAttribute("hidden",!o.length),Array.from(this.querySelectorAll(".CIG-row")).filter(e=>!e.childNodes.length).forEach(e=>e.toggleAttribute("hidden",!0)),this.querySelectorAll(".CIG-row > .Message.is-error").length>0?this.states.add("btu-error"):this.states.delete("btu-error")}},{kind:"method",key:"render",value:function(){return this._toggleRowVisibility(this.collapsed),n.qy`<h2 class="CIG-title" data-tab=${this.tab}>
|
|
3
3
|
<button
|
|
4
4
|
type="button"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
?disabled=${this.states.has("btu-copy-to-clipboard-copied")}
|
|
32
32
|
>
|
|
33
33
|
${this.label}
|
|
34
|
-
</button>`}}]},_=m.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(M(r.descriptor)||M(i.descriptor)){if(b(r)||b(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(b(r)){if(b(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}p(r,i)}else t.push(r)}return t}(q.d.map(c)),O),m.initializeClassElements(q.F,_.elements),m.runClassFinishers(q.F,_.finishers));var O,A,f,h,m,q,_},76363(e,t,o){"use strict";var n=o(88903),i=o(38745),r=o(56155),a=o(1439);(0,r.A)(".Diff-title",e=>{e.focus(),e.addEventListener("click",()=>{e.closest(".Popup-content")?.querySelector(".Popup-close")?.click()})}),(0,r.A)("[data-diff-state-id]",e=>{const t=e.dataset.diffStateId,o=e.closest(".Diff-container"),r=o?.querySelectorAll(`[data-diff-state-id="${t}"]`);if(r?.length){const t=r[0],o=r[1],s=t?.dataset,c=o?.dataset,p=s?.diffState,b=c?.diffState;if(!p)return void r[1]?.removeAttribute("data-diff-state");if(!b)return void r[0]?.removeAttribute("data-diff-state");e.addEventListener("click",async e=>{a(".is-diff").popup("close");const t=new Headers,o=n.A.get("bsp.csrf");o&&t.append("Brightspot-CSRF",o);const r=new FormData;r.append("left",p),r.append("right",b);try{const e=await fetch("/cms/diffRevision",{method:"POST",headers:t,body:r}),o=await e.text();document.getElementById("rtediff")?.remove();const n=(0,i.A)("div");n.id="rtediff",document.body.appendChild(n),n.innerHTML=o;const s=a(n).popup();s.popup("container").addClass("is-diff"),s.popup("open")}catch(e){console.error(e)}})}})},4308(e,t,o){"use strict";o.d(t,{A:()=>_}),o(44764),o(84978),o(25809),o(91672);var n=o(29171),i=o(17319),r=o(80133),a=o(38745),s=o(56155),c=o(57317);function p(){p=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!d(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?O(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=u(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:z(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=z(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function b(e){var t,o=u(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function M(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function d(e){return e.decorators&&e.decorators.length}function l(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function z(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function u(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function A(e,t,o,n){var i=f(h(1&n?e.prototype:e),t,o);return 2&n&&"function"==typeof i?function(e){return i.apply(o,e)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},f.apply(null,arguments)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}const m=window.localStorage,q=window.BRIGHTSPOT?.ui.tooltips;let _=(W=[(0,i.EM)("btu-eig")],g=(0,r.m)(n.WF),y=p(),v=function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,i.nJ)(".EIG-item")],key:"_eigItem",value:void 0},{kind:"field",decorators:[(0,i.nJ)(".EIG-title")],key:"_title",value:void 0},{kind:"field",decorators:[(0,i.nJ)(".removeButton")],key:"_removeButton",value:void 0},{kind:"method",key:"connectedCallback",value:function(){A(o,"connectedCallback",this,3)([]),this.initializeEigItem()}},{kind:"method",key:"disconnectedCallback",value:function(){A(o,"disconnectedCallback",this,3)([]),this._removeButton?.then(e=>{e?.removeEventListener("click",e=>{this._removeItem(e)})}),this._title?.then(e=>{e?.removeEventListener("click",()=>{this._eigToggle()}),e?.removeEventListener("keydown",({key:e})=>{"Enter"!==e&&"Space"!==e&&" "!==e||(event?.preventDefault(),this._eigToggle())})})}},{kind:"field",key:"_eigToggle",value(){return()=>{this._eigItem?.then(e=>{if(e){const t=e.classList;if(t.contains("is-removing"))return;t.toggle("is-collapsed"),e.querySelector(".CIG-large")?.toggleAttribute("hidden");const o=e.closest("[data-field]");if(o){const e=(0,c.A)(o,"data-field");e&&(m.getItem(e)?m.removeItem(e):m.setItem(e,"1"))}}})}}},{kind:"field",key:"_removeItem",value(){return e=>{const t=e.target;this._eigItem?.then(e=>{if(e){const o=e.querySelector(".screen-reader-only");e.classList.toggle("is-removing")?(e.querySelector(".CIG-large")?.setAttribute("hidden",""),e.querySelectorAll("input, textarea, select").forEach(e=>e.setAttribute("disabled","")),t instanceof HTMLElement&&(t.title=q.restore,t.setAttribute("aria-label",q.restore),o&&(o.textContent=q?.remove))):(e.classList.contains("is-collapsed")||e.querySelector(".CIG-large")?.removeAttribute("hidden"),e.querySelectorAll("input, textarea, select").forEach(e=>e.removeAttribute("disabled")),t instanceof HTMLElement&&(t.title=q.remove,t.setAttribute("aria-label",q.remove),o&&(o.textContent=q?.restore)))}})}}},{kind:"method",key:"firstUpdated",value:function(){this.emit("btu-eig-ready")}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"initializeEigItem",value:function(){this._eigItem?.then(e=>{if(e){const t=e.closest("[data-field]"),o=e.classList;let n=null;t&&(n=(0,c.A)(t,"data-field"),n&&m.getItem(n)&&(o.add("is-collapsed"),e.querySelector(".CIG-large")?.setAttribute("hidden","")))}else(0,s.A)(this,".EIG-item",e=>{const t=e.querySelector(".EIG-title"),o=e.querySelector(".removeButton");this.titleAddEventListeners(t),this.removeButtonAddEventListeners(o)})}),this._title?.then(e=>{this.titleAddEventListeners(e)}),this._removeButton?.then(e=>{this.removeButtonAddEventListeners(e)})}},{kind:"method",key:"titleAddEventListeners",value:function(e){e&&(e.addEventListener("click",()=>{this._eigToggle()}),e.addEventListener("keydown",e=>{const{key:t}=e;"Enter"!==t&&"Space"!==t&&" "!==t||(e.preventDefault(),this._eigToggle())}))}},{kind:"method",key:"removeButtonAddEventListeners",value:function(e){if(!e)return;const t=(0,a.A)("span",{class:"screen-reader-only","aria-live":"polite"});e.after(t),e.addEventListener("click",e=>{this._removeItem(e)})}},{kind:"method",key:"render",value:function(){return n.s6}}]}}(function(e){y.initializeInstanceElements(e,L.elements)},g),L=y.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(l(r.descriptor)||l(i.descriptor)){if(d(r)||d(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(d(r)){if(d(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}M(r,i)}else t.push(r)}return t}(v.d.map(b)),W),y.initializeClassElements(v.F,L.elements),y.runClassFinishers(v.F,L.finishers));var W,g,y,v,L},59240(e,t,o){"use strict";o.a(e,async(e,t)=>{try{o(67219),o(44764),o(50144),o(84978),o(39589),o(25809),o(92280);var n=o(25734),i=(o(40704),o(40482),o(94473),o(34409),o(47066),o(38156),o(95963),o(26093),o(43752),o(90655),o(30471),o(31605),o(70894),o(76363),o(60618),o(22124),o(38284),o(83956),o(76095),o(36458),o(17630),o(18755),o(7069),o(32817),o(9389),o(1359)),r=o(88903),a=o(1607),s=o(27170),c=o(57317),p=o(66556),b=o(95628),M=o(56155),d=o(33582),l=o(79911),z=o(60489),u=o(70660),O=o(29975),A=o(4308),f=o(17628),h=o(68656),m=o(49989),q=o(91334),_=o(5739),W=o(74051),g=o(7095),y=o(1439),v=e([f,q]);[f,q]=v.then?(await v)():v;const L="X-Brightspot-Requested-With",w="XMLHttpRequest",R=XMLHttpRequest.prototype.send,k=window.fetch;XMLHttpRequest.prototype.send=function(...e){this.setRequestHeader(L,w),R.apply(this,e)},window.fetch=(e,t)=>{const o=new Headers(t?.headers);o.set(L,w);const n={...t,headers:o};return k(e,n)},(0,d.A)("textarea[data-code-type]",e=>{const t=new z.A;t.type=e.dataset.codeType,t.placeholder=e.placeholder,t.placeholderEditable="editablePlaceholder"in e.dataset,t.value=e.value;const o=(0,s.A)(200,()=>{e.dispatchEvent(new Event("change",{bubbles:!0}))});t.addEventListener("change",()=>{e.value=t.value,o()}),e.dataset.hideWordCount="true",e.hidden=!0,e.parentNode?.insertBefore(t,e)}),(0,d.A)(["input:not([type])",'input[type="text"]:not(:is(.objectId, .ComboInput-filter))','input[type="password"]:not(:is(.objectId))'],e=>{e.classList.contains("secret")&&(e.type="password"),(0,l.L)(e,f.A,t=>{t instanceof f.A&&(document.activeElement===e&&(t.autofocusInput=!0),t.type=e.type??void 0,t.placeholder=e.placeholder,t.placeholderEditable="editablePlaceholder"in e.dataset)})}),(0,d.A)(".inputSmall-text > textarea:not(.richtext):not([data-code-type])",e=>{(0,l.L)(e,q.A,t=>{t instanceof q.A&&(t.placeholder=e.placeholder,t.placeholderEditable="editablePlaceholder"in e.dataset)})}),(0,M.A)(".p-workStreams .progressBar",a.A.onFindFunction(48,6)),(0,M.A)(".ContentEdit-workstreamProgress .progressBar",a.A.onFindFunction(24,4)),(0,M.A)(".ContentEdit div.Widget > .Widget-title",e=>{const t=e.parentElement;if(t instanceof HTMLElement&&t.classList.contains("Widget")){const e=new W.A;t.dataset.internalName&&(e.collapsible=!0),e.classList.add(...t.classList);for(const o in t.dataset)e.dataset[o]=t.dataset[o];e.internalname=t.dataset.internalName,e.widgetid=t.dataset.widgetId,e.initialClosed=t.hasAttribute("data-closed");const o=t.querySelector(".Widget-title");o&&(e.heading=o.innerText),e.addEventListener("btu-widget-ready",o=>{const n=t.querySelectorAll(":scope > *:not(.Widget-title)");null!=n&&e.append(...n)}),t.parentNode?.insertBefore(e,t),t.remove()}}),window.addEventListener("beforeunload",e=>{if(e.target instanceof Document&&e.target.querySelector('.SearchWidget[name="searchAdvancedFull"]:not(.AssignmentDeskDashboard)')){const t=e.target.querySelector('.SearchResult-action-link[href*="/searchAdvancedFull"]'),o=t?.getAttribute("href")?.split("?")[1];window.history.replaceState(null,"",window.location.pathname+"?"+o)}}),(0,M.A)([".SearchWidget.is-global .SavedSearches-links a",".SearchWidget.is-global .SavedSearches-links btu-copy-to-clipboard"],e=>{e.addEventListener("click",()=>{const e=document.querySelector(".Page-search .SearchInput input");e&&(e.value="")})}),(0,M.A)(".SearchWidget .SavedSearches-links .SavedSearches-more-dropdown",e=>{const t=e.parentNode?.querySelector(".SavedSearches-more");(0,p.D1)(e,t)}),(0,M.A)(["div.SearchWidget-moreFilters > h2.SearchWidget-moreFiltersHeading","div.SearchWidget-recent > h2.searchRecent-heading","div.SearchWidget-saved > h2.searchSaved-heading","div.SearchWidget-create > h2:first-child"],e=>{const t=e.parentElement;if(!(t instanceof HTMLElement))return;const o=new W.A;o.collapsible=!0,o.classList.add(...t.classList),o.setAttribute("internalname",t.classList[0]),o.internalname=t.classList[0],o.setAttribute("widgetid",t.classList[0]),o.heading=e.innerText;for(const t in e.dataset)o.dataset[t]=e.dataset[t];o.addEventListener("btu-widget-ready",e=>{const n=t.querySelectorAll(":scope > *:not(h2)");null!=n&&o.append(...n)}),t.parentNode?.insertBefore(o,t),t.remove()}),(0,M.A)("a.SavedSearches-more-dropdown-copy",e=>{const t=new O.A;t.classList.add(...e.classList),t.copydata=e.dataset.searchString,t.internallink=!0,t.textContent=e.textContent,t.setAttribute("role","menuitem"),t.title=e.title,e.parentNode?.insertBefore(t,e),e.remove(),t.addEventListener("click",()=>{const e=t.closest(".SavedSearches-links")?.querySelector("button.SavedSearches-more");"true"===e?.ariaExpanded&&(e.click(),e.focus());const o=(0,b.A)(document.body,".Page-search .SearchInput input");o instanceof HTMLInputElement&&(o.value=""),t.copy()}),t.addEventListener("keydown",({key:e})=>{"Enter"===e&&t.copy()}),t.addEventListener("btu-copy-to-clipboard-copied",()=>{const o=e.dataset.copiedLink??"";if(!o)return;(0,n.iP)(o);const i=t.firstChild?.nodeValue;t.firstChild&&(t.firstChild.nodeValue=o,setTimeout(()=>{t.firstChild&&(t.firstChild.nodeValue=i??"")},3e3))})}),(0,M.A)("a.ApiKey-copy",e=>{const t=new O.A;t.classList.add(...e.classList);const o=e.closest(".ApiKey-apiKey")?.querySelector(".ApiKey-value")?.textContent;o&&(t.copydata=o,t.title=e.title,e.parentNode?.insertBefore(t,e),e.remove(),t.addEventListener("btu-copy-to-clipboard-copied",()=>{const t=e.querySelector(".ApiKey-copyConfirmed")?.textContent??"";t&&(0,n.iP)(t)}))}),(0,M.A)(".LiveBlogPostList .LiveBlogPostList-filters > .LiveBlogPostList-filtersTitle",e=>{const t=e.parentElement,o=t?.closest(".LiveBlogPostListNav");if(o?.querySelector(".Widget-collapse")?.remove(),t instanceof HTMLElement){const o=new W.A;o.collapsible=!0;const n=(0,c.A)(t,"data-internal-name");n&&(o.collapsed=null!=localStorage.getItem(n)),o.classList.add(...t.classList);for(const e in t.dataset)o.dataset[e]=t.dataset[e];const i=t.dataset.widgetId,r=t.dataset.internalName;i&&r&&(o.setAttribute("widgetid",i),o.setAttribute("internalname",r)),o.heading=e.innerText,o.addEventListener("btu-widget-ready",e=>{const n=t.querySelectorAll(":scope > *:not(.LiveBlogPostList-filtersTitle)");null!=n&&o.append(...n)}),t.parentNode?.insertBefore(o,t),t.remove()}}),(0,M.A)(".toggleable",e=>{(0,l.L)(e,_.A,t=>{t instanceof _.A&&(t.rootSelector=e.dataset.root)})}),(0,M.A)(".TranslationFrame .LinkTable",e=>{(0,l.L)(e,m.A,t=>{if(t instanceof m.A){t.classList.add(...e.classList);for(const o in e.dataset)t.dataset[o]=e.dataset[o];t.addEventListener("btu-table-checked-all",t=>{y(e).trigger("submit")})}})}),(0,M.A)(".objectId-select, .RCIG-item .repeatableLabel, .EIG-item .repeatableLabel",e=>{e.parentElement?.classList.contains("RCIG-item")&&new i.A(e,{})}),(0,M.A)(".CIG > .CIG-title",e=>{const t=new u.A;t.clusterTitle=e.innerText,t.tab=e.dataset.tab??void 0,t.addEventListener("btu-cig-cluster-ready",e=>{const o=[];let n=t.nextElementSibling;for(;n instanceof HTMLElement&&n.matches(".CIG-row")&&n.dataset.tab===t.tab;)o.push(n),n=n.nextElementSibling;null!=o&&t.append(...o),requestAnimationFrame(()=>t.requestUpdate())}),e.parentNode?.insertBefore(t,e),e.remove()}),(0,M.A)(".TemplateField[data-cluster]",e=>{const t=e.dataset.cluster;if(!t)return;const o=e.closest(".StyleguidePreset-row");if(!o)return;let n=o.querySelector(`btu-cig-cluster > .TemplateField[data-cluster="${t}"]`)?.parentElement;if(!n){n=new u.A,n.clusterTitle=t,n.tab=e.dataset.tab??"",e.insertAdjacentElement("beforebegin",n);const i=o.closest(".CIG-row.StyleguideTemplate-row");if(i){const e=i.querySelector(".CIG-small > select");e&&e.addEventListener("change",()=>{n&&(Array.from(n.querySelectorAll("div.TemplateField")).some(e=>"none"!==e.style.display)?n.style.display="block":n.style.display="none")})}}e.querySelector(":scope > .CIG-title")?.remove(),n.append(e)}),(0,M.A)(".EIG",e=>{const t=new A.A;t.classList.add(...e.classList);for(const o in e.dataset)t.dataset[o]=e.dataset[o];t.addEventListener("btu-eig-ready",()=>{const o=e.querySelectorAll(":scope > *");null!=o&&t.append(...o),requestAnimationFrame(()=>t.requestUpdate())}),e.parentNode?.insertBefore(t,e),e.remove()}),(0,M.A)(["a[data-objectId]","a[data-add-embedded-content-data]"],e=>{e.onclick=async e=>{let t,o,n;const i=e.target;if(i instanceof HTMLElement&&(n=i.closest("a[data-objectId]")),n){o=y(n).popup("source");let e=o.attr("data-add-embedded-content-data");if(!e)return;e=JSON.parse(e).typeId;const i=o.attr("data-field");if(!i)return;const r=n.dataset.objectid;if(!r)return;const a={typeId:e??""};a[i]=r,t=JSON.stringify(a)}else{if(i instanceof HTMLElement&&(n=i.closest("[data-add-embedded-content-data]")),!n)return;if(o=y(n).popup("source"),t=n.dataset.addEmbeddedContentData??void 0,!t)return}if(!o)return;const a=o.attr("href");if(!a||!a.includes("add-embedded-content"))return;e.preventDefault();const s=new Headers,c=r.A.get("bsp.csrf");c&&s.append("Brightspot-CSRF",c);const p=new FormData;p.append("data",t);try{const e=await fetch(a,{method:"POST",headers:s,body:p}),t=await e.text();let i;if(o.hasClass("EIG-add")||o.hasClass("EIG-swap")||o.hasClass("EIG-search")){const e=o.closest(".EIG");e.find(".EIG-item").remove(),e.append(t),e.find(".toggleable").trigger("toggle"),e.trigger("create"),e.trigger("change"),o.closest(".EIG-controls").detach(),i=e[0].querySelector(".EIG-title")}else o.hasClass("RCIG-swap")&&o.closest(".RCIG-item").addClass("RCIG-replace"),o.closest(".RCIG").data("repeatable").addItem(t),o.closest(".RCIG-replace").remove();y(n).popup("close"),i?.focus()}catch(e){console.error(e)}}}),(0,M.A)(".SearchInput:not(btu-search-input)",e=>{const t=new h.A;t.classList.add(...e.classList);const o=e.querySelector("label");o&&(t.label=o.innerText);const n=e.querySelector("input");if(n){n.name&&(t.name=n.name),n.ariaLabel&&(t.arialabel=n.ariaLabel);const e=n.getAttribute("value");e&&(t.value=e)}e.parentNode?.insertBefore(t,e),e.remove()}),(0,M.A)('.Page-search btu-search-input input[type="text"]',e=>{["click","input"].forEach(t=>{e.addEventListener(t,(0,s.A)(500,t=>{if(!(t instanceof Event))return;const o=e.closest("form");if(!o)return;const n=e.value,i=document.querySelector('.frame[name="'+o.target+'"]');!i||"focus"===t.type&&n&&i.querySelector(".searchResultList .message-warning")?o.requestSubmit():(y(i).popup("open"),i.querySelectorAll('.searchFilters input[name="q"]').forEach(e=>{n!==e.value&&(e.value=n,e.dispatchEvent(new CustomEvent("input",{bubbles:!0})))}))}))}),e.addEventListener("keydown",t=>{if("Enter"===t.code)t.target?.dispatchEvent(new Event("input",{bubbles:!0})),t.preventDefault();else if("Tab"===t.code){const o=document.querySelector('.frame[name="'+e.closest("form")?.target+'"]');o&&o instanceof HTMLElement&&"none"!==o.style.display&&(o.closest(".Popup-content")?.querySelector(".Popup-close")?.focus(),t.preventDefault())}})}),(0,M.A)(".Page-loginDialog",e=>{document.body.appendChild(e)}),(0,M.A)(".Suggestions-list",e=>{const t=e.querySelector(".Suggestions-list-icon"),o=new W.A;if(o.collapsible=!0,t){const n=(0,c.A)(t,"data-label");n&&(o.collapsed=null!=localStorage.getItem(n),o.setAttribute("data-internal-name",n)),o.classList.add(...e.classList);for(const t in e.dataset)o.dataset[t]=e.dataset[t];o.heading=t.innerText,o.addEventListener("btu-widget-ready",t=>{const n=e.querySelectorAll(":scope > *:not(.Suggestions-list-icon)");null!=n&&o.append(...n)}),e.parentNode?.insertBefore(o,e),e.remove()}}),(0,d.A)(".Deferred",e=>{const t=e.parentElement,o=e.querySelector(":scope > template");if(o instanceof HTMLTemplateElement&&t){const n=o.content.cloneNode(!0);t.insertBefore(n,e),e.remove(),t.querySelectorAll(".CIG-row.StyleguidePreset-row .CIG-small > select").forEach(e=>{e.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}),t.querySelectorAll(".CIG-row.StyleguidePreset-row .CIG-small > input.objectId").forEach(e=>{const t=e.closest(".CIG-row");t?.dispatchEvent(new CustomEvent("create",{bubbles:!0}))}),y(t).trigger("create")}}),(0,M.A)(['.Popup[name="edit-guide"] .frame','.Popup[name="PostPublishActionsPage"] .frame','.Popup[name^="create-new-object-"] .frame','.Popup[name^="objectId-create-"] .frame','.Popup[name="AddEmbeddedContent"] .frame','.Popup[name^="conversation-"] .frame','.Popup[name^="_copy"] > .Popup-content > .frame'],e=>{new MutationObserver(e=>{e.forEach(e=>{const t=e.target;t.classList.contains("Widget")||t.classList.add("Widget")})}).observe(e,{attributeFilter:["class"]})}),(0,M.A)(".ContentEdit-left",e=>{if(e.closest(".Popup"))return;const t=e.closest(".ContentEdit");if(!t)return;const o=t.querySelector(".ContentEdit-top");e.addEventListener("scroll",(0,g.A)(600,()=>{e.scrollTop>0?e.scrollHeight-e.clientHeight>(o?.offsetHeight??0)&&t.classList.add("is-scrolled"):0===e.scrollTop&&t.classList.remove("is-scrolled")})),o?.addEventListener("click",t=>{const o=t.target.nodeName.toLowerCase();"span"!==o&&"div"!==o||e.scrollTo({top:0,behavior:"smooth"})})}),t()}catch(e){t(e)}})},80133(e,t,o){"use strict";o.d(t,{m:()=>n});const n=e=>class extends e{connectedCallback(){super.connectedCallback(),Promise.resolve().then(()=>this.emit("btu-brightspot-element-connected",{}),e=>this.emit("btu-brightspot-element-error",{error:e}))}disconnectedCallback(){super.disconnectedCallback(),this.emit("btu-brightspot-element-disconnected")}emit(e,t){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:t}))}}},60618(e,t,o){"use strict";var n=o(56155),i=o(88903);(0,n.A)(".UpdateCalendarAutoSync",e=>{e.onclick=async t=>{const o=e.getAttribute("href");if(!o)return;t.preventDefault();const n=new Headers,r=i.A.get("bsp.csrf");r&&n.append("Brightspot-CSRF",r);const a=new FormData;try{const t=await fetch(o,{method:"POST",headers:n,body:a}),i=await t.text(),r=(new DOMParser).parseFromString(i,"text/html").body.querySelector("div");r&&(e.textContent=r.textContent)}catch(e){console.error(e)}}})},22124(e,t,o){"use strict";o(84978),o(25809);var n=o(38745),i=o(56155),r=o(1439);(0,i.A)(".ExternalItemObjects",e=>{const t=r(e).popup("source");if(t){const o=t[0]?.closest(".searchForm")?.querySelectorAll(":scope > .searchControls > .searchFilters > form");if(o?.length){const t=o[0];e.querySelectorAll(':scope > input[name="newObjectId"]').forEach(function(e){const o=(0,n.A)("input",{type:"hidden",name:"ni",value:e.value});t.appendChild(o)}),t.requestSubmit()}}r(e).popup("close")})},38284(e,t,o){"use strict";var n=o(26791),i=o(56155);(0,i.A)(".LiveBlogPostListNav",e=>{const t=e.getAttribute("data-blog-id");n.A.receive("brightspot.liveblog.LiveBlogPostRtcBroadcast",o=>{if(o.blogId===t){const t=e.querySelector(".LiveBlogPostListNav-refresh");t&&t.click()}})}),(0,i.A)([".LiveBlogGrid a.action-copy",".LiveBlogGrid a.action-create"],e=>{e.target="postedit";const t=e.closest(".Grid");if(!t)return;const o=t.querySelector(".LiveBlogPostListNav");if(!o)return;const n=o.getAttribute("data-blog-id");let i=e.href;n&&i&&(i+="&disableManagedRedirect=true",i+="&blogId="+n,e.href=i)})},83956(e,t,o){"use strict";o(84978),o(25809);var n=o(56155),i=o(38745),r=o(66556);(0,n.A)(".Notification-controls-toggle",e=>{const t=e.closest(".Notification-controls-menu"),o=t?.querySelector(".Notification-controls-list");o&&t&&(t.setAttribute("data-tether-anchor",""),e.addEventListener("click",n=>{(0,r.H0)(o,e),(0,r.AM)(o,e,t)}),(0,r.D1)(o,e))}),(0,n.A)('.frame.loaded[name^="notification-action-popup-"]',e=>{const t=e.getAttribute("name"),o=document.querySelector(["a","form"].map(e=>`${e}[target="${t}"].Notification-action`).join(", ")),n=o?.closest(".Notification-actionBar"),i=n?.querySelector(".Notification-actionRefresh > a");i?.click()}),(0,n.A)(".Notification-actionResultUrl[data-redirect-delay]",e=>{const t=e.querySelector(".Notification-actionResultUrl-countdown"),o=e.querySelector(".Notification-actionResultUrl-link");if(null==t||null==o)return;const n=e?.getAttribute("data-redirect-delay");if(null==n)return;let i=parseInt(n);if(isNaN(i))return;const r=setInterval(()=>{i-=100,t.textContent=Math.ceil(i/1e3).toString(),i<=0&&(clearInterval(r),o.click())},100);o.addEventListener("click",()=>{clearInterval(r),t.textContent="0"})}),(0,n.A)(".Notification-actionBar",e=>{const t=e.getAttribute("actionLimit"),o=(0,i.A)("ul",{className:"Actions-controlsList Dropdown",role:"menu"}),n=e.querySelectorAll(".Notification-action");let a=0,s=0;if(n.forEach(e=>{if(!t||a<parseInt(t))return void a++;const n=(0,i.A)("li");n.appendChild(e),o.appendChild(n),a++,s++}),0===s)return;const c=(0,i.A)("div",{className:"Actions-controls"}),p=(0,i.A)("button",{className:"Additional-actionsToggle",type:"button",id:"Additional-actionsToggle","aria-haspopup":"menu","aria-expanded":"false",onclick:()=>{(0,r.H0)(o,p),(0,r.AM)(o,p,c)}});(0,r.D1)(o,p),c.appendChild(p),c.appendChild(o),c.setAttribute("data-tether-anchor",""),e.appendChild(c)})},7176(e,t,o){"use strict";o.d(t,{r:()=>l}),o(44764),o(84978),o(25809),o(91672);var n=o(17319);function i(e,t,o,n){var i=r();if(n)for(var b=0;b<n.length;b++)i=n[b](i);var M=t(function(e){i.initializeInstanceElements(e,d.elements)},o),d=i.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(p(r.descriptor)||p(i.descriptor)){if(c(r)||c(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(c(r)){if(c(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}s(r,i)}else t.push(r)}return t}(M.d.map(a)),e);return i.initializeClassElements(M.F,d.elements),i.runClassFinishers(M.F,d.finishers)}function r(){r=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!c(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?d(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=M(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:b(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=b(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function a(e){var t,o=M(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function s(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function c(e){return e.decorators&&e.decorators.length}function p(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function b(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function M(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}const l=e=>i(null,function(e,t){return{F:class extends t{constructor(...t){super(),e(this),this.placeholderEditable=!1}},d:[{kind:"field",key:"_input",value:void 0},{kind:"field",key:"_originalPlaceholder",value:void 0},{kind:"field",decorators:[(0,n.MZ)()],key:"placeholder",value:void 0},{kind:"field",decorators:[(0,n.MZ)({type:Boolean,attribute:"placeholder-editable"})],key:"placeholderEditable",value:()=>!1},{kind:"get",key:"input",value:function(){return this._input}},{kind:"set",key:"input",value:function(e){e&&(this.placeholder&&(e.placeholder=this.placeholder),this.placeholderEditable&&e.setAttribute("data-editable-placeholder",""),this._input?.isEqualNode(e)||(this._input=e,this.onInputElementChanged()))}},{kind:"get",key:"value",value:function(){return this._input?.value}},{kind:"set",key:"value",value:function(e){void 0!==e&&this._input&&(this._input.value=e)}},{kind:"method",key:"onInputElementChanged",value:function(){this.placeholderEditable&&(this._input?.addEventListener("blur",this.handleBlur.bind(this)),this._input?.addEventListener("focus",this.handleFocus.bind(this)),this._input?.addEventListener("mouseenter",this.handleFocus.bind(this)),this._input?.addEventListener("mouseleave",this.handleBlur.bind(this)))}},{kind:"method",key:"handleFocus",value:function(){this.value||(this.value=this._originalPlaceholder=this._input?.placeholder||"")}},{kind:"method",key:"handleBlur",value:function(){document.activeElement!==this._input&&this.value===this._originalPlaceholder&&(this.value="")}}]}},e)},76095(e,t,o){"use strict";(0,o(56155).A)(".Popup.loaded[name=PostPublishActionsPage] .PostPublish-form",e=>{const t=e.querySelector(".Message");t?.scrollIntoView({behavior:"smooth",block:"end"})})},36458(e,t,o){"use strict";o(84978),o(25809);var n=o(56155),i=o(1439);(0,n.A)(".PrePublish",e=>{const t=e.querySelector(".PrePublish-cancel"),o=e.dataset.prepublish,n=document.querySelector(`form[data-content-id="${o}"]`),r=e.querySelector('button[type="submit"]');r&&r.addEventListener("click",()=>{i(n).trigger("submit")}),t?.addEventListener("click",()=>{if(n){const e=n.querySelector('input[name="prePublish"]'),t=n.querySelector('button[name="prePublishDisplay"]');e?.remove(),t&&t.addEventListener("click",()=>{e&&n.appendChild(e)},{once:!0})}e.classList.remove("is-visible"),window.BRIGHTSPOT?.ui.cms.enableV5UI&&e.dispatchEvent(new CustomEvent("legacy.popup.close",{bubbles:!0}))});const a=e.querySelectorAll(".CIG:not(.TC) > [data-tab].TC-unselected");Array.from(a).forEach(e=>{e.classList.remove("TC-unselected")})})},1607(e,t,o){"use strict";o.d(t,{A:()=>r});var n=o(38745),i=o(68243);class r{static onFindFunction(e,t){return o=>{const n=new r(e,t,parseInt(o.style.getPropertyValue("--progress")));(0,i.A)(n.getElement(),o),o.hidden=!0}}constructor(e,t,o=0){this._circumference=void 0,this._element=void 0,this._value=0;const i=(0,n.A)("div"),r=e/2,a=r-t/2;if(this._circumference=2*Math.PI*a,i.innerHTML=`\n <svg class="RPB" viewBox="0 0 ${e} ${e}">\n <circle\n class="RPB-bg"\n cx="${r}"\n cy="${r}"\n r="${a}"\n stroke-width="${t-1}"\n />\n <circle\n class="RPB-fg"\n cx="${r}"\n cy="${r}"\n r="${a}"\n stroke-width="${t}"\n stroke-dasharray="${this._circumference}"\n stroke-dashoffset="${this._circumference}"\n />\n </svg>\n `,!(i.firstElementChild instanceof SVGElement))throw new Error("SVG not found");this._element=i.firstElementChild,this.setValue(o)}getElement(){return this._element}getValue(){return this._value}setValue(e){this._value=e,this._element.querySelector(":scope > .RPB-fg")?.setAttribute("stroke-dashoffset",""+this._circumference*(1-e/100))}}},17630(e,t,o){"use strict";var n=o(56155),i=o(25734),r=o(66556),a=o(1439);(0,n.A)("btu-widget.SearchWidget-moreFilters",e=>{const t=()=>{e.collapsed?e.heading=e.dataset.moreFiltersLabel:e.heading=e.dataset.lessFiltersLabel};t(),e.addEventListener("btu-widget-toggle",()=>{t()})}),(0,n.A)(".SearchWidget.DashboardWidget",e=>{const t=e.closest(".DashboardRow-column");t?.classList.add("is-search-widget")}),(0,n.A)(".SavedSearches-more",e=>{e.addEventListener("click",()=>{const t=e.nextSibling;(0,r.AM)(t,e)})}),(0,n.A)(".SavedSearches-more-dropdown-delete",e=>{e.addEventListener("click",t=>{e.dataset.deleted&&(0,i.iP)(e.dataset.deleted)})}),(0,n.A)(".SearchWidget-dateRangeSelect",e=>{const t=e=>{const t=e.value;if(!e.parentNode)return;const o=e.parentNode.querySelectorAll(".SearchWidget-dateRange");for(const e of o){const o=t!==e.dataset.class;e.hidden=o;for(const t of e.querySelectorAll("input"))t.disabled=o}};t(e),e.addEventListener("change",({target:e})=>{e instanceof HTMLSelectElement&&t(e)})}),(0,n.A)(".SearchWidget-toolEntityFilterSelect",e=>{const t=e=>{if(!e.parentNode)return;const t=e.value,o=e.parentNode.querySelector(".toolEntityDropdown-container");o&&(o.hidden="com.psddev.cms.ui.search.SelectToolEntityFilter"!==t)};t(e),e.addEventListener("change",({target:e})=>{e instanceof HTMLSelectElement&&t(e)})}),(0,n.A)(".SearchWidget-collections > .SearchWidget-filter:not(:last-child) > select",e=>{e.textContent||e.parentNode instanceof HTMLElement&&e.parentNode.remove()}),(0,n.A)(".SearchWidget-reset",e=>{e.addEventListener("click",()=>{if(!a(e).popup("source"))return;const t=a(e).popup("source")[0];if(t)if(t instanceof HTMLAnchorElement){const o=e.closest(".SearchWidget-controls");if(o){const e=o.querySelector("form.searchFiltersRest");e instanceof HTMLFormElement&&e.reset()}t.click()}else if(t instanceof HTMLFormElement){t.reset();const e=t.querySelector('[name="rf"]'),o=t.querySelector('[name="st"]');e&&(e.value="true"),t.requestSubmit(),e&&(e.value="false"),o&&(o.value="")}return!1})}),(0,n.A)(".searchFiltersType",e=>{e.addEventListener("change",()=>{const t=e.closest(".Page")?.querySelector('form.Page-search input[name="st"]'),o=e.querySelector('select[name="st"]');t&&o&&t instanceof HTMLInputElement&&o instanceof HTMLSelectElement&&(t.value=o.value)});const t=e.querySelector('input[name="q"]');if(!(t&&t instanceof HTMLInputElement))return;const o=e.closest('.Popup[name="miscSearch"]')?document.querySelector('.Page-search input[name="q"]'):e.nextElementSibling?.querySelector('input[name="q"]');o&&o instanceof HTMLInputElement&&!o.value&&document.activeElement!==o&&(o.value=t.value)})},18755(e,t,o){"use strict";o(84978),o(13722),o(25809),o(91672);var n=o(56155),i=o(88903),r=o(26791);function a(){const e=new Set,t=document.getElementsByClassName("ContentSelector-select");Array.from(t).filter(e=>null!==e.firstChild).forEach(t=>{const o=t.firstChild,n=o?.getAttribute("value"),i=t.parentNode;n&&!i.classList.contains("is-removing")&&e.add(n)}),function(e){const t="is-added";document.querySelectorAll(".Suggestion-add").forEach(o=>{if(null!==o){const n=o.dataset.suggestionId;n&&e.has(n)?o.classList.add(t):o.classList.remove(t)}})}(e)}(0,n.A)(".Suggestion-add",e=>{e.addEventListener("click",()=>{e.dataset.label&&(function(e,t){const o=e.closest("form[data-content-id]");if(!o)return;const i=e.dataset.fieldName;if(!i)return;const r=o.querySelector(`div[data-field-name="${i}"]`);if(!r)return;const a=r.querySelector(".addButton");let s;if(a){a.click();const e=r.querySelector(".repeatableObjectId"),t=e?.classList.contains("addToTop");s=t?r.querySelector(":first-child > input.objectId"):r.querySelector(":last-child > input.objectId")}else s=r.querySelector("input.objectId");if(!s)return;s.setAttribute("data-label",t),s.setAttribute("data-label-html",t);const c=e.dataset.suggestionId;if(c&&(s.value=c),a){const t=s.closest("li");if(t){const o=e.dataset.typeId;o&&t.setAttribute("data-sortable-item-type",o),(0,n.A)(t,":scope .ComboInput[aria-expanded=true]",e=>{e.click()})}}else r.querySelectorAll(".is-removing").forEach(e=>{e.classList.remove("is-removing")});const p=document.createEvent("HTMLEvents");p.initEvent("change",!0,!1),s.dispatchEvent(p),r.scrollIntoView()}(e,e.dataset.label),a())})}),(0,n.A)("button[data-suggestions-url]",e=>{const t=e.dataset.suggestionsUrl;t&&(e.addEventListener("click",async()=>{if(!e.classList.contains("is-refreshing"))try{const o=e.closest(".frame");if(!o)return;e.classList.add("is-refreshing");const n=o.closest("form");if(!n)return;const r=new FormData(n),a=new Headers,s=i.A.get("bsp.csrf");s&&a.append("Brightspot-CSRF",s);const c=await fetch(t,{method:"POST",headers:a,body:r}),p=await c.text();e.classList.remove("is-refreshing"),o.innerHTML=p}catch(e){console.error(e)}}),a())}),(0,n.A)(".Suggestions-list-add",e=>{const t=Array.from(e.querySelectorAll(".Suggestion-add[data-suggestion-id]")).map(e=>e.dataset.suggestionId).filter(e=>void 0!==e);0===e.childNodes.length&&e.parentNode instanceof HTMLElement&&(e.parentNode.style.display="none"),r.A.receive("com.psddev.cms.tool.page.content.PublishBroadcast",e=>{const o=e,n=o.mainObjectId||o.contentId;-1===t.indexOf(n)&&setTimeout(()=>{const e=document.querySelector("button[data-suggestions-url]");e&&e.click()},2e3)})})},5739(e,t,o){"use strict";o.d(t,{A:()=>f}),o(44764),o(84978),o(25809),o(91672);var n=o(88903),i=o(29171),r=o(17319),a=o(80133),s=o(79911);function c(){c=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!M(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?z(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=O(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:l(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=l(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function p(e){var t,o=O(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function b(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function M(e){return e.decorators&&e.decorators.length}function d(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function l(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function u(e,t,o,n){return u="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(e,t,o,n){var i,r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(r){if((i=Object.getOwnPropertyDescriptor(r,t)).set)return i.set.call(n,o),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(n,t)){if(!i.writable)return!1;i.value=o,Object.defineProperty(n,t,i)}else!function(e,t,o){(t=O(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o}(n,t,o);return!0},u(e,t,o,n)}function O(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}let f=(h=[(0,r.EM)("btu-toggleable")],m=(0,a.m)((0,s.s)(i.WF)),q=c(),_=function(e,t){class o extends t{constructor(){super(),e(this),this._forms=[],this._root=window.document.body}}return{F:o,d:[{kind:"get",static:!0,key:"tagName",value:function(){return"btu-toggleable"}},{kind:"field",key:"_forms",value:void 0},{kind:"field",key:"_root",value:void 0},{kind:"field",key:"_select",value:void 0},{kind:"field",decorators:[(0,r.MZ)({attribute:"root-selector"})],key:"rootSelector",value:void 0},{kind:"method",key:"find",value:function(){return this.querySelector(":scope > select")}},{kind:"set",key:"child",value:function(e){(function(e,t,o,n,i,r){!function(e,t,o,n,i){if(!u(e,t,o,n||e)&&i)throw new TypeError("failed to set property")}(A(r?e.prototype:e),t,o,n,i)})(o,"_child",e,this,1,1),this._select=e,this.addEventListener("change",this._handleChange),this._handleChange()}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"disconnectedCallback",value:function(){this.removeEventListener("change",this._handleChange)}},{kind:"method",key:"willUpdate",value:function(e){if(e.has("rootSelector"))if(this.rootSelector&&"string"==typeof this.rootSelector){const e=this._select?.closest(this.rootSelector);e instanceof HTMLElement?this._root=e:console.error("Querying for the rootSelector did not return a valid HTML element.")}else null!=this.rootSelector&&console.error("An invalid rootSelector was provided. Expected non-empty string.")}},{kind:"method",key:"_handleChange",value:function(){if(this._select?.matches("[disabled]"))return;const e=this._select?.options[this._select.selectedIndex],t=this._select?.dataset.selectedId,o=this._select?.dataset.selectedType;let n="",i="";if(t){const e=document.querySelector('.objectInputs[data-id="'+t+'"]');e&&(e.querySelectorAll("[name]").forEach((e,t)=>{if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement){const{name:o,value:n}=e;i+=(0===t?"":"&")+encodeURIComponent(o)+"="+encodeURIComponent(n)}}),o&&(n="&convert=true&convertType="+encodeURIComponent(o)+"&convertId="+encodeURIComponent(t)))}this._toggle(e?.dataset.hide,!0,null,null),this._toggle(e?.dataset.show,!1,n,i),e&&this._setSelected(e)}},{kind:"method",key:"_toggle",value:function(e,t,o,i){let r;const a=[];if(e){if(e=(e=":scope "+e.replaceAll(", ",", :scope ")).replaceAll(":scope :scope ",":scope "),r=this._root.querySelectorAll(e),!t){const e=[];r.forEach(t=>{const o=t.querySelectorAll(":scope > .toggleable-form[data-form-fields-url]");o?.forEach(t=>e.push(t))}),e?.forEach(e=>{if(e.dataset.formFieldsInFlight)return;const t={element:e,fieldData:e.dataset.formFieldsData||"",fieldUrl:e.dataset.formFieldsUrl||""},r=t.fieldUrl;let a="data="+encodeURIComponent(t.fieldData);o&&(a+=o),i&&(a+="&"+i),e.dataset.formFieldsInFlight="true",(async()=>{try{const e=await fetch(r,{method:"POST",credentials:"include",headers:{"Brightspot-CSRF":n.A.get("bsp.csrf")||"","Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},cache:"no-cache",body:a});t.element.innerHTML=await e.text(),e.ok?(delete t.element.dataset.formFieldsUrl,delete t.element.dataset.formFieldsData,t.element.dispatchEvent(new CustomEvent("create",{bubbles:!0})),t.element.dispatchEvent(new Event("load")),t.element.dispatchEvent(new UIEvent("resize"))):t.element.dispatchEvent(new CustomEvent("error",{bubbles:!0,detail:{message:e.text(),code:e.status}}))}finally{delete t.element.dataset.formFieldsInFlight}})(),this._forms.push(t)})}r.forEach(e=>{e.querySelectorAll("input, textarea, select, button").forEach(e=>{a.push(e)}),e.matches("input, textarea, select, button")&&a.push(e),e.setAttribute("style",t?"display: none;":""),e.querySelector(".toggleable")?.dispatchEvent(new CustomEvent("create",{bubbles:!0})),e.dispatchEvent(new UIEvent("resize"))}),a.forEach(e=>{e.toggleAttribute("disabled",t)})}}},{kind:"method",key:"_setSelected",value:function(e){this._select&&(this._select.dataset.selectedId=e.value,this._select.dataset.selectedType=e.dataset.type||"")}}]}}(function(e){q.initializeInstanceElements(e,W.elements)},m),W=q.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(d(r.descriptor)||d(i.descriptor)){if(M(r)||M(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(M(r)){if(M(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}b(r,i)}else t.push(r)}return t}(_.d.map(p)),h),q.initializeClassElements(_.F,W.elements),q.runClassFinishers(_.F,W.finishers));var h,m,q,_,W},7069(e,t,o){"use strict";var n=o(56155),i=o(66556);(0,n.A)(".TranslationsTab-actionsToggle",e=>{const t=e.closest(".TranslationsTab-actionsWrapper");if(t){const o=t.querySelector(".TranslationsTab-actions");o&&((0,i.D1)(o,e),e.addEventListener("click",t=>{(0,i.AM)(o,e)}))}})},79911(e,t,o){"use strict";function n(e,t){return e.get(i(e,t))}function i(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o.d(t,{L:()=>r,s:()=>a}),o(84978),o(39589);const r=(e,t,o)=>{if(e.parentElement instanceof t)return;const n=new t;o&&o(n),e.parentNode?.insertBefore(n,e),n.appendChild(e)},a=e=>{var t=new WeakMap;return class extends e{constructor(...e){var o,n,i;super(...e),this._child=void 0,i=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(o=this,n=t),n.set(o,i)}get child(){return this._child}set child(e){this._child=e}find(){return null}connectedCallback(){super.connectedCallback();const e=this.find();var o,r;e&&(this.child=e),o=t,r=new MutationObserver(async e=>{const t=this.find();t&&(this.child=t)}),o.set(i(o,this),r),n(t,this).observe(this.renderRoot,{childList:!0,subtree:!1})}disconnectedCallback(){super.disconnectedCallback(),n(t,this)?.disconnect()}}}},70894(e,t,o){"use strict";o(44764),o(84978),o(25809),o(91672);var n,i=o(29171),r=o(17319),a=o(76904),s=o(80133),c=o(56155),p=o(22274),b=o(36500),M=(o(67219),o(13722),o(39589),o(15483)),d=o(45891),l=function(e){return e.ModalClose="modal-close",e.PageHeader="page-header",e.PageNav="page-nav",e.PageGuide="page-guide",e.PageAskAi="page-ask-ai",e.LeftNav="left-nav",e.ContentEditTop="content-edit-top",e.PageMain="page-main",e.ContentEditDrawer="content-edit-drawer",e.ContentEditPreview="content-edit-preview",e.ContentEditRight="content-edit-right",e.ContentEditToolbar="content-edit-toolbar",e}(l||{});class z{static resolveRegionOrder(){const e=window.BRIGHTSPOT?.focusRegions;if(!e||"object"!=typeof e||0===Object.keys(e).length)return z.DEFAULT_REGION_ORDER;const t=Object.entries(e),o=t.filter(([,e])=>"number"!=typeof e||!isFinite(e));return o.length>0?(console.warn("FocusRegionManager: focusRegions config contains non-numeric values; falling back to default order.",Object.fromEntries(o)),z.DEFAULT_REGION_ORDER):t.sort((e,t)=>e[1]-t[1]).map(([e])=>e)}constructor(){this.registeredRegions=new Map,this.lastFocusedElements=new Map,this.keyboardHandler=null,this.initKeyboardListeners()}static getInstance(){return this.instance||(this.instance=new z),this.instance}register(e){if(!e.id||!e.element)return void console.warn("FocusRegionManager: Invalid config provided to register()",e);const t=e.element.closest(".ProseMirror-fullscreen-container")??e.element.closest("dialog[open]")??document.body,o=this.registeredRegions.get(t)||new Map;o.set(e.id,e),this.registeredRegions.set(t,o)}registerFromAttribute(e){const t=e.getAttribute("data-focus-region");if(!t)return;const o=e.closest(".ProseMirror-fullscreen-container")??e.closest("dialog[open]")??document.body,n=this.registeredRegions.get(o);n?.has(t)||(z.REGION_ORDER.includes(t)?this.register({id:t,element:e}):console.warn(`FocusRegionManager: region "${t}" is not in REGION_ORDER and will be excluded from navigation.`))}destroyLayer(e){this.registeredRegions.delete(e),this.lastFocusedElements.delete(e)}isRegionVisible(e){const t=e.element;return!(!t.isConnected||t.hasAttribute("inert")||t.hidden||!t.checkVisibility({visibilityProperty:!0,opacityProperty:!0})||e.isHidden&&e.isHidden()||!this.hasFocusableDescendants(t))}getVisibleRegions(e){return e&&e.isConnected&&this.registeredRegions.has(e)?z.REGION_ORDER.filter(t=>this.registeredRegions.get(e)?.has(t)).map(t=>this.registeredRegions.get(e).get(t)).filter(e=>this.isRegionVisible(e)):(console.warn("FocusRegionManager: Specified layer is not valid for getting visible regions",e),[])}getCurrentIndex(e){const t=document.activeElement;return e.findIndex(e=>e.element.contains(t))}saveCurrentFocus(e,t){const o=document.activeElement;if(o===document.body)return;const n=t.find(e=>e.element.contains(o));if(!n)return;let i=this.lastFocusedElements.get(e);i||(i=new Map,this.lastFocusedElements.set(e,i)),i.set(n.id,o)}nextRegion(e){const t=this.getVisibleRegions(e);if(0===t.length)return;this.saveCurrentFocus(e,t);const o=(this.getCurrentIndex(t)+1)%t.length;this.focusRegion(t[o],e)}previousRegion(e){const t=this.getVisibleRegions(e);if(0===t.length)return;this.saveCurrentFocus(e,t);const o=this.getCurrentIndex(t),n=o<1?t.length-1:o-1;this.focusRegion(t[n],e)}focusRegion(e,t){let o=null;const n=this.lastFocusedElements.get(t)?.get(e.id);if(n?.isConnected&&this.isElementFocusable(n)&&(o=n),!o){const t=e.preferredFocus?.();t&&t.isConnected&&this.isElementFocusable(t)&&(o=t)}if(!o)try{const t=(0,M.Kr)(e.element);for(const e of t)if(this.isElementFocusable(e)){o=e;break}}catch(e){console.warn("FocusRegionManager: Error finding tabbable elements",e)}o||(o=e.element);try{o?.focus(),o?.scrollIntoView({behavior:"smooth",block:"nearest"}),o?.classList.add("is-focusRegionTarget"),setTimeout(()=>{o?.classList.remove("is-focusRegionTarget"),o?.classList.add("was-focusRegionTarget"),o?.addEventListener("transitionend",()=>{o?.classList.remove("was-focusRegionTarget")},{once:!0})},500)}catch(e){console.warn("FocusRegionManager: Error focusing element",e,o)}}isElementFocusable(e){return!e.hasAttribute("inert")&&!e.hidden&&e.checkVisibility({visibilityProperty:!0,opacityProperty:!0})}hasFocusableDescendants(e){try{const t=(0,M.Kr)(e);for(const e of t)if(this.isElementFocusable(e))return!0}catch(t){console.warn("FocusRegionManager: Error finding tabbable elements",t,e)}return!1}getTopLayer(){const e=document.querySelector(".ProseMirror-fullscreen-container:not(.hide)");if(e)return e;const t=document.querySelectorAll("dialog[open]");return t.length>0?t[t.length-1]:document.body}getRegionLabel(e){if(e.label)return e.label;const t=e.element,o=t.getAttribute("aria-label");if(o)return o;const n=t.getAttribute("aria-labelledby");if(n){const e=document.getElementById(n);if(e?.textContent)return e.textContent.trim()}return null}isLayerRegistered(e){return this.registeredRegions.has(e)}isRegionShortcut(e){return!(!e.altKey||"Tab"!==e.key)||!d.cX&&"F6"===e.key}initKeyboardListeners(){this.keyboardHandler=e=>{if(this.isRegionShortcut(e)){const t=this.getTopLayer();if(!this.isLayerRegistered(t))return void console.warn("FocusRegionManager: No registered regions for the current layer",t);e.preventDefault(),e.stopPropagation(),e.shiftKey?this.previousRegion(t):this.nextRegion(t)}},document.addEventListener("keydown",this.keyboardHandler,!0)}}n=z,z.DEFAULT_REGION_ORDER=[l.ModalClose,l.PageHeader,l.PageNav,l.PageGuide,l.PageAskAi,l.LeftNav,l.ContentEditTop,l.PageMain,l.ContentEditDrawer,l.ContentEditPreview,l.ContentEditRight,l.ContentEditToolbar],z.REGION_ORDER=n.resolveRegionOrder(),z.instance=null;const u=z.getInstance();function O(){O=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!h(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?W(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=_(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:q(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=q(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function A(e){var t,o=_(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function f(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function h(e){return e.decorators&&e.decorators.length}function m(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function q(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function _(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function g(e,t,o,n){var i=y(v(1&n?e.prototype:e),t,o);return 2&n&&"function"==typeof i?function(e){return i.apply(o,e)}:i}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},y.apply(null,arguments)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}var L,w,R,k,T;L=[(0,r.EM)("btu-dialog")],w=(0,a.j)((0,s.m)(i.WF)),R=O(),k=function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"get",static:!0,key:"tagName",value:function(){return"BTU-DIALOG"}},{kind:"field",decorators:[(0,r.nJ)(":scope > dialog")],key:"_dialog",value:void 0},{kind:"field",decorators:[(0,r.MZ)({type:Boolean})],key:"_unsavedChanges",value:()=>!1},{kind:"field",key:"_contextObserver",value:void 0},{kind:"field",key:"_popupElement",value:void 0},{kind:"field",decorators:[(0,r.MZ)({attribute:"auto-open",type:Boolean})],key:"autoOpen",value:()=>!0},{kind:"field",decorators:[(0,r.MZ)({attribute:"remove-on-close",type:Boolean})],key:"removeOnClose",value:()=>!0},{kind:"field",decorators:[(0,r.MZ)({type:String,reflect:!0,attribute:"enter-from"})],key:"enterFrom",value:()=>"center"},{kind:"field",decorators:[(0,r.MZ)({type:Boolean,reflect:!0})],key:"loaded",value:()=>!1},{kind:"set",key:"unsavedChanges",value:function(e){const t=this._unsavedChanges;this._unsavedChanges=e,t!==e&&this.dispatchEvent(new CustomEvent("btu-dialog-unsaved-changes-state-changed",{detail:e,bubbles:!0,composed:!0}))}},{kind:"method",key:"_setupChangeDetection",value:async function(e){const t=()=>{const t=!!e.classList.contains("state-changed")||!!e.querySelector(".state-changed"),o=e.classList.contains("is-processingFiles");this.unsavedChanges=t||o},o=new MutationObserver(()=>{requestAnimationFrame(t)});o.observe(e,{attributes:!0,attributeFilter:["class"],subtree:!0}),(0,p.A)(e,()=>{o.disconnect(),this.unsavedChanges=!1}),t(),this.addEventListener("btu-dialog-closed",()=>{o.disconnect()},{once:!0})}},{kind:"method",key:"_cachePopupElement",value:function(){this._popupElement||(this._popupElement=this.querySelector(":scope > dialog > .Popup")||void 0)}},{kind:"method",key:"_detectEnterFrom",value:function(){this._popupElement&&(this._popupElement.classList.contains("is-fromRight")?this.enterFrom="right":this._popupElement.classList.contains("is-fromLeft")?this.enterFrom="left":this.enterFrom="center")}},{kind:"method",key:"_detectLoadedState",value:function(){if(!this._popupElement)return;const e=this._popupElement.classList.contains("loaded")&&this._popupElement.classList.contains("is-ready")&&this._popupElement.classList.contains("is-visible");this.loaded=e}},{kind:"method",key:"_isRelevantElement",value:function(e){const t=".ActionBar, .Message, .Admin, form, .TC, .AIChat-wrapper, .fixedScrollable";return e.matches(t)||null!==e.querySelector(t)}},{kind:"method",key:"_findInScope",value:function(e,t){const o=[];return e instanceof Element&&e.matches(t)&&o.push(e),o.push(...Array.from(e.querySelectorAll(t))),o}},{kind:"method",key:"_setupContextObserver",value:function(e){let t;const o=new Set;this._contextObserver=new MutationObserver(e=>{let n=!1,i=!1;for(const t of e){if("childList"===t.type)for(const e of t.addedNodes)e instanceof Element&&((e.matches(".Popup")||null!==e.querySelector(".Popup"))&&(this._popupElement=void 0,this._cachePopupElement(),n=!0,i=!0),this._isRelevantElement(e)&&o.add(e));if("attributes"===t.type&&"class"===t.attributeName){const e=t.target;e instanceof Element&&e.matches(".Popup")&&(i=!0)}}n&&this._detectEnterFrom(),i&&this._detectLoadedState(),0!==o.size&&(t||(t=window.requestAnimationFrame(()=>{o.forEach(e=>this._annotateDialogContext(e)),o.clear(),t=0})))}),this._contextObserver.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}},{kind:"method",key:"_markAncestors",value:function(e,t,o){let n=e.parentElement;for(;n&&n!==o&&!n.classList.contains(t);)n.classList.add(t),n=n.parentElement}},{kind:"method",key:"_annotateDialogContext",value:function(e){const t=this.querySelector(":scope > dialog");if(!t)return;const o=t.querySelector(".Popup-content");if(!o)return;if(!e&&o.classList.contains("has-ActionBar"))return;const n=e||t,i=o.classList.contains("is-editing");t.querySelector(".Admin .Admin-nav")&&o.classList.add("has-AdminNav");const r=o.classList.contains("has-AdminNav");if(i||r)return;const a=this._findInScope(n,".ActionBar");0!==a.length&&(o.classList.add("has-ActionBar"),a.forEach(e=>{e.querySelector(":scope > *:not(.ImageEditor-closeButton)")&&this._markAncestors(e,"has-ActionBarContent",o)}),this._findInScope(n,'.Message.is-success, .Widget-title + .Message.is-error, .Widget-title + .Message.message-info, .PostPublish-form .Message.is-error, form[action*="translation/request"] > .Message').forEach(e=>{this._markAncestors(e,"has-StatusMessage",t)}),this._findInScope(n,"form, .TC, .AIChat-wrapper, .fixedScrollable").forEach(e=>{const t=e.nextElementSibling?.classList.contains("ActionBar"),o=e.classList.contains("fixedScrollable")&&e.closest(".Widget.PrePublish");t&&!o&&e.classList.add("before-ActionBar")}))}},{kind:"method",key:"_handleClose",value:async function(e){if(e?.defaultPrevented)return;const t=await this._dialog;t&&(!this._unsavedChanges||confirm(window.BRIGHTSPOT?.ui.tooltips.confirmPopupUnsaved)?(t.close(),this.emit("btu-dialog-closed"),u.destroyLayer(t),this._popupElement&&window.jQuery?.(this._popupElement).trigger("close.popup"),this.removeOnClose&&this.remove()):e?.preventDefault())}},{kind:"method",key:"connectedCallback",value:async function(){g(o,"connectedCallback",this,3)([]),this.id=`i${(0,b.A)()}`}},{kind:"method",key:"disconnectedCallback",value:async function(){g(o,"disconnectedCallback",this,3)([]),this._contextObserver?.disconnect(),this._contextObserver=void 0,this._popupElement=void 0,await(this._dialog?.then(e=>{e.removeEventListener("cancel",this._handleClose),e.close()}))}},{kind:"method",key:"firstUpdated",value:async function(){(0,c.A)(`#${this.id} form`,e=>{this._setupChangeDetection(e)}),await(this._dialog?.then(e=>{const t=this.querySelector(":scope > .Popup, :scope > .QueryField-frame, :scope > .ContentEdit-workflow, :scope > *:not(dialog)");t&&(e.addEventListener("cancel",e=>{e.defaultPrevented||this._handleClose(e)}),e.appendChild(t),this._cachePopupElement(),this._detectEnterFrom(),this._annotateDialogContext(),this._detectLoadedState(),this._setupContextObserver(e))})),this.autoOpen&&(this.querySelector(':scope > dialog > .Popup[name="miscSearch"')?await(this._dialog?.then(e=>e.show())):await(this._dialog?.then(e=>e.showModal()))),this.emit("btu-dialog-ready")}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"close",value:function(e){this._handleClose(e)}},{kind:"method",key:"show",value:function(){this._dialog?.then(e=>e.showModal())}},{kind:"method",key:"render",value:function(){return i.qy`<dialog></dialog>`}}]}}(function(e){R.initializeInstanceElements(e,T.elements)},w),T=R.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(m(r.descriptor)||m(i.descriptor)){if(h(r)||h(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(h(r)){if(h(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}f(r,i)}else t.push(r)}return t}(k.d.map(A)),L),R.initializeClassElements(k.F,T.elements),R.runClassFinishers(k.F,T.finishers)},99022(e,t,o){"use strict";o.d(t,{A:()=>h});var n=o(83394),i=(o(44764),o(26594));function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function a(e,t){return e.get(c(e,t))}function s(e,t,o){return e.set(c(e,t),o),o}function c(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var p=new WeakMap,b=new WeakMap,M=new WeakMap,d=new WeakMap;function l(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function z(e,t,o){return e.set(O(e,t),o),o}function u(e,t){return e.get(O(e,t))}function O(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var A=new WeakMap,f=new WeakMap;class h{static get toggles(){return O(h,this,q)._}static toggle(e,t,o){let i,r="boolean"==typeof o&&o;function a(e){return"function"==typeof e}if(a(o)&&(i=o,r=i()),r){const r=new h(e,t);let s;a(o)&&window.addEventListener("click",s=(0,n.A)(o=>{if(!(o instanceof Event))return;const n=o.target;if(n instanceof HTMLElement&&!e.contains(n)&&!t.contains(n)){const t=n.closest("[data-tether-rx]");t&&!t.contains(e)||(i(),void 0!==s&&window.removeEventListener("click",s,!0),r.destroy(),q._.delete(e))}}),!0),q._.set(e,{tether:r,closeListener:s})}else{const t=q._.get(e);t&&(void 0!==t.closeListener&&window.removeEventListener("click",t.closeListener,!0),t.tether.destroy(),q._.delete(e))}return r}static getReference(e){for(const t of m._.tethers)if(u(f,t)===e)return u(A,t);return null}get element(){return u(f,this)}get reference(){return u(A,this)}constructor(e,t){l(this,A,void 0),l(this,f,void 0),z(A,this,e),z(f,this,t),e.classList.contains("ComboInput")&&!t.parentElement?.hasAttribute("data-tether-anchor")&&(null!==e.closest("dialog")?e.closest("dialog")?.append(t):null===e.closest(".Popup")?document.querySelector(".Page")?.append(t):e.closest(".Popup")?.append(t)),m._.add(this)}destroy(){m._.remove(this)}}var m={_:new class{constructor(){r(this,p,void 0),r(this,b,void 0),r(this,M,void 0),r(this,d,void 0),s(p,this,new WeakMap),s(b,this,[]),s(d,this,null),s(M,this,(0,i.A)(this.updateImmediately.bind(this)))}get tethers(){return a(b,this)}add(e){a(b,this).push(e),this.start()}remove(e){const t=a(b,this),o=t.indexOf(e);o>-1&&t.splice(o,1),t.length<0&&this.stop()}start(){this.updateImmediately(),null===a(d,this)&&(window.addEventListener("resize",a(M,this),!0),window.addEventListener("scroll",a(M,this),!0),s(d,this,setInterval(a(M,this),50)))}stop(){null!==a(d,this)&&(window.removeEventListener("resize",a(M,this)),window.removeEventListener("scroll",a(M,this)),clearInterval(a(d,this)),s(d,this,null))}updateImmediately(){const e=a(b,this);if(0===e.length)return;const t=[],o=document.documentElement;let n=o.clientWidth/2,i=o.clientHeight/2;const r="rtl"===o.dir;for(const a of e){const e=a.element,s=a.reference.getBoundingClientRect(),c=s.width,p=s.height;if(0===c&&0===p)continue;let b,M=s.top,d=s.left,l=o.clientWidth;if(e.parentElement?.hasAttribute("popover")){M=a.reference.offsetTop,d=a.reference.offsetLeft;const t=e.parentElement;l=t.clientWidth,n=l/2,i=t.clientHeight/2}let z=d;if(r){const e=l-d-c;z=e,b=e<n?"l":"r"}else b=d<n?"l":"r";t.push({element:e,x:b,y:M+p/2<i?"t":"b",l:`${z}px`,w:`${c}px`,t:`${M}px`,h:`${p}px`})}for(const e of t){const t=e.element,o=a(p,this).get(t)||{},n=t.style;e.x!==o.x&&t.setAttribute("data-tether-rx",e.x),e.y!==o.y&&t.setAttribute("data-tether-ry",e.y),e.l!==o.l&&n.setProperty("--Tether-rl",e.l),e.w!==o.w&&n.setProperty("--Tether-rw",e.w),e.t!==o.t&&n.setProperty("--Tether-rt",e.t),e.h!==o.h&&n.setProperty("--Tether-rh",e.h),a(p,this).set(t,e)}}}},q={_:new WeakMap}},25734(e,t,o){"use strict";o.d(t,{iP:()=>s,tK:()=>p,wC:()=>a}),o(44764);var n=o(56155),i=o(27170),r=o(33582);function a(e,t){return e.replace(/_{3}/g,(o=0,e=>t[o++]));var o}function s(e,t){let o=document.getElementById("aria-live-container");o||(o=document.createElement("div"),o.setAttribute("id","aria-live-container"),document.body.appendChild(o));const n=document.createElement("div"),i="speak-"+Date.now();n.setAttribute("id",i),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.classList.add("screen-reader-only"),t&&t.length&&(e=a(`${e}`,t)),o.appendChild(n),setTimeout(()=>{const t=document.getElementById(i);t&&(t.innerHTML=e)},150),!0===window.BRIGHTSPOT?.ariaDebug&&console.log(`ARIA Announced: "${e}"`),setTimeout(()=>{document.getElementById(i)?.remove()},2e3)}document.addEventListener("DOMContentLoaded",()=>{document.body.addEventListener("btu-announce",e=>{e instanceof CustomEvent&&s(e.detail)})});const c=[];(0,n.A)("[data-aria-announce]",e=>{c.push(e),setTimeout(()=>{if(c.length>0){const e=c.map(e=>"true"===e.dataset.ariaAnnounce?e.textContent:e.dataset.ariaAnnounce).join(", ");c.length=0,s(e)}},2500)}),(0,r.A)([".addButton",".Workflow-addState",".Workflow-addTransition",".calendarButton",".ComboInput"],e=>{const t=e.closest(".CIG-row");if(!t)return;const o=t.querySelector(".Message.is-error");if(!o)return;const n=o.getAttribute("id");n&&(e.setAttribute("aria-describedby",n),e.setAttribute("aria-invalid","true"))}),(0,r.A)('a[role="button"]',e=>{e.addEventListener("keydown",t=>{"Space"===t.code&&(t.preventDefault(),e.click())})});const p=e=>{(0,i.A)(1e3,()=>s(e))}},38745(e,t,o){"use strict";function n(e,...t){const o=document.createElement(e),n=t[0];if(!("object"!=typeof n||Array.isArray(n)||n instanceof Node)){t.shift();for(const[e,t]of Object.entries(n))"dataset"===e?Object.keys(t).forEach(e=>o.dataset[e]=t[e]):void 0===t?o.removeAttribute(e):e in o?Object.assign(o,{[e]:t}):o.setAttribute(e,t)}return i(o,t),o}function i(e,t){if(t)if(Array.isArray(t)||t instanceof NodeList)for(const o of t)i(e,o);else t instanceof Node?e.appendChild(t):e.appendChild(document.createTextNode(t.toString()))}o.d(t,{A:()=>n}),Object.defineProperty(n,"name",{value:"default",configurable:!0}),o(84978),o(25809)},95628(e,t,o){"use strict";function n(e,t){return e?(Array.isArray(t)&&(t=t.join(",")),e.querySelector(t)):null}o.d(t,{A:()=>n}),Object.defineProperty(n,"name",{value:"default",configurable:!0})},40627(e,t,o){"use strict";function n(e,t){return e?(Array.isArray(t)&&(t=t.join(",")),e.querySelectorAll(t)):[]}o.d(t,{A:()=>n}),Object.defineProperty(n,"name",{value:"default",configurable:!0})},47397(e,t,o){"use strict";o.d(t,{l:()=>i,q:()=>r});var n=o(15483);function i(e,t,o=0){const n=t?t.querySelector(e):document.querySelector(e);return n?r(n,o):null}function r(e,t=0){const o=(0,n.Kr)(e,{includeContainer:!0});return 0===o.length?null:{first:o[Math.min(t,o.length-1)],last:o[o.length-1]}}},83394(e,t,o){"use strict";let n;function i(e){return function(...t){if(t[0]instanceof Event||t[0]instanceof window.jQuery.Event){const o=t[0].target;o===n&&e.apply(o,t)}}}o.d(t,{A:()=>i}),window.addEventListener("mousedown",({target:e})=>{n=e})},31400(e,t,o){"use strict";function n(e){return function(...t){if(t[0]instanceof KeyboardEvent){const o=t[0];o.ctrlKey||o.shiftKey||o.altKey||o.metaKey||e.apply(o.target,t)}}}o.d(t,{A:()=>n})},68243(e,t,o){"use strict";function n(e,t){return t?.parentNode?.insertBefore(e,t),e}o.d(t,{A:()=>n})},45594(e,t,o){"use strict";function n(e,t){return t.insertBefore(e,t.firstChild),e}o.d(t,{A:()=>n})},47554(e,t,o){"use strict";function n(e,t){return t.appendChild(e),e}o.d(t,{A:()=>n})},82982(e,t,o){"use strict";o.d(t,{J:()=>r});var n=o(25734),i=o(45891);function r(e,t,o=!0){let n;if("Tab"===e.key&&e.shiftKey)n="back";else{if("Tab"!==e.key)return;n="forward"}o||function(e,t,o){const n=t[t.length-1],i=t[0];if("forward"===o&&e.target===n?.last){const e=n.last;for(let o=0;o<t.length-1;o++){const n=t[o];if(a(n.first,e)||a(n.last,e))return void p()}}if("back"===o&&e.target===i?.first){const e=i.first;for(let o=1;o<t.length;o++){const n=t[o];if(s(n.first,e)||s(n.last,e))return void p()}}}(e,t,n);for(let i=0;i<t.length;i++){const r=t[i];if("forward"===n&&e.target===r.last){const n=t[i+1]||(o?t[0]:void 0);if(n)return e.preventDefault(),void n.first?.focus()}else if("back"===n&&e.target===r.first){const n=t[i-1]||(o?t[t.length-1]:void 0);if(n)return e.preventDefault(),void n.last?.focus()}}}function a(e,t){const o=t.compareDocumentPosition(e);return Boolean(o&Node.DOCUMENT_POSITION_FOLLOWING)}function s(e,t){const o=t.compareDocumentPosition(e);return Boolean(o&Node.DOCUMENT_POSITION_PRECEDING)}let c=0;function p(){const e=Date.now();if(e-c<5e3)return;c=e;const t=window.BRIGHTSPOT?.ui.tooltips?.focusTrapHint;if(!t)return;const o=(0,i.WA)(t);(0,n.iP)(o),function(e){const t=document.getElementById("focus-escape-hint");t&&t.remove();const o=document.createElement("div");o.id="focus-escape-hint",o.textContent=e,o.setAttribute("role","status"),o.style.position="fixed",o.style.bottom="20px",o.style.right="20px",o.style.padding="12px 16px",o.style.backgroundColor="#333",o.style.color="#fff",o.style.borderRadius="4px",o.style.fontSize="14px",o.style.zIndex="10000",o.style.boxShadow="0 2px 8px rgba(0,0,0,0.3)",o.style.pointerEvents="none",document.body.appendChild(o),setTimeout(()=>{o.remove()},4e3)}(o)}},56155(e,t,o){"use strict";o.d(t,{A:()=>T}),o(44764),o(84978),o(13722),o(91672),o(92280);var n=o(59314),i=o.n(n);function r(e,t,o){a(e,t),t.set(e,o)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function s(e,t){return e.get(p(e,t))}function c(e,t,o){return e.set(p(e,t),o),o}function p(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}let b=0;var M=new WeakMap,d=new WeakMap,l=new WeakMap,z=new WeakMap,u=new WeakMap,O=new WeakSet;class A{constructor(e,t,o){var n;a(this,n=O),n.add(this),r(this,M,void 0),r(this,d,void 0),r(this,l,void 0),r(this,z,void 0),r(this,u,void 0),c(M,this,e),c(d,this,"data-ofc"+b++),Array.isArray(t)||(t=[t]),c(l,this,t.map(t.some(e=>e.indexOf(",")>-1)?e=>e:e=>`${e}:not([${s(d,this)}])`).join(",")),c(z,this,o);const i=t.map(e=>e.trim()).filter(e=>e.indexOf(" ")<0&&e.indexOf(",")<0);i.length===t.length&&c(u,this,i)}addTriggerElements(e,t){if(s(M,this).contains(t)){t.matches(s(l,this))&&e.push(t);for(const o of t.querySelectorAll(s(l,this)))e.push(o)}}trigger(e){if("loading"!==document.readyState)if(s(u,this)&&Array.isArray(e))for(const t of e)s(u,this).some(e=>t.matches(e))&&p(O,this,f).call(this,t);else for(const e of s(M,this).querySelectorAll(s(l,this)))p(O,this,f).call(this,e)}}function f(e){if(!y(e)&&!e.hasAttribute(s(d,this))){e.setAttribute(s(d,this),"");try{s(z,this).call(this,e)}catch(t){i().error("Failed callback!",e,t)}}}let h,m=!1,q=!1,_=!1,W=[];const g=[];function y(e){return e instanceof Element&&(null!==e.closest(".CIG-wordCount")||null!==e.closest(".ContentEdit-previewDisplay")||null!==e.closest(".ContentLabel")||null!==e.closest(".PreviewFrame-typeDisplay")||null!==e.closest(".ProseMirrorToolbar")||null!==e.closest(".ProseMirror")||null!==e.closest(".ProseMirrorContainer")||null!==e.closest(".ProseMirror-fullscreen-container")||null!==e.closest(".ProseMirror-comments")||null!==e.closest(".RichTextEditor")||null!==e.closest(".WorkInProgressSaveStatus")||null!==e.closest("#aria-live-container")||null!==e.closest(".widget-urlsAutomatic"))}const v=Array.prototype.every,L=e=>e.nodeType===Node.TEXT_NODE;function w(e){if(m)return void(q=!0);const t=Array.isArray(e),o=[];if(t){for(const t of e){const e=t.target;if(!y(e))switch(t.type){case"attributes":t.oldValue!==e.getAttribute(t.attributeName)&&o.push(t);break;case"childList":v.call(t.addedNodes,L)&&v.call(t.removedNodes,L)||o.push(t)}}if(0===o.length)return}if(o.length>500&&(_=!0),!_)if(t)for(const e of o){const t=e.target;switch(e.type){case"attributes":W.push(t);break;case"childList":for(const e of g)e.addTriggerElements(W,t)}}else _=!0;(_||W.length>0)&&!h&&(h=window.requestAnimationFrame(()=>{const e=_?void 0:W;_=!1,W=[],h=0,g.forEach(t=>t.trigger(e))}))}function R(){document.documentElement.hidden=!1,w(),new MutationObserver(w).observe(document,{attributes:!0,attributeFilter:["class","data-bsp-autosubmit","data-chart-type","data-code-type","data-internal-name","data-tab","name","rel","target"],attributeOldValue:!0,childList:!0,subtree:!0})}function k(e,t,o){let n,i;void 0!==o?(n=e,i=t):(n=document,i=e,o=t);const r=new A(n,i,o);r.trigger(),g.push(r)}document.documentElement.hidden=!0,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",R):R(),k.triggerCallbacks=w,k.pause=()=>{m=!0},k.resume=()=>{m=!1,q&&(q=!1,setTimeout(w,100))};const T=k},41044(e,t,o){"use strict";function n(e,t){if(Array.isArray(e)&&(e=e.join(",")),document.querySelector(e))return void t();let o=!1;const n=new MutationObserver(async()=>{document.querySelector(e)&&(n.disconnect(),o||(o=!0,t()))});n.observe(document,{attributes:!0,childList:!0,subtree:!0})}o.d(t,{A:()=>n})},22274(e,t,o){"use strict";o.d(t,{A:()=>i});let n=!1;function i(e,t){const o=new MutationObserver(i=>{for(const r of i)for(const i of r.removedNodes)i.contains(e)&&!n&&(o.disconnect(),t())});o.observe(document,{childList:!0,subtree:!0})}i.pause=()=>{n=!0},i.resume=()=>{n=!1}},33582(e,t,o){"use strict";o.d(t,{A:()=>r});var n=o(56155);let i=0;function r(e,t){const o="_ovc"+i++,r=new IntersectionObserver(e=>{for(const n of e)if(n.isIntersecting){const e=n.target,i=e.classList;i.contains(o)||(i.add(o),r.unobserve(e),t(e))}});(0,n.A)(e,e=>{r.observe(e)})}},66556(e,t,o){"use strict";o.d(t,{AM:()=>a,D1:()=>r,H0:()=>s}),o(84978),o(13722),o(25809);var n=o(9968),i=o(36500);function r(e,t){!function(e){p(e,"button, a");e.querySelector('[role="menuitem"]')||e.querySelectorAll("button, a").forEach(e=>{e.hasAttribute("role")||(e.setAttribute("role","menuitem"),e.classList.add("Dropdown-item"))})}(e),function(e,t){t.hasAttribute("aria-controls")||(e.id||(e.id=(0,i.A)()),t.setAttribute("aria-controls",e.id))}(e,t),function(e,t){(function(e,t){t.addEventListener("keydown",o=>{const n=e.closest('[role="toolbar"]'),i=n?.getAttribute("aria-orientation");switch(o.key){case"ArrowDown":case"ArrowRight":if(n&&("vertical"===i&&"ArrowDown"===o.key||"vertical"!==i&&"ArrowRight"===o.key))break;t.click(),o.stopPropagation(),o.preventDefault();break;case"ArrowUp":case"ArrowLeft":if(n&&("vertical"===i&&"ArrowUp"===o.key||"vertical"!==i&&"ArrowLeft"===o.key))break;t.click(),"true"===t.getAttribute("aria-expanded")&&e.addEventListener("transitionend",()=>{c(M(b(e)),-1)},{once:!0})}})})(e,t),function(e,t){e.addEventListener("keydown",e=>{switch(e.key){case"Escape":t.click(),t.focus(),e.preventDefault(),e.stopPropagation();break;case"ArrowLeft":case"ArrowUp":c(e.target,-1),e.preventDefault();break;case"ArrowRight":case"ArrowDown":c(e.target,1),e.preventDefault()}})}(e,t),s(e,t)}(e,t)}function a(e,t,o=e){const i=e.querySelector(".ComboInput"),r=o=>{t.classList.contains("is-active")&&"Tab"===o.key&&!e.contains(document.activeElement)&&document.activeElement!==i&&document.activeElement!==t&&t.click()};p(e,'[role="menuitem"]'),n.A.toggle(t,e,()=>{const n=t.classList.toggle("is-active");return n?(t.setAttribute("aria-expanded",!0),window.addEventListener("keyup",r),e.addEventListener("transitionend",()=>{const t=b(e);if(!t?.length)return;const o=M(t);o?.setAttribute("tabindex","0"),o?.focus()},{once:!0})):(t.setAttribute("aria-expanded",!1),window.removeEventListener("keyup",r)),o.classList.toggle("is-open",n)})}function s(e,t){e.querySelectorAll('button, a, [role="menuitem"]').forEach(e=>{e.addEventListener("click",()=>{"true"===t.getAttribute("aria-expanded")&&(t.click(),t.focus())})})}function c(e,t){const o=function(e){if(e)return e.closest(".is-open")||e.closest("ul")}(e),n=b(o);if(!o||!n)return;const i=n.indexOf(e);if(-1===i)return;e.setAttribute("tabindex","-1");const r=o.querySelector("li.focus");if(r&&r.classList.remove("focus"),-1===t){let e=i-1>-1?n[i-1]:n[n.length-1];e.setAttribute("tabindex","0"),e.focus(),r&&e.closest("li")?.classList.add("focus")}if(1===t){let e=i+1<n.length?n[i+1]:n[0];e.setAttribute("tabindex","0"),e.focus(),r&&e.closest("li")?.classList.add("focus")}}function p(e,t){e.querySelectorAll(t).forEach(e=>{e.setAttribute("tabindex","-1")})}function b(e){if(e)return Array.from(e.querySelectorAll('[role="menuitem"]')).filter(e=>!(e.hasAttribute("aria-hidden")||e.closest('[aria-hidden="true"]')||"none"===window.getComputedStyle(e).display||e.classList.contains("screen-reader-only")))}function M(e){for(const t of e)if(t.matches(".is-selected, .selected")||t.parentElement.matches(".is-selected, .selected"))return t;return e[0]}},60489(e,t,o){"use strict";o.d(t,{A:()=>b});var n=o(29171);function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t,o){return e.set(s(e,t),o),o}function a(e,t){return e.get(s(e,t))}function s(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var c=new WeakMap,p=new WeakMap;class b extends n.WF{constructor(...e){super(...e),this.name=void 0,this.type=void 0,this.placeholder=void 0,this.placeholderEditable=void 0,i(this,c,void 0),i(this,p,void 0)}static get tagName(){return"btu-code-input"}static get properties(){return{name:{},type:{},placeholder:{},placeholderEditable:{type:Boolean},value:{}}}get value(){return a(c,this)?a(c,this).getValue():a(p,this)||""}set value(e){a(c,this)?a(c,this).setValue(e||""):r(p,this,e)}createRenderRoot(){return this}render(){return this.name?n.qy`<input type="hidden" name="${this.name}" .value=${this.value} />`:""}async firstUpdated(){const{default:e}=await Promise.all([o.e(2825),o.e(3995),o.e(5781)]).then(o.bind(o,75023));r(c,this,e(this,{indentUnit:4,inputStyle:"contenteditable",lineNumbers:!0,lineWrapping:!0,mode:this.type||"",placeholder:this.placeholder||"",value:this.value||""})),a(c,this).on("change",()=>{this.requestUpdate(),this.dispatchEvent(new Event("change",{bubbles:!0}))}),this.placeholderEditable&&(a(c,this).on("focus",()=>{a(c,this)&&!a(c,this).getValue()&&a(c,this).setValue(this.placeholder||"")}),a(c,this).on("blur",()=>{a(c,this)&&a(c,this).getValue()===this.placeholder&&a(c,this).setValue("")}))}}customElements.define(b.tagName,b)},40704(e,t,o){"use strict";o(44764),o(84978),o(25809),o(91672);var n=o(29171),i=o(17319),r=o(56155),a=o(27170),s=o(36500);function c(){c=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!M(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?u(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=z(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:l(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=l(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function p(e){var t,o=z(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function b(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function M(e){return e.decorators&&e.decorators.length}function d(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function l(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function z(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},O.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}let f=(h=[(0,i.EM)("btu-form-filter")],m=n.WF,q=c(),_=function(e,t){class o extends t{constructor(){super(),e(this)}}return{F:o,d:[{kind:"field",static:!0,key:"noFilterTypes",value:()=>new Set(["option","textarea"])},{kind:"field",decorators:[(0,i.MZ)()],key:"noMatches",value:()=>"No Results!"},{kind:"field",decorators:[(0,i.MZ)()],key:"placeholder",value:()=>"Find in form"},{kind:"field",decorators:[(0,i.MZ)()],key:"selector",value:()=>"form > .CIG"},{kind:"field",decorators:[(0,i.wk)()],key:"container",value:void 0},{kind:"method",key:"connectedCallback",value:function(){var e,t,n,i,a;(e=o,t="connectedCallback",n=this,a=O(A(1&(i=3)?e.prototype:e),t,n),2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a)([]),this.selector&&(0,r.A)(this.selector,e=>{this.container=e,new o})}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"field",key:"handleClick",value(){return()=>{const e=this.querySelector(".FormFilter-container"),t=this.querySelector("input");if(t){t.focus();const o=this.classList.toggle("is-open");this.querySelector(".FormFilter-icon")?.classList.toggle("is-open",o),e?.classList.toggle("is-open",o),e?.classList.contains("is-open")?t.focus():(this.removeMessage(),this.container?.classList.remove("is-filtering"),this.container?.querySelectorAll(".is-filterResult").forEach(e=>e.classList.remove("is-filterResult","has-title")),t.blur(),t.value="",y(this))}}}},{kind:"field",key:"handleInput",value(){return()=>{const e=this.querySelector("input");this.container&&e&&(this.removeMessage(),this.querySelectorAll(".is-filterResult").forEach(e=>e.classList.remove("is-filterResult")),this.container.querySelectorAll(".is-filterResult").forEach(e=>e.classList.remove("is-filterResult")),y(this),0===e.value.length?this.container.classList.remove("is-filtering"):(this.container.classList.add("is-filtering","is-loading"),g instanceof Function&&g(this,e?.value)))}}},{kind:"method",key:"getContainer",value:function(){return this.container}},{kind:"method",key:"removeMessage",value:function(){this.container?.parentElement?.querySelector(".FormFilter-message")?.remove()}},{kind:"method",key:"render",value:function(){const e=`i${(0,s.A)()}`;return n.qy`<div class="FormFilter-container">
|
|
34
|
+
</button>`}}]},_=m.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(M(r.descriptor)||M(i.descriptor)){if(b(r)||b(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(b(r)){if(b(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}p(r,i)}else t.push(r)}return t}(q.d.map(c)),O),m.initializeClassElements(q.F,_.elements),m.runClassFinishers(q.F,_.finishers));var O,A,f,h,m,q,_},76363(e,t,o){"use strict";var n=o(88903),i=o(38745),r=o(56155),a=o(1439);(0,r.A)(".Diff-title",e=>{e.focus(),e.addEventListener("click",()=>{e.closest(".Popup-content")?.querySelector(".Popup-close")?.click()})}),(0,r.A)("[data-diff-state-id]",e=>{const t=e.dataset.diffStateId,o=e.closest(".Diff-container"),r=o?.querySelectorAll(`[data-diff-state-id="${t}"]`);if(r?.length){const t=r[0],o=r[1],s=t?.dataset,c=o?.dataset,p=s?.diffState,b=c?.diffState;if(!p)return void r[1]?.removeAttribute("data-diff-state");if(!b)return void r[0]?.removeAttribute("data-diff-state");e.addEventListener("click",async e=>{a(".is-diff").popup("close");const t=new Headers,o=n.A.get("bsp.csrf");o&&t.append("Brightspot-CSRF",o);const r=new FormData;r.append("left",p),r.append("right",b);try{const e=await fetch("/cms/diffRevision",{method:"POST",headers:t,body:r}),o=await e.text();document.getElementById("rtediff")?.remove();const n=(0,i.A)("div");n.id="rtediff",document.body.appendChild(n),n.innerHTML=o;const s=a(n).popup();s.popup("container").addClass("is-diff"),s.popup("open")}catch(e){console.error(e)}})}})},4308(e,t,o){"use strict";o.d(t,{A:()=>_}),o(44764),o(84978),o(25809),o(91672);var n=o(29171),i=o(17319),r=o(80133),a=o(38745),s=o(56155),c=o(57317);function p(){p=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!d(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?O(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=u(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:z(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=z(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function b(e){var t,o=u(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function M(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function d(e){return e.decorators&&e.decorators.length}function l(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function z(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function u(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function A(e,t,o,n){var i=f(h(1&n?e.prototype:e),t,o);return 2&n&&"function"==typeof i?function(e){return i.apply(o,e)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},f.apply(null,arguments)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}const m=window.localStorage,q=window.BRIGHTSPOT?.ui.tooltips;let _=(W=[(0,i.EM)("btu-eig")],g=(0,r.m)(n.WF),y=p(),v=function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,i.nJ)(".EIG-item")],key:"_eigItem",value:void 0},{kind:"field",decorators:[(0,i.nJ)(".EIG-title")],key:"_title",value:void 0},{kind:"field",decorators:[(0,i.nJ)(".removeButton")],key:"_removeButton",value:void 0},{kind:"method",key:"connectedCallback",value:function(){A(o,"connectedCallback",this,3)([]),this.initializeEigItem()}},{kind:"method",key:"disconnectedCallback",value:function(){A(o,"disconnectedCallback",this,3)([]),this._removeButton?.then(e=>{e?.removeEventListener("click",e=>{this._removeItem(e)})}),this._title?.then(e=>{e?.removeEventListener("click",()=>{this._eigToggle()}),e?.removeEventListener("keydown",({key:e})=>{"Enter"!==e&&"Space"!==e&&" "!==e||(event?.preventDefault(),this._eigToggle())})})}},{kind:"field",key:"_eigToggle",value(){return()=>{this._eigItem?.then(e=>{if(e){const t=e.classList;if(t.contains("is-removing"))return;t.toggle("is-collapsed"),e.querySelector(".CIG-large")?.toggleAttribute("hidden");const o=e.closest("[data-field]");if(o){const e=(0,c.A)(o,"data-field");e&&(m.getItem(e)?m.removeItem(e):m.setItem(e,"1"))}}})}}},{kind:"field",key:"_removeItem",value(){return e=>{const t=e.target;this._eigItem?.then(e=>{if(e){const o=e.querySelector(".screen-reader-only");e.classList.toggle("is-removing")?(e.querySelector(".CIG-large")?.setAttribute("hidden",""),e.querySelectorAll("input, textarea, select").forEach(e=>e.setAttribute("disabled","")),t instanceof HTMLElement&&(t.title=q.restore,t.setAttribute("aria-label",q.restore),o&&(o.textContent=q?.remove))):(e.classList.contains("is-collapsed")||e.querySelector(".CIG-large")?.removeAttribute("hidden"),e.querySelectorAll("input, textarea, select").forEach(e=>e.removeAttribute("disabled")),t instanceof HTMLElement&&(t.title=q.remove,t.setAttribute("aria-label",q.remove),o&&(o.textContent=q?.restore)))}})}}},{kind:"method",key:"firstUpdated",value:function(){this.emit("btu-eig-ready")}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"initializeEigItem",value:function(){this._eigItem?.then(e=>{if(e){const t=e.closest("[data-field]"),o=e.classList;let n=null;t&&(n=(0,c.A)(t,"data-field"),n&&m.getItem(n)&&(o.add("is-collapsed"),e.querySelector(".CIG-large")?.setAttribute("hidden","")))}else(0,s.A)(this,".EIG-item",e=>{const t=e.querySelector(".EIG-title"),o=e.querySelector(".removeButton");this.titleAddEventListeners(t),this.removeButtonAddEventListeners(o)})}),this._title?.then(e=>{this.titleAddEventListeners(e)}),this._removeButton?.then(e=>{this.removeButtonAddEventListeners(e)})}},{kind:"method",key:"titleAddEventListeners",value:function(e){e&&(e.addEventListener("click",()=>{this._eigToggle()}),e.addEventListener("keydown",e=>{const{key:t}=e;"Enter"!==t&&"Space"!==t&&" "!==t||(e.preventDefault(),this._eigToggle())}))}},{kind:"method",key:"removeButtonAddEventListeners",value:function(e){if(!e)return;const t=(0,a.A)("span",{class:"screen-reader-only","aria-live":"polite"});e.after(t),e.addEventListener("click",e=>{this._removeItem(e)})}},{kind:"method",key:"render",value:function(){return n.s6}}]}}(function(e){y.initializeInstanceElements(e,L.elements)},g),L=y.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(l(r.descriptor)||l(i.descriptor)){if(d(r)||d(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(d(r)){if(d(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}M(r,i)}else t.push(r)}return t}(v.d.map(b)),W),y.initializeClassElements(v.F,L.elements),y.runClassFinishers(v.F,L.finishers));var W,g,y,v,L},59240(e,t,o){"use strict";o.a(e,async(e,t)=>{try{o(67219),o(44764),o(50144),o(84978),o(39589),o(25809),o(92280);var n=o(25734),i=(o(40704),o(40482),o(94473),o(34409),o(47066),o(38156),o(95963),o(26093),o(43752),o(90655),o(30471),o(31605),o(70894),o(76363),o(60618),o(22124),o(38284),o(83956),o(76095),o(36458),o(17630),o(18755),o(7069),o(32817),o(9389),o(1359)),r=o(88903),a=o(1607),s=o(27170),c=o(57317),p=o(66556),b=o(95628),M=o(56155),d=o(33582),l=o(79911),z=o(60489),u=o(70660),O=o(29975),A=o(4308),f=o(17628),h=o(68656),m=o(49989),q=o(91334),_=o(5739),W=o(74051),g=o(7095),y=o(1439),v=e([f,q]);[f,q]=v.then?(await v)():v;const L="X-Brightspot-Requested-With",w="XMLHttpRequest",R=XMLHttpRequest.prototype.send,k=window.fetch;XMLHttpRequest.prototype.send=function(...e){this.setRequestHeader(L,w),R.apply(this,e)},window.fetch=(e,t)=>{const o=new Headers(t?.headers);o.set(L,w);const n={...t,headers:o};return k(e,n)},(0,d.A)("textarea[data-code-type]",e=>{const t=new z.A;t.type=e.dataset.codeType,t.placeholder=e.placeholder,t.placeholderEditable="editablePlaceholder"in e.dataset,t.value=e.value;const o=(0,s.A)(200,()=>{e.dispatchEvent(new Event("change",{bubbles:!0}))});t.addEventListener("change",()=>{e.value=t.value,o()}),e.dataset.hideWordCount="true",e.hidden=!0,e.parentNode?.insertBefore(t,e)}),(0,d.A)(["input:not([type])",'input[type="text"]:not(:is(.objectId, .ComboInput-filter))','input[type="password"]:not(:is(.objectId))'],e=>{e.classList.contains("secret")&&(e.type="password"),(0,l.L)(e,f.A,t=>{t instanceof f.A&&(document.activeElement===e&&(t.autofocusInput=!0),t.type=e.type??void 0,t.placeholder=e.placeholder,t.placeholderEditable="editablePlaceholder"in e.dataset)})}),(0,d.A)(".inputSmall-text > textarea:not(.richtext):not([data-code-type])",e=>{(0,l.L)(e,q.A,t=>{t instanceof q.A&&(t.placeholder=e.placeholder,t.placeholderEditable="editablePlaceholder"in e.dataset)})}),(0,M.A)(".p-workStreams .progressBar",a.A.onFindFunction(48,6)),(0,M.A)(".ContentEdit-workstreamProgress .progressBar",a.A.onFindFunction(24,4)),(0,M.A)(".ContentEdit div.Widget > .Widget-title",e=>{const t=e.parentElement;if(t instanceof HTMLElement&&t.classList.contains("Widget")){const e=new W.A;t.dataset.internalName&&(e.collapsible=!0),e.classList.add(...t.classList);for(const o in t.dataset)e.dataset[o]=t.dataset[o];e.internalname=t.dataset.internalName,e.widgetid=t.dataset.widgetId,e.initialClosed=t.hasAttribute("data-closed");const o=t.querySelector(".Widget-title");o&&(e.heading=o.innerText),e.addEventListener("btu-widget-ready",o=>{const n=t.querySelectorAll(":scope > *:not(.Widget-title)");null!=n&&e.append(...n)}),t.parentNode?.insertBefore(e,t),t.remove()}}),window.addEventListener("beforeunload",e=>{if(e.target instanceof Document&&e.target.querySelector('.SearchWidget[name="searchAdvancedFull"]:not(.AssignmentDeskDashboard)')){const t=e.target.querySelector('.SearchResult-action-link[href*="/searchAdvancedFull"]'),o=t?.getAttribute("href")?.split("?")[1];window.history.replaceState(null,"",window.location.pathname+"?"+o)}}),(0,M.A)([".SearchWidget.is-global .SavedSearches-links a",".SearchWidget.is-global .SavedSearches-links btu-copy-to-clipboard"],e=>{e.addEventListener("click",()=>{const e=document.querySelector(".Page-search .SearchInput input");e&&(e.value="")})}),(0,M.A)(".SearchWidget .SavedSearches-links .SavedSearches-more-dropdown",e=>{const t=e.parentNode?.querySelector(".SavedSearches-more");(0,p.D1)(e,t)}),(0,M.A)(["div.SearchWidget-moreFilters > h2.SearchWidget-moreFiltersHeading","div.SearchWidget-recent > h2.searchRecent-heading","div.SearchWidget-saved > h2.searchSaved-heading","div.SearchWidget-create > h2:first-child"],e=>{const t=e.parentElement;if(!(t instanceof HTMLElement))return;const o=new W.A;o.collapsible=!0,o.classList.add(...t.classList),o.setAttribute("internalname",t.classList[0]),o.internalname=t.classList[0],o.setAttribute("widgetid",t.classList[0]),o.heading=e.innerText;for(const t in e.dataset)o.dataset[t]=e.dataset[t];o.addEventListener("btu-widget-ready",e=>{const n=t.querySelectorAll(":scope > *:not(h2)");null!=n&&o.append(...n)}),t.parentNode?.insertBefore(o,t),t.remove()}),(0,M.A)("a.SavedSearches-more-dropdown-copy",e=>{const t=new O.A;t.classList.add(...e.classList),t.copydata=e.dataset.searchString,t.internallink=!0,t.textContent=e.textContent,t.setAttribute("role","menuitem"),t.title=e.title,e.parentNode?.insertBefore(t,e),e.remove(),t.addEventListener("click",()=>{const e=t.closest(".SavedSearches-links")?.querySelector("button.SavedSearches-more");"true"===e?.ariaExpanded&&(e.click(),e.focus());const o=(0,b.A)(document.body,".Page-search .SearchInput input");o instanceof HTMLInputElement&&(o.value=""),t.copy()}),t.addEventListener("keydown",({key:e})=>{"Enter"===e&&t.copy()}),t.addEventListener("btu-copy-to-clipboard-copied",()=>{const o=e.dataset.copiedLink??"";if(!o)return;(0,n.iP)(o);const i=t.firstChild?.nodeValue;t.firstChild&&(t.firstChild.nodeValue=o,setTimeout(()=>{t.firstChild&&(t.firstChild.nodeValue=i??"")},3e3))})}),(0,M.A)("a.ApiKey-copy",e=>{const t=new O.A;t.classList.add(...e.classList);const o=e.closest(".ApiKey-apiKey")?.querySelector(".ApiKey-value")?.textContent;o&&(t.copydata=o,t.title=e.title,e.parentNode?.insertBefore(t,e),e.remove(),t.addEventListener("btu-copy-to-clipboard-copied",()=>{const t=e.querySelector(".ApiKey-copyConfirmed")?.textContent??"";t&&(0,n.iP)(t)}))}),(0,M.A)(".LiveBlogPostList .LiveBlogPostList-filters > .LiveBlogPostList-filtersTitle",e=>{const t=e.parentElement,o=t?.closest(".LiveBlogPostListNav");if(o?.querySelector(".Widget-collapse")?.remove(),t instanceof HTMLElement){const o=new W.A;o.collapsible=!0;const n=(0,c.A)(t,"data-internal-name");n&&(o.collapsed=null!=localStorage.getItem(n)),o.classList.add(...t.classList);for(const e in t.dataset)o.dataset[e]=t.dataset[e];const i=t.dataset.widgetId,r=t.dataset.internalName;i&&r&&(o.setAttribute("widgetid",i),o.setAttribute("internalname",r)),o.heading=e.innerText,o.addEventListener("btu-widget-ready",e=>{const n=t.querySelectorAll(":scope > *:not(.LiveBlogPostList-filtersTitle)");null!=n&&o.append(...n)}),t.parentNode?.insertBefore(o,t),t.remove()}}),(0,M.A)(".toggleable",e=>{(0,l.L)(e,_.A,t=>{t instanceof _.A&&(t.rootSelector=e.dataset.root)})}),(0,M.A)(".TranslationFrame .LinkTable",e=>{(0,l.L)(e,m.A,t=>{if(t instanceof m.A){t.classList.add(...e.classList);for(const o in e.dataset)t.dataset[o]=e.dataset[o];t.addEventListener("btu-table-checked-all",t=>{y(e).trigger("submit")})}})}),(0,M.A)(".objectId-select, .RCIG-item .repeatableLabel, .EIG-item .repeatableLabel",e=>{e.parentElement?.classList.contains("RCIG-item")&&new i.A(e,{})}),(0,M.A)(".CIG > .CIG-title",e=>{const t=new u.A;t.clusterTitle=e.innerText,t.tab=e.dataset.tab??void 0,t.addEventListener("btu-cig-cluster-ready",e=>{const o=[];let n=t.nextElementSibling;for(;n instanceof HTMLElement&&n.matches(".CIG-row")&&n.dataset.tab===t.tab;)o.push(n),n=n.nextElementSibling;null!=o&&t.append(...o),requestAnimationFrame(()=>t.requestUpdate())}),e.parentNode?.insertBefore(t,e),e.remove()}),(0,M.A)(".TemplateField[data-cluster]",e=>{const t=e.dataset.cluster;if(!t)return;const o=e.closest(".StyleguidePreset-row");if(!o)return;let n=o.querySelector(`btu-cig-cluster > .TemplateField[data-cluster="${t}"]`)?.parentElement;if(!n){n=new u.A,n.clusterTitle=t,n.tab=e.dataset.tab??"",e.insertAdjacentElement("beforebegin",n);const i=o.closest(".CIG-row.StyleguideTemplate-row");if(i){const e=i.querySelector(".CIG-small > select");e&&e.addEventListener("change",()=>{n&&(Array.from(n.querySelectorAll("div.TemplateField")).some(e=>"none"!==e.style.display)?n.style.display="block":n.style.display="none")})}}e.querySelector(":scope > .CIG-title")?.remove(),n.append(e)}),(0,M.A)(".EIG",e=>{const t=new A.A;t.classList.add(...e.classList);for(const o in e.dataset)t.dataset[o]=e.dataset[o];t.addEventListener("btu-eig-ready",()=>{const o=e.querySelectorAll(":scope > *");null!=o&&t.append(...o),requestAnimationFrame(()=>t.requestUpdate())}),e.parentNode?.insertBefore(t,e),e.remove()}),(0,M.A)(["a[data-objectId]","a[data-add-embedded-content-data]"],e=>{e.onclick=async e=>{let t,o,n;const i=e.target;if(i instanceof HTMLElement&&(n=i.closest("a[data-objectId]")),n){o=y(n).popup("source");let e=o.attr("data-add-embedded-content-data");if(!e)return;e=JSON.parse(e).typeId;const i=o.attr("data-field");if(!i)return;const r=n.dataset.objectid;if(!r)return;const a={typeId:e??""};a[i]=r,t=JSON.stringify(a)}else{if(i instanceof HTMLElement&&(n=i.closest("[data-add-embedded-content-data]")),!n)return;if(o=y(n).popup("source"),t=n.dataset.addEmbeddedContentData??void 0,!t)return}if(!o)return;const a=o.attr("href");if(!a||!a.includes("add-embedded-content"))return;e.preventDefault();const s=new Headers,c=r.A.get("bsp.csrf");c&&s.append("Brightspot-CSRF",c);const p=new FormData;p.append("data",t);try{const e=await fetch(a,{method:"POST",headers:s,body:p}),t=await e.text();let i;if(o.hasClass("EIG-add")||o.hasClass("EIG-swap")||o.hasClass("EIG-search")){const e=o.closest(".EIG");e.find(".EIG-item").remove(),e.append(t),e.find(".toggleable").trigger("toggle"),e.trigger("create"),e.trigger("change"),o.closest(".EIG-controls").detach(),i=e[0].querySelector(".EIG-title")}else o.hasClass("RCIG-swap")&&o.closest(".RCIG-item").addClass("RCIG-replace"),o.closest(".RCIG").data("repeatable").addItem(t),o.closest(".RCIG-replace").remove();y(n).popup("close"),i?.focus()}catch(e){console.error(e)}}}),(0,M.A)(".SearchInput:not(btu-search-input)",e=>{const t=new h.A;t.classList.add(...e.classList);const o=e.querySelector("label");o&&(t.label=o.innerText);const n=e.querySelector("input");if(n){n.name&&(t.name=n.name),n.ariaLabel&&(t.arialabel=n.ariaLabel);const e=n.getAttribute("value");e&&(t.value=e)}e.parentNode?.insertBefore(t,e),e.remove()}),(0,M.A)('.Page-search btu-search-input input[type="text"]',e=>{["click","input"].forEach(t=>{e.addEventListener(t,(0,s.A)(500,t=>{if(!(t instanceof Event))return;const o=e.closest("form");if(!o)return;const n=e.value,i=document.querySelector('.frame[name="'+o.target+'"]');!i||"focus"===t.type&&n&&i.querySelector(".searchResultList .message-warning")?o.requestSubmit():(y(i).popup("open"),i.querySelectorAll('.searchFilters input[name="q"]').forEach(e=>{n!==e.value&&(e.value=n,e.dispatchEvent(new CustomEvent("input",{bubbles:!0})))}))}))}),e.addEventListener("keydown",t=>{if("Enter"===t.code)t.target?.dispatchEvent(new Event("input",{bubbles:!0})),t.preventDefault();else if("Tab"===t.code){const o=document.querySelector('.frame[name="'+e.closest("form")?.target+'"]');o&&o instanceof HTMLElement&&"none"!==o.style.display&&(o.closest(".Popup-content")?.querySelector(".Popup-close")?.focus(),t.preventDefault())}})}),(0,M.A)(".Page-loginDialog",e=>{document.body.appendChild(e)}),(0,M.A)(".Suggestions-list",e=>{const t=e.querySelector(".Suggestions-list-icon"),o=new W.A;if(o.collapsible=!0,t){const n=(0,c.A)(t,"data-label");n&&(o.collapsed=null!=localStorage.getItem(n),o.setAttribute("data-internal-name",n)),o.classList.add(...e.classList);for(const t in e.dataset)o.dataset[t]=e.dataset[t];o.heading=t.innerText,o.addEventListener("btu-widget-ready",t=>{const n=e.querySelectorAll(":scope > *:not(.Suggestions-list-icon)");null!=n&&o.append(...n)}),e.parentNode?.insertBefore(o,e),e.remove()}}),(0,d.A)(".Deferred",e=>{const t=e.parentElement,o=e.querySelector(":scope > template");if(o instanceof HTMLTemplateElement&&t){const n=o.content.cloneNode(!0);t.insertBefore(n,e),e.remove(),t.querySelectorAll(".CIG-row.StyleguidePreset-row .CIG-small > select").forEach(e=>{e.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}),t.querySelectorAll(".CIG-row.StyleguidePreset-row .CIG-small > input.objectId").forEach(e=>{const t=e.closest(".CIG-row");t?.dispatchEvent(new CustomEvent("create",{bubbles:!0}))}),y(t).trigger("create")}}),(0,M.A)(['.Popup[name="edit-guide"] .frame','.Popup[name="PostPublishActionsPage"] .frame','.Popup[name^="create-new-object-"] .frame','.Popup[name^="objectId-create-"] .frame','.Popup[name="AddEmbeddedContent"] .frame','.Popup[name^="conversation-"] .frame','.Popup[name^="_copy"] > .Popup-content > .frame'],e=>{new MutationObserver(e=>{e.forEach(e=>{const t=e.target;t.classList.contains("Widget")||t.classList.add("Widget")})}).observe(e,{attributeFilter:["class"]})}),(0,M.A)(".ContentEdit-left",e=>{if(e.closest(".Popup"))return;const t=e.closest(".ContentEdit");if(!t)return;const o=t.querySelector(".ContentEdit-top");e.addEventListener("scroll",(0,g.A)(600,()=>{e.scrollTop>0?e.scrollHeight-e.clientHeight>(o?.offsetHeight??0)&&t.classList.add("is-scrolled"):0===e.scrollTop&&t.classList.remove("is-scrolled")})),o?.addEventListener("click",t=>{const o=t.target.nodeName.toLowerCase();"span"!==o&&"div"!==o||e.scrollTo({top:0,behavior:"smooth"})})}),t()}catch(e){t(e)}})},80133(e,t,o){"use strict";o.d(t,{m:()=>n});const n=e=>class extends e{connectedCallback(){super.connectedCallback(),Promise.resolve().then(()=>this.emit("btu-brightspot-element-connected",{}),e=>this.emit("btu-brightspot-element-error",{error:e}))}disconnectedCallback(){super.disconnectedCallback(),this.emit("btu-brightspot-element-disconnected")}emit(e,t){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:t}))}}},60618(e,t,o){"use strict";var n=o(56155),i=o(88903);(0,n.A)(".UpdateCalendarAutoSync",e=>{e.onclick=async t=>{const o=e.getAttribute("href");if(!o)return;t.preventDefault();const n=new Headers,r=i.A.get("bsp.csrf");r&&n.append("Brightspot-CSRF",r);const a=new FormData;try{const t=await fetch(o,{method:"POST",headers:n,body:a}),i=await t.text(),r=(new DOMParser).parseFromString(i,"text/html").body.querySelector("div");r&&(e.textContent=r.textContent)}catch(e){console.error(e)}}})},22124(e,t,o){"use strict";o(84978),o(25809);var n=o(38745),i=o(56155),r=o(1439);(0,i.A)(".ExternalItemObjects",e=>{const t=r(e).popup("source");if(t){const o=t[0]?.closest(".searchForm")?.querySelectorAll(":scope > .searchControls > .searchFilters > form");if(o?.length){const t=o[0];e.querySelectorAll(':scope > input[name="newObjectId"]').forEach(function(e){const o=(0,n.A)("input",{type:"hidden",name:"ni",value:e.value});t.appendChild(o)}),t.requestSubmit()}}r(e).popup("close")})},38284(e,t,o){"use strict";var n=o(26791),i=o(56155);(0,i.A)(".LiveBlogPostListNav",e=>{const t=e.getAttribute("data-blog-id");n.A.receive("brightspot.liveblog.LiveBlogPostRtcBroadcast",o=>{if(o.blogId===t){const t=e.querySelector(".LiveBlogPostListNav-refresh");t&&t.click()}})}),(0,i.A)([".LiveBlogGrid a.action-copy",".LiveBlogGrid a.action-create"],e=>{e.target="postedit";const t=e.closest(".Grid");if(!t)return;const o=t.querySelector(".LiveBlogPostListNav");if(!o)return;const n=o.getAttribute("data-blog-id");let i=e.href;n&&i&&(i+="&disableManagedRedirect=true",i+="&blogId="+n,e.href=i)})},83956(e,t,o){"use strict";o(84978),o(25809);var n=o(56155),i=o(38745),r=o(66556);(0,n.A)(".Notification-controls-toggle",e=>{const t=e.closest(".Notification-controls-menu"),o=t?.querySelector(".Notification-controls-list");o&&t&&(t.setAttribute("data-tether-anchor",""),e.addEventListener("click",n=>{(0,r.H0)(o,e),(0,r.AM)(o,e,t)}),(0,r.D1)(o,e))}),(0,n.A)('.frame.loaded[name^="notification-action-popup-"]',e=>{const t=e.getAttribute("name"),o=document.querySelector(["a","form"].map(e=>`${e}[target="${t}"].Notification-action`).join(", ")),n=o?.closest(".Notification-actionBar"),i=n?.querySelector(".Notification-actionRefresh > a");i?.click()}),(0,n.A)(".Notification-actionResultUrl[data-redirect-delay]",e=>{const t=e.querySelector(".Notification-actionResultUrl-countdown"),o=e.querySelector(".Notification-actionResultUrl-link");if(null==t||null==o)return;const n=e?.getAttribute("data-redirect-delay");if(null==n)return;let i=parseInt(n);if(isNaN(i))return;const r=setInterval(()=>{i-=100,t.textContent=Math.ceil(i/1e3).toString(),i<=0&&(clearInterval(r),o.click())},100);o.addEventListener("click",()=>{clearInterval(r),t.textContent="0"})}),(0,n.A)(".Notification-actionBar",e=>{const t=e.getAttribute("actionLimit"),o=(0,i.A)("ul",{className:"Actions-controlsList Dropdown",role:"menu"}),n=e.querySelectorAll(".Notification-action");let a=0,s=0;if(n.forEach(e=>{if(!t||a<parseInt(t))return void a++;const n=(0,i.A)("li");n.appendChild(e),o.appendChild(n),a++,s++}),0===s)return;const c=(0,i.A)("div",{className:"Actions-controls"}),p=(0,i.A)("button",{className:"Additional-actionsToggle",type:"button",id:"Additional-actionsToggle","aria-haspopup":"menu","aria-expanded":"false",onclick:()=>{(0,r.H0)(o,p),(0,r.AM)(o,p,c)}});(0,r.D1)(o,p),c.appendChild(p),c.appendChild(o),c.setAttribute("data-tether-anchor",""),e.appendChild(c)})},7176(e,t,o){"use strict";o.d(t,{r:()=>l}),o(44764),o(84978),o(25809),o(91672);var n=o(17319);function i(e,t,o,n){var i=r();if(n)for(var b=0;b<n.length;b++)i=n[b](i);var M=t(function(e){i.initializeInstanceElements(e,d.elements)},o),d=i.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(p(r.descriptor)||p(i.descriptor)){if(c(r)||c(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(c(r)){if(c(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}s(r,i)}else t.push(r)}return t}(M.d.map(a)),e);return i.initializeClassElements(M.F,d.elements),i.runClassFinishers(M.F,d.finishers)}function r(){r=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!c(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?d(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=M(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:b(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=b(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function a(e){var t,o=M(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function s(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function c(e){return e.decorators&&e.decorators.length}function p(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function b(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function M(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}const l=e=>i(null,function(e,t){return{F:class extends t{constructor(...t){super(),e(this),this.placeholderEditable=!1}},d:[{kind:"field",key:"_input",value:void 0},{kind:"field",key:"_originalPlaceholder",value:void 0},{kind:"field",decorators:[(0,n.MZ)()],key:"placeholder",value:void 0},{kind:"field",decorators:[(0,n.MZ)({type:Boolean,attribute:"placeholder-editable"})],key:"placeholderEditable",value:()=>!1},{kind:"get",key:"input",value:function(){return this._input}},{kind:"set",key:"input",value:function(e){e&&(this.placeholder&&(e.placeholder=this.placeholder),this.placeholderEditable&&e.setAttribute("data-editable-placeholder",""),this._input?.isEqualNode(e)||(this._input=e,this.onInputElementChanged()))}},{kind:"get",key:"value",value:function(){return this._input?.value}},{kind:"set",key:"value",value:function(e){void 0!==e&&this._input&&(this._input.value=e)}},{kind:"method",key:"onInputElementChanged",value:function(){this.placeholderEditable&&(this._input?.addEventListener("blur",this.handleBlur.bind(this)),this._input?.addEventListener("focus",this.handleFocus.bind(this)),this._input?.addEventListener("mouseenter",this.handleFocus.bind(this)),this._input?.addEventListener("mouseleave",this.handleBlur.bind(this)))}},{kind:"method",key:"handleFocus",value:function(){this.value||(this.value=this._originalPlaceholder=this._input?.placeholder||"")}},{kind:"method",key:"handleBlur",value:function(){document.activeElement!==this._input&&this.value===this._originalPlaceholder&&(this.value="")}}]}},e)},76095(e,t,o){"use strict";(0,o(56155).A)(".Popup.loaded[name=PostPublishActionsPage] .PostPublish-form",e=>{const t=e.querySelector(".Message");t?.scrollIntoView({behavior:"smooth",block:"end"})})},36458(e,t,o){"use strict";o(84978),o(25809);var n=o(56155),i=o(1439);(0,n.A)(".PrePublish",e=>{const t=e.querySelector(".PrePublish-cancel"),o=e.dataset.prepublish,n=document.querySelector(`form[data-content-id="${o}"]`),r=e.querySelector('button[type="submit"]');r&&r.addEventListener("click",()=>{i(n).trigger("submit")}),t?.addEventListener("click",()=>{e.classList.remove("is-visible"),window.BRIGHTSPOT?.ui.cms.enableV5UI&&e.dispatchEvent(new CustomEvent("legacy.popup.close",{bubbles:!0}))});const a=e.querySelectorAll(".CIG:not(.TC) > [data-tab].TC-unselected");Array.from(a).forEach(e=>{e.classList.remove("TC-unselected")})})},1607(e,t,o){"use strict";o.d(t,{A:()=>r});var n=o(38745),i=o(68243);class r{static onFindFunction(e,t){return o=>{const n=new r(e,t,parseInt(o.style.getPropertyValue("--progress")));(0,i.A)(n.getElement(),o),o.hidden=!0}}constructor(e,t,o=0){this._circumference=void 0,this._element=void 0,this._value=0;const i=(0,n.A)("div"),r=e/2,a=r-t/2;if(this._circumference=2*Math.PI*a,i.innerHTML=`\n <svg class="RPB" viewBox="0 0 ${e} ${e}">\n <circle\n class="RPB-bg"\n cx="${r}"\n cy="${r}"\n r="${a}"\n stroke-width="${t-1}"\n />\n <circle\n class="RPB-fg"\n cx="${r}"\n cy="${r}"\n r="${a}"\n stroke-width="${t}"\n stroke-dasharray="${this._circumference}"\n stroke-dashoffset="${this._circumference}"\n />\n </svg>\n `,!(i.firstElementChild instanceof SVGElement))throw new Error("SVG not found");this._element=i.firstElementChild,this.setValue(o)}getElement(){return this._element}getValue(){return this._value}setValue(e){this._value=e,this._element.querySelector(":scope > .RPB-fg")?.setAttribute("stroke-dashoffset",""+this._circumference*(1-e/100))}}},17630(e,t,o){"use strict";var n=o(56155),i=o(25734),r=o(66556),a=o(1439);(0,n.A)("btu-widget.SearchWidget-moreFilters",e=>{const t=()=>{e.collapsed?e.heading=e.dataset.moreFiltersLabel:e.heading=e.dataset.lessFiltersLabel};t(),e.addEventListener("btu-widget-toggle",()=>{t()})}),(0,n.A)(".SearchWidget.DashboardWidget",e=>{const t=e.closest(".DashboardRow-column");t?.classList.add("is-search-widget")}),(0,n.A)(".SavedSearches-more",e=>{e.addEventListener("click",()=>{const t=e.nextSibling;(0,r.AM)(t,e)})}),(0,n.A)(".SavedSearches-more-dropdown-delete",e=>{e.addEventListener("click",t=>{e.dataset.deleted&&(0,i.iP)(e.dataset.deleted)})}),(0,n.A)(".SearchWidget-dateRangeSelect",e=>{const t=e=>{const t=e.value;if(!e.parentNode)return;const o=e.parentNode.querySelectorAll(".SearchWidget-dateRange");for(const e of o){const o=t!==e.dataset.class;e.hidden=o;for(const t of e.querySelectorAll("input"))t.disabled=o}};t(e),e.addEventListener("change",({target:e})=>{e instanceof HTMLSelectElement&&t(e)})}),(0,n.A)(".SearchWidget-toolEntityFilterSelect",e=>{const t=e=>{if(!e.parentNode)return;const t=e.value,o=e.parentNode.querySelector(".toolEntityDropdown-container");o&&(o.hidden="com.psddev.cms.ui.search.SelectToolEntityFilter"!==t)};t(e),e.addEventListener("change",({target:e})=>{e instanceof HTMLSelectElement&&t(e)})}),(0,n.A)(".SearchWidget-collections > .SearchWidget-filter:not(:last-child) > select",e=>{e.textContent||e.parentNode instanceof HTMLElement&&e.parentNode.remove()}),(0,n.A)(".SearchWidget-reset",e=>{e.addEventListener("click",()=>{if(!a(e).popup("source"))return;const t=a(e).popup("source")[0];if(t)if(t instanceof HTMLAnchorElement){const o=e.closest(".SearchWidget-controls");if(o){const e=o.querySelector("form.searchFiltersRest");e instanceof HTMLFormElement&&e.reset()}t.click()}else if(t instanceof HTMLFormElement){t.reset();const e=t.querySelector('[name="rf"]'),o=t.querySelector('[name="st"]');e&&(e.value="true"),t.requestSubmit(),e&&(e.value="false"),o&&(o.value="")}return!1})}),(0,n.A)(".searchFiltersType",e=>{e.addEventListener("change",()=>{const t=e.closest(".Page")?.querySelector('form.Page-search input[name="st"]'),o=e.querySelector('select[name="st"]');t&&o&&t instanceof HTMLInputElement&&o instanceof HTMLSelectElement&&(t.value=o.value)});const t=e.querySelector('input[name="q"]');if(!(t&&t instanceof HTMLInputElement))return;const o=e.closest('.Popup[name="miscSearch"]')?document.querySelector('.Page-search input[name="q"]'):e.nextElementSibling?.querySelector('input[name="q"]');o&&o instanceof HTMLInputElement&&!o.value&&document.activeElement!==o&&(o.value=t.value)})},18755(e,t,o){"use strict";o(84978),o(13722),o(25809),o(91672);var n=o(56155),i=o(88903),r=o(26791);function a(){const e=new Set,t=document.getElementsByClassName("ContentSelector-select");Array.from(t).filter(e=>null!==e.firstChild).forEach(t=>{const o=t.firstChild,n=o?.getAttribute("value"),i=t.parentNode;n&&!i.classList.contains("is-removing")&&e.add(n)}),function(e){const t="is-added";document.querySelectorAll(".Suggestion-add").forEach(o=>{if(null!==o){const n=o.dataset.suggestionId;n&&e.has(n)?o.classList.add(t):o.classList.remove(t)}})}(e)}(0,n.A)(".Suggestion-add",e=>{e.addEventListener("click",()=>{e.dataset.label&&(function(e,t){const o=e.closest("form[data-content-id]");if(!o)return;const i=e.dataset.fieldName;if(!i)return;const r=o.querySelector(`div[data-field-name="${i}"]`);if(!r)return;const a=r.querySelector(".addButton");let s;if(a){a.click();const e=r.querySelector(".repeatableObjectId"),t=e?.classList.contains("addToTop");s=t?r.querySelector(":first-child > input.objectId"):r.querySelector(":last-child > input.objectId")}else s=r.querySelector("input.objectId");if(!s)return;s.setAttribute("data-label",t),s.setAttribute("data-label-html",t);const c=e.dataset.suggestionId;if(c&&(s.value=c),a){const t=s.closest("li");if(t){const o=e.dataset.typeId;o&&t.setAttribute("data-sortable-item-type",o),(0,n.A)(t,":scope .ComboInput[aria-expanded=true]",e=>{e.click()})}}else r.querySelectorAll(".is-removing").forEach(e=>{e.classList.remove("is-removing")});const p=document.createEvent("HTMLEvents");p.initEvent("change",!0,!1),s.dispatchEvent(p),r.scrollIntoView()}(e,e.dataset.label),a())})}),(0,n.A)("button[data-suggestions-url]",e=>{const t=e.dataset.suggestionsUrl;t&&(e.addEventListener("click",async()=>{if(!e.classList.contains("is-refreshing"))try{const o=e.closest(".frame");if(!o)return;e.classList.add("is-refreshing");const n=o.closest("form");if(!n)return;const r=new FormData(n),a=new Headers,s=i.A.get("bsp.csrf");s&&a.append("Brightspot-CSRF",s);const c=await fetch(t,{method:"POST",headers:a,body:r}),p=await c.text();e.classList.remove("is-refreshing"),o.innerHTML=p}catch(e){console.error(e)}}),a())}),(0,n.A)(".Suggestions-list-add",e=>{const t=Array.from(e.querySelectorAll(".Suggestion-add[data-suggestion-id]")).map(e=>e.dataset.suggestionId).filter(e=>void 0!==e);0===e.childNodes.length&&e.parentNode instanceof HTMLElement&&(e.parentNode.style.display="none"),r.A.receive("com.psddev.cms.tool.page.content.PublishBroadcast",e=>{const o=e,n=o.mainObjectId||o.contentId;-1===t.indexOf(n)&&setTimeout(()=>{const e=document.querySelector("button[data-suggestions-url]");e&&e.click()},2e3)})})},5739(e,t,o){"use strict";o.d(t,{A:()=>f}),o(44764),o(84978),o(25809),o(91672);var n=o(88903),i=o(29171),r=o(17319),a=o(80133),s=o(79911);function c(){c=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!M(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?z(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=O(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:l(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=l(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function p(e){var t,o=O(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function b(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function M(e){return e.decorators&&e.decorators.length}function d(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function l(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function u(e,t,o,n){return u="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(e,t,o,n){var i,r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(r){if((i=Object.getOwnPropertyDescriptor(r,t)).set)return i.set.call(n,o),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(n,t)){if(!i.writable)return!1;i.value=o,Object.defineProperty(n,t,i)}else!function(e,t,o){(t=O(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o}(n,t,o);return!0},u(e,t,o,n)}function O(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}let f=(h=[(0,r.EM)("btu-toggleable")],m=(0,a.m)((0,s.s)(i.WF)),q=c(),_=function(e,t){class o extends t{constructor(){super(),e(this),this._forms=[],this._root=window.document.body}}return{F:o,d:[{kind:"get",static:!0,key:"tagName",value:function(){return"btu-toggleable"}},{kind:"field",key:"_forms",value:void 0},{kind:"field",key:"_root",value:void 0},{kind:"field",key:"_select",value:void 0},{kind:"field",decorators:[(0,r.MZ)({attribute:"root-selector"})],key:"rootSelector",value:void 0},{kind:"method",key:"find",value:function(){return this.querySelector(":scope > select")}},{kind:"set",key:"child",value:function(e){(function(e,t,o,n,i,r){!function(e,t,o,n,i){if(!u(e,t,o,n||e)&&i)throw new TypeError("failed to set property")}(A(r?e.prototype:e),t,o,n,i)})(o,"_child",e,this,1,1),this._select=e,this.addEventListener("change",this._handleChange),this._handleChange()}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"disconnectedCallback",value:function(){this.removeEventListener("change",this._handleChange)}},{kind:"method",key:"willUpdate",value:function(e){if(e.has("rootSelector"))if(this.rootSelector&&"string"==typeof this.rootSelector){const e=this._select?.closest(this.rootSelector);e instanceof HTMLElement?this._root=e:console.error("Querying for the rootSelector did not return a valid HTML element.")}else null!=this.rootSelector&&console.error("An invalid rootSelector was provided. Expected non-empty string.")}},{kind:"method",key:"_handleChange",value:function(){if(this._select?.matches("[disabled]"))return;const e=this._select?.options[this._select.selectedIndex],t=this._select?.dataset.selectedId,o=this._select?.dataset.selectedType;let n="",i="";if(t){const e=document.querySelector('.objectInputs[data-id="'+t+'"]');e&&(e.querySelectorAll("[name]").forEach((e,t)=>{if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement){const{name:o,value:n}=e;i+=(0===t?"":"&")+encodeURIComponent(o)+"="+encodeURIComponent(n)}}),o&&(n="&convert=true&convertType="+encodeURIComponent(o)+"&convertId="+encodeURIComponent(t)))}this._toggle(e?.dataset.hide,!0,null,null),this._toggle(e?.dataset.show,!1,n,i),e&&this._setSelected(e)}},{kind:"method",key:"_toggle",value:function(e,t,o,i){let r;const a=[];if(e){if(e=(e=":scope "+e.replaceAll(", ",", :scope ")).replaceAll(":scope :scope ",":scope "),r=this._root.querySelectorAll(e),!t){const e=[];r.forEach(t=>{const o=t.querySelectorAll(":scope > .toggleable-form[data-form-fields-url]");o?.forEach(t=>e.push(t))}),e?.forEach(e=>{if(e.dataset.formFieldsInFlight)return;const t={element:e,fieldData:e.dataset.formFieldsData||"",fieldUrl:e.dataset.formFieldsUrl||""},r=t.fieldUrl;let a="data="+encodeURIComponent(t.fieldData);o&&(a+=o),i&&(a+="&"+i),e.dataset.formFieldsInFlight="true",(async()=>{try{const e=await fetch(r,{method:"POST",credentials:"include",headers:{"Brightspot-CSRF":n.A.get("bsp.csrf")||"","Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},cache:"no-cache",body:a});t.element.innerHTML=await e.text(),e.ok?(delete t.element.dataset.formFieldsUrl,delete t.element.dataset.formFieldsData,t.element.dispatchEvent(new CustomEvent("create",{bubbles:!0})),t.element.dispatchEvent(new Event("load")),t.element.dispatchEvent(new UIEvent("resize"))):t.element.dispatchEvent(new CustomEvent("error",{bubbles:!0,detail:{message:e.text(),code:e.status}}))}finally{delete t.element.dataset.formFieldsInFlight}})(),this._forms.push(t)})}r.forEach(e=>{e.querySelectorAll("input, textarea, select, button").forEach(e=>{a.push(e)}),e.matches("input, textarea, select, button")&&a.push(e),e.setAttribute("style",t?"display: none;":""),e.querySelector(".toggleable")?.dispatchEvent(new CustomEvent("create",{bubbles:!0})),e.dispatchEvent(new UIEvent("resize"))}),a.forEach(e=>{e.toggleAttribute("disabled",t)})}}},{kind:"method",key:"_setSelected",value:function(e){this._select&&(this._select.dataset.selectedId=e.value,this._select.dataset.selectedType=e.dataset.type||"")}}]}}(function(e){q.initializeInstanceElements(e,W.elements)},m),W=q.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(d(r.descriptor)||d(i.descriptor)){if(M(r)||M(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(M(r)){if(M(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}b(r,i)}else t.push(r)}return t}(_.d.map(p)),h),q.initializeClassElements(_.F,W.elements),q.runClassFinishers(_.F,W.finishers));var h,m,q,_,W},7069(e,t,o){"use strict";var n=o(56155),i=o(66556);(0,n.A)(".TranslationsTab-actionsToggle",e=>{const t=e.closest(".TranslationsTab-actionsWrapper");if(t){const o=t.querySelector(".TranslationsTab-actions");o&&((0,i.D1)(o,e),e.addEventListener("click",t=>{(0,i.AM)(o,e)}))}})},79911(e,t,o){"use strict";function n(e,t){return e.get(i(e,t))}function i(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o.d(t,{L:()=>r,s:()=>a}),o(84978),o(39589);const r=(e,t,o)=>{if(e.parentElement instanceof t)return;const n=new t;o&&o(n),e.parentNode?.insertBefore(n,e),n.appendChild(e)},a=e=>{var t=new WeakMap;return class extends e{constructor(...e){var o,n,i;super(...e),this._child=void 0,i=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(o=this,n=t),n.set(o,i)}get child(){return this._child}set child(e){this._child=e}find(){return null}connectedCallback(){super.connectedCallback();const e=this.find();var o,r;e&&(this.child=e),o=t,r=new MutationObserver(async e=>{const t=this.find();t&&(this.child=t)}),o.set(i(o,this),r),n(t,this).observe(this.renderRoot,{childList:!0,subtree:!1})}disconnectedCallback(){super.disconnectedCallback(),n(t,this)?.disconnect()}}}},70894(e,t,o){"use strict";o(44764),o(84978),o(25809),o(91672);var n,i=o(29171),r=o(17319),a=o(76904),s=o(80133),c=o(56155),p=o(22274),b=o(36500),M=(o(67219),o(13722),o(39589),o(15483)),d=o(45891),l=function(e){return e.ModalClose="modal-close",e.PageHeader="page-header",e.PageNav="page-nav",e.PageGuide="page-guide",e.PageAskAi="page-ask-ai",e.LeftNav="left-nav",e.ContentEditTop="content-edit-top",e.PageMain="page-main",e.ContentEditDrawer="content-edit-drawer",e.ContentEditPreview="content-edit-preview",e.ContentEditRight="content-edit-right",e.ContentEditToolbar="content-edit-toolbar",e}(l||{});class z{static resolveRegionOrder(){const e=window.BRIGHTSPOT?.focusRegions;if(!e||"object"!=typeof e||0===Object.keys(e).length)return z.DEFAULT_REGION_ORDER;const t=Object.entries(e),o=t.filter(([,e])=>"number"!=typeof e||!isFinite(e));return o.length>0?(console.warn("FocusRegionManager: focusRegions config contains non-numeric values; falling back to default order.",Object.fromEntries(o)),z.DEFAULT_REGION_ORDER):t.sort((e,t)=>e[1]-t[1]).map(([e])=>e)}constructor(){this.registeredRegions=new Map,this.lastFocusedElements=new Map,this.keyboardHandler=null,this.initKeyboardListeners()}static getInstance(){return this.instance||(this.instance=new z),this.instance}register(e){if(!e.id||!e.element)return void console.warn("FocusRegionManager: Invalid config provided to register()",e);const t=e.element.closest(".ProseMirror-fullscreen-container")??e.element.closest("dialog[open]")??document.body,o=this.registeredRegions.get(t)||new Map;o.set(e.id,e),this.registeredRegions.set(t,o)}registerFromAttribute(e){const t=e.getAttribute("data-focus-region");if(!t)return;const o=e.closest(".ProseMirror-fullscreen-container")??e.closest("dialog[open]")??document.body,n=this.registeredRegions.get(o);n?.has(t)||(z.REGION_ORDER.includes(t)?this.register({id:t,element:e}):console.warn(`FocusRegionManager: region "${t}" is not in REGION_ORDER and will be excluded from navigation.`))}destroyLayer(e){this.registeredRegions.delete(e),this.lastFocusedElements.delete(e)}isRegionVisible(e){const t=e.element;return!(!t.isConnected||t.hasAttribute("inert")||t.hidden||!t.checkVisibility({visibilityProperty:!0,opacityProperty:!0})||e.isHidden&&e.isHidden()||!this.hasFocusableDescendants(t))}getVisibleRegions(e){return e&&e.isConnected&&this.registeredRegions.has(e)?z.REGION_ORDER.filter(t=>this.registeredRegions.get(e)?.has(t)).map(t=>this.registeredRegions.get(e).get(t)).filter(e=>this.isRegionVisible(e)):(console.warn("FocusRegionManager: Specified layer is not valid for getting visible regions",e),[])}getCurrentIndex(e){const t=document.activeElement;return e.findIndex(e=>e.element.contains(t))}saveCurrentFocus(e,t){const o=document.activeElement;if(o===document.body)return;const n=t.find(e=>e.element.contains(o));if(!n)return;let i=this.lastFocusedElements.get(e);i||(i=new Map,this.lastFocusedElements.set(e,i)),i.set(n.id,o)}nextRegion(e){const t=this.getVisibleRegions(e);if(0===t.length)return;this.saveCurrentFocus(e,t);const o=(this.getCurrentIndex(t)+1)%t.length;this.focusRegion(t[o],e)}previousRegion(e){const t=this.getVisibleRegions(e);if(0===t.length)return;this.saveCurrentFocus(e,t);const o=this.getCurrentIndex(t),n=o<1?t.length-1:o-1;this.focusRegion(t[n],e)}focusRegion(e,t){let o=null;const n=this.lastFocusedElements.get(t)?.get(e.id);if(n?.isConnected&&this.isElementFocusable(n)&&(o=n),!o){const t=e.preferredFocus?.();t&&t.isConnected&&this.isElementFocusable(t)&&(o=t)}if(!o)try{const t=(0,M.Kr)(e.element);for(const e of t)if(this.isElementFocusable(e)){o=e;break}}catch(e){console.warn("FocusRegionManager: Error finding tabbable elements",e)}o||(o=e.element);try{o?.focus(),o?.scrollIntoView({behavior:"smooth",block:"nearest"}),o?.classList.add("is-focusRegionTarget"),setTimeout(()=>{o?.classList.remove("is-focusRegionTarget"),o?.classList.add("was-focusRegionTarget"),o?.addEventListener("transitionend",()=>{o?.classList.remove("was-focusRegionTarget")},{once:!0})},500)}catch(e){console.warn("FocusRegionManager: Error focusing element",e,o)}}isElementFocusable(e){return!e.hasAttribute("inert")&&!e.hidden&&e.checkVisibility({visibilityProperty:!0,opacityProperty:!0})}hasFocusableDescendants(e){try{const t=(0,M.Kr)(e);for(const e of t)if(this.isElementFocusable(e))return!0}catch(t){console.warn("FocusRegionManager: Error finding tabbable elements",t,e)}return!1}getTopLayer(){const e=document.querySelector(".ProseMirror-fullscreen-container:not(.hide)");if(e)return e;const t=document.querySelectorAll("dialog[open]");return t.length>0?t[t.length-1]:document.body}getRegionLabel(e){if(e.label)return e.label;const t=e.element,o=t.getAttribute("aria-label");if(o)return o;const n=t.getAttribute("aria-labelledby");if(n){const e=document.getElementById(n);if(e?.textContent)return e.textContent.trim()}return null}isLayerRegistered(e){return this.registeredRegions.has(e)}isRegionShortcut(e){return!(!e.altKey||"Tab"!==e.key)||!d.cX&&"F6"===e.key}initKeyboardListeners(){this.keyboardHandler=e=>{if(this.isRegionShortcut(e)){const t=this.getTopLayer();if(!this.isLayerRegistered(t))return void console.warn("FocusRegionManager: No registered regions for the current layer",t);e.preventDefault(),e.stopPropagation(),e.shiftKey?this.previousRegion(t):this.nextRegion(t)}},document.addEventListener("keydown",this.keyboardHandler,!0)}}n=z,z.DEFAULT_REGION_ORDER=[l.ModalClose,l.PageHeader,l.PageNav,l.PageGuide,l.PageAskAi,l.LeftNav,l.ContentEditTop,l.PageMain,l.ContentEditDrawer,l.ContentEditPreview,l.ContentEditRight,l.ContentEditToolbar],z.REGION_ORDER=n.resolveRegionOrder(),z.instance=null;const u=z.getInstance();function O(){O=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!h(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?W(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=_(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:q(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=q(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function A(e){var t,o=_(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function f(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function h(e){return e.decorators&&e.decorators.length}function m(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function q(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function _(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function g(e,t,o,n){var i=y(v(1&n?e.prototype:e),t,o);return 2&n&&"function"==typeof i?function(e){return i.apply(o,e)}:i}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},y.apply(null,arguments)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}var L,w,R,k,T;L=[(0,r.EM)("btu-dialog")],w=(0,a.j)((0,s.m)(i.WF)),R=O(),k=function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"get",static:!0,key:"tagName",value:function(){return"BTU-DIALOG"}},{kind:"field",decorators:[(0,r.nJ)(":scope > dialog")],key:"_dialog",value:void 0},{kind:"field",decorators:[(0,r.MZ)({type:Boolean})],key:"_unsavedChanges",value:()=>!1},{kind:"field",key:"_contextObserver",value:void 0},{kind:"field",key:"_popupElement",value:void 0},{kind:"field",decorators:[(0,r.MZ)({attribute:"auto-open",type:Boolean})],key:"autoOpen",value:()=>!0},{kind:"field",decorators:[(0,r.MZ)({attribute:"remove-on-close",type:Boolean})],key:"removeOnClose",value:()=>!0},{kind:"field",decorators:[(0,r.MZ)({type:String,reflect:!0,attribute:"enter-from"})],key:"enterFrom",value:()=>"center"},{kind:"field",decorators:[(0,r.MZ)({type:Boolean,reflect:!0})],key:"loaded",value:()=>!1},{kind:"set",key:"unsavedChanges",value:function(e){const t=this._unsavedChanges;this._unsavedChanges=e,t!==e&&this.dispatchEvent(new CustomEvent("btu-dialog-unsaved-changes-state-changed",{detail:e,bubbles:!0,composed:!0}))}},{kind:"method",key:"_setupChangeDetection",value:async function(e){const t=()=>{const t=!!e.classList.contains("state-changed")||!!e.querySelector(".state-changed"),o=e.classList.contains("is-processingFiles");this.unsavedChanges=t||o},o=new MutationObserver(()=>{requestAnimationFrame(t)});o.observe(e,{attributes:!0,attributeFilter:["class"],subtree:!0}),(0,p.A)(e,()=>{o.disconnect(),this.unsavedChanges=!1}),t(),this.addEventListener("btu-dialog-closed",()=>{o.disconnect()},{once:!0})}},{kind:"method",key:"_cachePopupElement",value:function(){this._popupElement||(this._popupElement=this.querySelector(":scope > dialog > .Popup")||void 0)}},{kind:"method",key:"_detectEnterFrom",value:function(){this._popupElement&&(this._popupElement.classList.contains("is-fromRight")?this.enterFrom="right":this._popupElement.classList.contains("is-fromLeft")?this.enterFrom="left":this.enterFrom="center")}},{kind:"method",key:"_detectLoadedState",value:function(){if(!this._popupElement)return;const e=this._popupElement.classList.contains("loaded")&&this._popupElement.classList.contains("is-ready")&&this._popupElement.classList.contains("is-visible");this.loaded=e}},{kind:"method",key:"_isRelevantElement",value:function(e){const t=".ActionBar, .Message, .Admin, form, .TC, .AIChat-wrapper, .fixedScrollable";return e.matches(t)||null!==e.querySelector(t)}},{kind:"method",key:"_findInScope",value:function(e,t){const o=[];return e instanceof Element&&e.matches(t)&&o.push(e),o.push(...Array.from(e.querySelectorAll(t))),o}},{kind:"method",key:"_setupContextObserver",value:function(e){let t;const o=new Set;this._contextObserver=new MutationObserver(e=>{let n=!1,i=!1;for(const t of e){if("childList"===t.type)for(const e of t.addedNodes)e instanceof Element&&((e.matches(".Popup")||null!==e.querySelector(".Popup"))&&(this._popupElement=void 0,this._cachePopupElement(),n=!0,i=!0),this._isRelevantElement(e)&&o.add(e));if("attributes"===t.type&&"class"===t.attributeName){const e=t.target;e instanceof Element&&e.matches(".Popup")&&(i=!0)}}n&&this._detectEnterFrom(),i&&this._detectLoadedState(),0!==o.size&&(t||(t=window.requestAnimationFrame(()=>{o.forEach(e=>this._annotateDialogContext(e)),o.clear(),t=0})))}),this._contextObserver.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}},{kind:"method",key:"_markAncestors",value:function(e,t,o){let n=e.parentElement;for(;n&&n!==o&&!n.classList.contains(t);)n.classList.add(t),n=n.parentElement}},{kind:"method",key:"_annotateDialogContext",value:function(e){const t=this.querySelector(":scope > dialog");if(!t)return;const o=t.querySelector(".Popup-content");if(!o)return;if(!e&&o.classList.contains("has-ActionBar"))return;const n=e||t,i=o.classList.contains("is-editing");t.querySelector(".Admin .Admin-nav")&&o.classList.add("has-AdminNav");const r=o.classList.contains("has-AdminNav");if(i||r)return;const a=this._findInScope(n,".ActionBar");0!==a.length&&(o.classList.add("has-ActionBar"),a.forEach(e=>{e.querySelector(":scope > *:not(.ImageEditor-closeButton)")&&this._markAncestors(e,"has-ActionBarContent",o)}),this._findInScope(n,'.Message.is-success, .Widget-title + .Message.is-error, .Widget-title + .Message.message-info, .PostPublish-form .Message.is-error, form[action*="translation/request"] > .Message').forEach(e=>{this._markAncestors(e,"has-StatusMessage",t)}),this._findInScope(n,"form, .TC, .AIChat-wrapper, .fixedScrollable").forEach(e=>{const t=e.nextElementSibling?.classList.contains("ActionBar"),o=e.classList.contains("fixedScrollable")&&e.closest(".Widget.PrePublish");t&&!o&&e.classList.add("before-ActionBar")}))}},{kind:"method",key:"_handleClose",value:async function(e){if(e?.defaultPrevented)return;const t=await this._dialog;t&&(!this._unsavedChanges||confirm(window.BRIGHTSPOT?.ui.tooltips.confirmPopupUnsaved)?(t.close(),this.emit("btu-dialog-closed"),u.destroyLayer(t),this._popupElement&&window.jQuery?.(this._popupElement).trigger("close.popup"),this.removeOnClose&&this.remove()):e?.preventDefault())}},{kind:"method",key:"connectedCallback",value:async function(){g(o,"connectedCallback",this,3)([]),this.id=`i${(0,b.A)()}`}},{kind:"method",key:"disconnectedCallback",value:async function(){g(o,"disconnectedCallback",this,3)([]),this._contextObserver?.disconnect(),this._contextObserver=void 0,this._popupElement=void 0,await(this._dialog?.then(e=>{e.removeEventListener("cancel",this._handleClose),e.close()}))}},{kind:"method",key:"firstUpdated",value:async function(){(0,c.A)(`#${this.id} form`,e=>{this._setupChangeDetection(e)}),await(this._dialog?.then(e=>{const t=this.querySelector(":scope > .Popup, :scope > .QueryField-frame, :scope > .ContentEdit-workflow, :scope > *:not(dialog)");t&&(e.addEventListener("cancel",e=>{e.defaultPrevented||this._handleClose(e)}),e.appendChild(t),this._cachePopupElement(),this._detectEnterFrom(),this._annotateDialogContext(),this._detectLoadedState(),this._setupContextObserver(e))})),this.autoOpen&&(this.querySelector(':scope > dialog > .Popup[name="miscSearch"')?await(this._dialog?.then(e=>e.show())):await(this._dialog?.then(e=>e.showModal()))),this.emit("btu-dialog-ready")}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"close",value:function(e){this._handleClose(e)}},{kind:"method",key:"show",value:function(){this._dialog?.then(e=>e.showModal())}},{kind:"method",key:"render",value:function(){return i.qy`<dialog></dialog>`}}]}}(function(e){R.initializeInstanceElements(e,T.elements)},w),T=R.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(m(r.descriptor)||m(i.descriptor)){if(h(r)||h(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(h(r)){if(h(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}f(r,i)}else t.push(r)}return t}(k.d.map(A)),L),R.initializeClassElements(k.F,T.elements),R.runClassFinishers(k.F,T.finishers)},99022(e,t,o){"use strict";o.d(t,{A:()=>h});var n=o(83394),i=(o(44764),o(26594));function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function a(e,t){return e.get(c(e,t))}function s(e,t,o){return e.set(c(e,t),o),o}function c(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var p=new WeakMap,b=new WeakMap,M=new WeakMap,d=new WeakMap;function l(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function z(e,t,o){return e.set(O(e,t),o),o}function u(e,t){return e.get(O(e,t))}function O(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var A=new WeakMap,f=new WeakMap;class h{static get toggles(){return O(h,this,q)._}static toggle(e,t,o){let i,r="boolean"==typeof o&&o;function a(e){return"function"==typeof e}if(a(o)&&(i=o,r=i()),r){const r=new h(e,t);let s;a(o)&&window.addEventListener("click",s=(0,n.A)(o=>{if(!(o instanceof Event))return;const n=o.target;if(n instanceof HTMLElement&&!e.contains(n)&&!t.contains(n)){const t=n.closest("[data-tether-rx]");t&&!t.contains(e)||(i(),void 0!==s&&window.removeEventListener("click",s,!0),r.destroy(),q._.delete(e))}}),!0),q._.set(e,{tether:r,closeListener:s})}else{const t=q._.get(e);t&&(void 0!==t.closeListener&&window.removeEventListener("click",t.closeListener,!0),t.tether.destroy(),q._.delete(e))}return r}static getReference(e){for(const t of m._.tethers)if(u(f,t)===e)return u(A,t);return null}get element(){return u(f,this)}get reference(){return u(A,this)}constructor(e,t){l(this,A,void 0),l(this,f,void 0),z(A,this,e),z(f,this,t),e.classList.contains("ComboInput")&&!t.parentElement?.hasAttribute("data-tether-anchor")&&(null!==e.closest("dialog")?e.closest("dialog")?.append(t):null===e.closest(".Popup")?document.querySelector(".Page")?.append(t):e.closest(".Popup")?.append(t)),m._.add(this)}destroy(){m._.remove(this)}}var m={_:new class{constructor(){r(this,p,void 0),r(this,b,void 0),r(this,M,void 0),r(this,d,void 0),s(p,this,new WeakMap),s(b,this,[]),s(d,this,null),s(M,this,(0,i.A)(this.updateImmediately.bind(this)))}get tethers(){return a(b,this)}add(e){a(b,this).push(e),this.start()}remove(e){const t=a(b,this),o=t.indexOf(e);o>-1&&t.splice(o,1),t.length<0&&this.stop()}start(){this.updateImmediately(),null===a(d,this)&&(window.addEventListener("resize",a(M,this),!0),window.addEventListener("scroll",a(M,this),!0),s(d,this,setInterval(a(M,this),50)))}stop(){null!==a(d,this)&&(window.removeEventListener("resize",a(M,this)),window.removeEventListener("scroll",a(M,this)),clearInterval(a(d,this)),s(d,this,null))}updateImmediately(){const e=a(b,this);if(0===e.length)return;const t=[],o=document.documentElement;let n=o.clientWidth/2,i=o.clientHeight/2;const r="rtl"===o.dir;for(const a of e){const e=a.element,s=a.reference.getBoundingClientRect(),c=s.width,p=s.height;if(0===c&&0===p)continue;let b,M=s.top,d=s.left,l=o.clientWidth;if(e.parentElement?.hasAttribute("popover")){M=a.reference.offsetTop,d=a.reference.offsetLeft;const t=e.parentElement;l=t.clientWidth,n=l/2,i=t.clientHeight/2}let z=d;if(r){const e=l-d-c;z=e,b=e<n?"l":"r"}else b=d<n?"l":"r";t.push({element:e,x:b,y:M+p/2<i?"t":"b",l:`${z}px`,w:`${c}px`,t:`${M}px`,h:`${p}px`})}for(const e of t){const t=e.element,o=a(p,this).get(t)||{},n=t.style;e.x!==o.x&&t.setAttribute("data-tether-rx",e.x),e.y!==o.y&&t.setAttribute("data-tether-ry",e.y),e.l!==o.l&&n.setProperty("--Tether-rl",e.l),e.w!==o.w&&n.setProperty("--Tether-rw",e.w),e.t!==o.t&&n.setProperty("--Tether-rt",e.t),e.h!==o.h&&n.setProperty("--Tether-rh",e.h),a(p,this).set(t,e)}}}},q={_:new WeakMap}},25734(e,t,o){"use strict";o.d(t,{iP:()=>s,tK:()=>p,wC:()=>a}),o(44764);var n=o(56155),i=o(27170),r=o(33582);function a(e,t){return e.replace(/_{3}/g,(o=0,e=>t[o++]));var o}function s(e,t){let o=document.getElementById("aria-live-container");o||(o=document.createElement("div"),o.setAttribute("id","aria-live-container"),document.body.appendChild(o));const n=document.createElement("div"),i="speak-"+Date.now();n.setAttribute("id",i),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.classList.add("screen-reader-only"),t&&t.length&&(e=a(`${e}`,t)),o.appendChild(n),setTimeout(()=>{const t=document.getElementById(i);t&&(t.innerHTML=e)},150),!0===window.BRIGHTSPOT?.ariaDebug&&console.log(`ARIA Announced: "${e}"`),setTimeout(()=>{document.getElementById(i)?.remove()},2e3)}document.addEventListener("DOMContentLoaded",()=>{document.body.addEventListener("btu-announce",e=>{e instanceof CustomEvent&&s(e.detail)})});const c=[];(0,n.A)("[data-aria-announce]",e=>{c.push(e),setTimeout(()=>{if(c.length>0){const e=c.map(e=>"true"===e.dataset.ariaAnnounce?e.textContent:e.dataset.ariaAnnounce).join(", ");c.length=0,s(e)}},2500)}),(0,r.A)([".addButton",".Workflow-addState",".Workflow-addTransition",".calendarButton",".ComboInput"],e=>{const t=e.closest(".CIG-row");if(!t)return;const o=t.querySelector(".Message.is-error");if(!o)return;const n=o.getAttribute("id");n&&(e.setAttribute("aria-describedby",n),e.setAttribute("aria-invalid","true"))}),(0,r.A)('a[role="button"]',e=>{e.addEventListener("keydown",t=>{"Space"===t.code&&(t.preventDefault(),e.click())})});const p=e=>{(0,i.A)(1e3,()=>s(e))}},38745(e,t,o){"use strict";function n(e,...t){const o=document.createElement(e),n=t[0];if(!("object"!=typeof n||Array.isArray(n)||n instanceof Node)){t.shift();for(const[e,t]of Object.entries(n))"dataset"===e?Object.keys(t).forEach(e=>o.dataset[e]=t[e]):void 0===t?o.removeAttribute(e):e in o?Object.assign(o,{[e]:t}):o.setAttribute(e,t)}return i(o,t),o}function i(e,t){if(t)if(Array.isArray(t)||t instanceof NodeList)for(const o of t)i(e,o);else t instanceof Node?e.appendChild(t):e.appendChild(document.createTextNode(t.toString()))}o.d(t,{A:()=>n}),Object.defineProperty(n,"name",{value:"default",configurable:!0}),o(84978),o(25809)},95628(e,t,o){"use strict";function n(e,t){return e?(Array.isArray(t)&&(t=t.join(",")),e.querySelector(t)):null}o.d(t,{A:()=>n}),Object.defineProperty(n,"name",{value:"default",configurable:!0})},40627(e,t,o){"use strict";function n(e,t){return e?(Array.isArray(t)&&(t=t.join(",")),e.querySelectorAll(t)):[]}o.d(t,{A:()=>n}),Object.defineProperty(n,"name",{value:"default",configurable:!0})},47397(e,t,o){"use strict";o.d(t,{l:()=>i,q:()=>r});var n=o(15483);function i(e,t,o=0){const n=t?t.querySelector(e):document.querySelector(e);return n?r(n,o):null}function r(e,t=0){const o=(0,n.Kr)(e,{includeContainer:!0});return 0===o.length?null:{first:o[Math.min(t,o.length-1)],last:o[o.length-1]}}},83394(e,t,o){"use strict";let n;function i(e){return function(...t){if(t[0]instanceof Event||t[0]instanceof window.jQuery.Event){const o=t[0].target;o===n&&e.apply(o,t)}}}o.d(t,{A:()=>i}),window.addEventListener("mousedown",({target:e})=>{n=e})},31400(e,t,o){"use strict";function n(e){return function(...t){if(t[0]instanceof KeyboardEvent){const o=t[0];o.ctrlKey||o.shiftKey||o.altKey||o.metaKey||e.apply(o.target,t)}}}o.d(t,{A:()=>n})},68243(e,t,o){"use strict";function n(e,t){return t?.parentNode?.insertBefore(e,t),e}o.d(t,{A:()=>n})},45594(e,t,o){"use strict";function n(e,t){return t.insertBefore(e,t.firstChild),e}o.d(t,{A:()=>n})},47554(e,t,o){"use strict";function n(e,t){return t.appendChild(e),e}o.d(t,{A:()=>n})},82982(e,t,o){"use strict";o.d(t,{J:()=>r});var n=o(25734),i=o(45891);function r(e,t,o=!0){let n;if("Tab"===e.key&&e.shiftKey)n="back";else{if("Tab"!==e.key)return;n="forward"}o||function(e,t,o){const n=t[t.length-1],i=t[0];if("forward"===o&&e.target===n?.last){const e=n.last;for(let o=0;o<t.length-1;o++){const n=t[o];if(a(n.first,e)||a(n.last,e))return void p()}}if("back"===o&&e.target===i?.first){const e=i.first;for(let o=1;o<t.length;o++){const n=t[o];if(s(n.first,e)||s(n.last,e))return void p()}}}(e,t,n);for(let i=0;i<t.length;i++){const r=t[i];if("forward"===n&&e.target===r.last){const n=t[i+1]||(o?t[0]:void 0);if(n)return e.preventDefault(),void n.first?.focus()}else if("back"===n&&e.target===r.first){const n=t[i-1]||(o?t[t.length-1]:void 0);if(n)return e.preventDefault(),void n.last?.focus()}}}function a(e,t){const o=t.compareDocumentPosition(e);return Boolean(o&Node.DOCUMENT_POSITION_FOLLOWING)}function s(e,t){const o=t.compareDocumentPosition(e);return Boolean(o&Node.DOCUMENT_POSITION_PRECEDING)}let c=0;function p(){const e=Date.now();if(e-c<5e3)return;c=e;const t=window.BRIGHTSPOT?.ui.tooltips?.focusTrapHint;if(!t)return;const o=(0,i.WA)(t);(0,n.iP)(o),function(e){const t=document.getElementById("focus-escape-hint");t&&t.remove();const o=document.createElement("div");o.id="focus-escape-hint",o.textContent=e,o.setAttribute("role","status"),o.style.position="fixed",o.style.bottom="20px",o.style.right="20px",o.style.padding="12px 16px",o.style.backgroundColor="#333",o.style.color="#fff",o.style.borderRadius="4px",o.style.fontSize="14px",o.style.zIndex="10000",o.style.boxShadow="0 2px 8px rgba(0,0,0,0.3)",o.style.pointerEvents="none",document.body.appendChild(o),setTimeout(()=>{o.remove()},4e3)}(o)}},56155(e,t,o){"use strict";o.d(t,{A:()=>T}),o(44764),o(84978),o(13722),o(91672),o(92280);var n=o(59314),i=o.n(n);function r(e,t,o){a(e,t),t.set(e,o)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function s(e,t){return e.get(p(e,t))}function c(e,t,o){return e.set(p(e,t),o),o}function p(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}let b=0;var M=new WeakMap,d=new WeakMap,l=new WeakMap,z=new WeakMap,u=new WeakMap,O=new WeakSet;class A{constructor(e,t,o){var n;a(this,n=O),n.add(this),r(this,M,void 0),r(this,d,void 0),r(this,l,void 0),r(this,z,void 0),r(this,u,void 0),c(M,this,e),c(d,this,"data-ofc"+b++),Array.isArray(t)||(t=[t]),c(l,this,t.map(t.some(e=>e.indexOf(",")>-1)?e=>e:e=>`${e}:not([${s(d,this)}])`).join(",")),c(z,this,o);const i=t.map(e=>e.trim()).filter(e=>e.indexOf(" ")<0&&e.indexOf(",")<0);i.length===t.length&&c(u,this,i)}addTriggerElements(e,t){if(s(M,this).contains(t)){t.matches(s(l,this))&&e.push(t);for(const o of t.querySelectorAll(s(l,this)))e.push(o)}}trigger(e){if("loading"!==document.readyState)if(s(u,this)&&Array.isArray(e))for(const t of e)s(u,this).some(e=>t.matches(e))&&p(O,this,f).call(this,t);else for(const e of s(M,this).querySelectorAll(s(l,this)))p(O,this,f).call(this,e)}}function f(e){if(!y(e)&&!e.hasAttribute(s(d,this))){e.setAttribute(s(d,this),"");try{s(z,this).call(this,e)}catch(t){i().error("Failed callback!",e,t)}}}let h,m=!1,q=!1,_=!1,W=[];const g=[];function y(e){return e instanceof Element&&(null!==e.closest(".CIG-wordCount")||null!==e.closest(".ContentEdit-previewDisplay")||null!==e.closest(".ContentLabel")||null!==e.closest(".PreviewFrame-typeDisplay")||null!==e.closest(".ProseMirrorToolbar")||null!==e.closest(".ProseMirror")||null!==e.closest(".ProseMirrorContainer")||null!==e.closest(".ProseMirror-fullscreen-container")||null!==e.closest(".ProseMirror-comments")||null!==e.closest(".RichTextEditor")||null!==e.closest(".WorkInProgressSaveStatus")||null!==e.closest("#aria-live-container")||null!==e.closest(".widget-urlsAutomatic"))}const v=Array.prototype.every,L=e=>e.nodeType===Node.TEXT_NODE;function w(e){if(m)return void(q=!0);const t=Array.isArray(e),o=[];if(t){for(const t of e){const e=t.target;if(!y(e))switch(t.type){case"attributes":t.oldValue!==e.getAttribute(t.attributeName)&&o.push(t);break;case"childList":v.call(t.addedNodes,L)&&v.call(t.removedNodes,L)||o.push(t)}}if(0===o.length)return}if(o.length>500&&(_=!0),!_)if(t)for(const e of o){const t=e.target;switch(e.type){case"attributes":W.push(t);break;case"childList":for(const e of g)e.addTriggerElements(W,t)}}else _=!0;(_||W.length>0)&&!h&&(h=window.requestAnimationFrame(()=>{const e=_?void 0:W;_=!1,W=[],h=0,g.forEach(t=>t.trigger(e))}))}function R(){document.documentElement.hidden=!1,w(),new MutationObserver(w).observe(document,{attributes:!0,attributeFilter:["class","data-bsp-autosubmit","data-chart-type","data-code-type","data-internal-name","data-tab","name","rel","target"],attributeOldValue:!0,childList:!0,subtree:!0})}function k(e,t,o){let n,i;void 0!==o?(n=e,i=t):(n=document,i=e,o=t);const r=new A(n,i,o);r.trigger(),g.push(r)}document.documentElement.hidden=!0,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",R):R(),k.triggerCallbacks=w,k.pause=()=>{m=!0},k.resume=()=>{m=!1,q&&(q=!1,setTimeout(w,100))};const T=k},41044(e,t,o){"use strict";function n(e,t){if(Array.isArray(e)&&(e=e.join(",")),document.querySelector(e))return void t();let o=!1;const n=new MutationObserver(async()=>{document.querySelector(e)&&(n.disconnect(),o||(o=!0,t()))});n.observe(document,{attributes:!0,childList:!0,subtree:!0})}o.d(t,{A:()=>n})},22274(e,t,o){"use strict";o.d(t,{A:()=>i});let n=!1;function i(e,t){const o=new MutationObserver(i=>{for(const r of i)for(const i of r.removedNodes)i.contains(e)&&!n&&(o.disconnect(),t())});o.observe(document,{childList:!0,subtree:!0})}i.pause=()=>{n=!0},i.resume=()=>{n=!1}},33582(e,t,o){"use strict";o.d(t,{A:()=>r});var n=o(56155);let i=0;function r(e,t){const o="_ovc"+i++,r=new IntersectionObserver(e=>{for(const n of e)if(n.isIntersecting){const e=n.target,i=e.classList;i.contains(o)||(i.add(o),r.unobserve(e),t(e))}});(0,n.A)(e,e=>{r.observe(e)})}},66556(e,t,o){"use strict";o.d(t,{AM:()=>a,D1:()=>r,H0:()=>s}),o(84978),o(13722),o(25809);var n=o(9968),i=o(36500);function r(e,t){!function(e){p(e,"button, a");e.querySelector('[role="menuitem"]')||e.querySelectorAll("button, a").forEach(e=>{e.hasAttribute("role")||(e.setAttribute("role","menuitem"),e.classList.add("Dropdown-item"))})}(e),function(e,t){t.hasAttribute("aria-controls")||(e.id||(e.id=(0,i.A)()),t.setAttribute("aria-controls",e.id))}(e,t),function(e,t){(function(e,t){t.addEventListener("keydown",o=>{const n=e.closest('[role="toolbar"]'),i=n?.getAttribute("aria-orientation");switch(o.key){case"ArrowDown":case"ArrowRight":if(n&&("vertical"===i&&"ArrowDown"===o.key||"vertical"!==i&&"ArrowRight"===o.key))break;t.click(),o.stopPropagation(),o.preventDefault();break;case"ArrowUp":case"ArrowLeft":if(n&&("vertical"===i&&"ArrowUp"===o.key||"vertical"!==i&&"ArrowLeft"===o.key))break;t.click(),"true"===t.getAttribute("aria-expanded")&&e.addEventListener("transitionend",()=>{c(M(b(e)),-1)},{once:!0})}})})(e,t),function(e,t){e.addEventListener("keydown",e=>{switch(e.key){case"Escape":t.click(),t.focus(),e.preventDefault(),e.stopPropagation();break;case"ArrowLeft":case"ArrowUp":c(e.target,-1),e.preventDefault();break;case"ArrowRight":case"ArrowDown":c(e.target,1),e.preventDefault()}})}(e,t),s(e,t)}(e,t)}function a(e,t,o=e){const i=e.querySelector(".ComboInput"),r=o=>{t.classList.contains("is-active")&&"Tab"===o.key&&!e.contains(document.activeElement)&&document.activeElement!==i&&document.activeElement!==t&&t.click()};p(e,'[role="menuitem"]'),n.A.toggle(t,e,()=>{const n=t.classList.toggle("is-active");return n?(t.setAttribute("aria-expanded",!0),window.addEventListener("keyup",r),e.addEventListener("transitionend",()=>{const t=b(e);if(!t?.length)return;const o=M(t);o?.setAttribute("tabindex","0"),o?.focus()},{once:!0})):(t.setAttribute("aria-expanded",!1),window.removeEventListener("keyup",r)),o.classList.toggle("is-open",n)})}function s(e,t){e.querySelectorAll('button, a, [role="menuitem"]').forEach(e=>{e.addEventListener("click",()=>{"true"===t.getAttribute("aria-expanded")&&(t.click(),t.focus())})})}function c(e,t){const o=function(e){if(e)return e.closest(".is-open")||e.closest("ul")}(e),n=b(o);if(!o||!n)return;const i=n.indexOf(e);if(-1===i)return;e.setAttribute("tabindex","-1");const r=o.querySelector("li.focus");if(r&&r.classList.remove("focus"),-1===t){let e=i-1>-1?n[i-1]:n[n.length-1];e.setAttribute("tabindex","0"),e.focus(),r&&e.closest("li")?.classList.add("focus")}if(1===t){let e=i+1<n.length?n[i+1]:n[0];e.setAttribute("tabindex","0"),e.focus(),r&&e.closest("li")?.classList.add("focus")}}function p(e,t){e.querySelectorAll(t).forEach(e=>{e.setAttribute("tabindex","-1")})}function b(e){if(e)return Array.from(e.querySelectorAll('[role="menuitem"]')).filter(e=>!(e.hasAttribute("aria-hidden")||e.closest('[aria-hidden="true"]')||"none"===window.getComputedStyle(e).display||e.classList.contains("screen-reader-only")))}function M(e){for(const t of e)if(t.matches(".is-selected, .selected")||t.parentElement.matches(".is-selected, .selected"))return t;return e[0]}},60489(e,t,o){"use strict";o.d(t,{A:()=>b});var n=o(29171);function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t,o){return e.set(s(e,t),o),o}function a(e,t){return e.get(s(e,t))}function s(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var c=new WeakMap,p=new WeakMap;class b extends n.WF{constructor(...e){super(...e),this.name=void 0,this.type=void 0,this.placeholder=void 0,this.placeholderEditable=void 0,i(this,c,void 0),i(this,p,void 0)}static get tagName(){return"btu-code-input"}static get properties(){return{name:{},type:{},placeholder:{},placeholderEditable:{type:Boolean},value:{}}}get value(){return a(c,this)?a(c,this).getValue():a(p,this)||""}set value(e){a(c,this)?a(c,this).setValue(e||""):r(p,this,e)}createRenderRoot(){return this}render(){return this.name?n.qy`<input type="hidden" name="${this.name}" .value=${this.value} />`:""}async firstUpdated(){const{default:e}=await Promise.all([o.e(2825),o.e(3995),o.e(5781)]).then(o.bind(o,75023));r(c,this,e(this,{indentUnit:4,inputStyle:"contenteditable",lineNumbers:!0,lineWrapping:!0,mode:this.type||"",placeholder:this.placeholder||"",value:this.value||""})),a(c,this).on("change",()=>{this.requestUpdate(),this.dispatchEvent(new Event("change",{bubbles:!0}))}),this.placeholderEditable&&(a(c,this).on("focus",()=>{a(c,this)&&!a(c,this).getValue()&&a(c,this).setValue(this.placeholder||"")}),a(c,this).on("blur",()=>{a(c,this)&&a(c,this).getValue()===this.placeholder&&a(c,this).setValue("")}))}}customElements.define(b.tagName,b)},40704(e,t,o){"use strict";o(44764),o(84978),o(25809),o(91672);var n=o(29171),i=o(17319),r=o(56155),a=o(27170),s=o(36500);function c(){c=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(o){t.forEach(function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}},this)},this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!M(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var p=c.extras;if(p){for(var b=0;b<p.length;b++)this.addElementPlacement(p[b],t);o.push.apply(o,p)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?u(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=z(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:l(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=l(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function p(e){var t,o=z(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function b(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function M(e){return e.decorators&&e.decorators.length}function d(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function l(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function z(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},O.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}let f=(h=[(0,i.EM)("btu-form-filter")],m=n.WF,q=c(),_=function(e,t){class o extends t{constructor(){super(),e(this)}}return{F:o,d:[{kind:"field",static:!0,key:"noFilterTypes",value:()=>new Set(["option","textarea"])},{kind:"field",decorators:[(0,i.MZ)()],key:"noMatches",value:()=>"No Results!"},{kind:"field",decorators:[(0,i.MZ)()],key:"placeholder",value:()=>"Find in form"},{kind:"field",decorators:[(0,i.MZ)()],key:"selector",value:()=>"form > .CIG"},{kind:"field",decorators:[(0,i.wk)()],key:"container",value:void 0},{kind:"method",key:"connectedCallback",value:function(){var e,t,n,i,a;(e=o,t="connectedCallback",n=this,a=O(A(1&(i=3)?e.prototype:e),t,n),2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a)([]),this.selector&&(0,r.A)(this.selector,e=>{this.container=e,new o})}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"field",key:"handleClick",value(){return()=>{const e=this.querySelector(".FormFilter-container"),t=this.querySelector("input");if(t){t.focus();const o=this.classList.toggle("is-open");this.querySelector(".FormFilter-icon")?.classList.toggle("is-open",o),e?.classList.toggle("is-open",o),e?.classList.contains("is-open")?t.focus():(this.removeMessage(),this.container?.classList.remove("is-filtering"),this.container?.querySelectorAll(".is-filterResult").forEach(e=>e.classList.remove("is-filterResult","has-title")),t.blur(),t.value="",y(this))}}}},{kind:"field",key:"handleInput",value(){return()=>{const e=this.querySelector("input");this.container&&e&&(this.removeMessage(),this.querySelectorAll(".is-filterResult").forEach(e=>e.classList.remove("is-filterResult")),this.container.querySelectorAll(".is-filterResult").forEach(e=>e.classList.remove("is-filterResult")),y(this),0===e.value.length?this.container.classList.remove("is-filtering"):(this.container.classList.add("is-filtering","is-loading"),g instanceof Function&&g(this,e?.value)))}}},{kind:"method",key:"getContainer",value:function(){return this.container}},{kind:"method",key:"removeMessage",value:function(){this.container?.parentElement?.querySelector(".FormFilter-message")?.remove()}},{kind:"method",key:"render",value:function(){const e=`i${(0,s.A)()}`;return n.qy`<div class="FormFilter-container">
|
|
35
35
|
<label aria-label="${this.placeholder}"></label>
|
|
36
36
|
<input
|
|
37
37
|
type="text"
|