expedite-components 0.4.3 → 0.4.5

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.
@@ -13,7 +13,7 @@
13
13
  **/const Qr=[];function Qy(e,...n){Ln();const t=Qr.length?Qr[Qr.length-1].component:null,r=t&&t.appContext.config.warnHandler,i=zd();if(r)Cn(r,t,11,[e+n.map(o=>{var a,s;return(s=(a=o.toString)==null?void 0:a.call(o))!=null?s:JSON.stringify(o)}).join(""),t&&t.proxy,i.map(({vnode:o})=>`at <${gu(t,o.type)}>`).join(`
14
14
  `),i]);else{const o=[`[Vue warn]: ${e}`,...n];i.length&&o.push(`
15
15
  `,...Kd(i)),console.warn(...o)}Fn()}function zd(){let e=Qr[Qr.length-1];if(!e)return[];const n=[];for(;e;){const t=n[0];t&&t.vnode===e?t.recurseCount++:n.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return n}function Kd(e){const n=[];return e.forEach((t,r)=>{n.push(...r===0?[]:[`
16
- `],...Xd(t))}),n}function Xd({vnode:e,recurseCount:n}){const t=n>0?`... (${n} recursive calls)`:"",r=e.component?e.component.parent==null:!1,i=` at <${gu(e.component,e.type,r)}`,o=">"+t;return e.props?[i,...Wd(e.props),o]:[i+o]}function Wd(e){const n=[],t=Object.keys(e);return t.slice(0,3).forEach(r=>{n.push(...kc(r,e[r]))}),t.length>3&&n.push(" ..."),n}function kc(e,n,t){return et(n)?(n=JSON.stringify(n),t?n:[`${e}=${n}`]):typeof n=="number"||typeof n=="boolean"||n==null?t?n:[`${e}=${n}`]:tt(n)?(n=kc(e,Pe(n.value),!0),t?n:[`${e}=Ref<`,n,">"]):De(n)?[`${e}=fn${n.name?`<${n.name}>`:""}`]:(n=Pe(n),t?n:[`${e}=`,n])}function Cn(e,n,t,r){try{return r?e(...r):e()}catch(i){Ui(i,n,t)}}function Kt(e,n,t,r){if(De(e)){const o=Cn(e,n,t,r);return o&&Xl(o)&&o.catch(a=>{Ui(a,n,t)}),o}const i=[];for(let o=0;o<e.length;o++)i.push(Kt(e[o],n,t,r));return i}function Ui(e,n,t,r=!0){const i=n?n.vnode:null;if(n){let o=n.parent;const a=n.proxy,s=`https://vuejs.org/error-reference/#runtime-${t}`;for(;o;){const f=o.ec;if(f){for(let c=0;c<f.length;c++)if(f[c](e,a,s)===!1)return}o=o.parent}const u=n.appContext.config.errorHandler;if(u){Cn(u,null,10,[e,a,s]);return}}Gd(e,t,i,r)}function Gd(e,n,t,r=!0){console.error(e)}let Zr=!1,ba=!1;const gt=[];let an=0;const Tr=[];let Mn=null,Yn=0;const Oc=Promise.resolve();let Ca=null;function sn(e){const n=Ca||Oc;return e?n.then(this?e.bind(this):e):n}function Qd(e){let n=an+1,t=gt.length;for(;n<t;){const r=n+t>>>1,i=gt[r],o=Jr(i);o<e||o===e&&i.pre?n=r+1:t=r}return n}function wa(e){(!gt.length||!gt.includes(e,Zr&&e.allowRecurse?an+1:an))&&(e.id==null?gt.push(e):gt.splice(Qd(e.id),0,e),Sc())}function Sc(){!Zr&&!ba&&(ba=!0,Ca=Oc.then(Bc))}function Zd(e){const n=gt.indexOf(e);n>an&&gt.splice(n,1)}function Jd(e){Ie(e)?Tr.push(...e):(!Mn||!Mn.includes(e,e.allowRecurse?Yn+1:Yn))&&Tr.push(e),Sc()}function Ic(e,n,t=Zr?an+1:0){for(;t<gt.length;t++){const r=gt[t];if(r&&r.pre){if(e&&r.id!==e.uid)continue;gt.splice(t,1),t--,r()}}}function Tc(e){if(Tr.length){const n=[...new Set(Tr)].sort((t,r)=>Jr(t)-Jr(r));if(Tr.length=0,Mn){Mn.push(...n);return}for(Mn=n,Yn=0;Yn<Mn.length;Yn++)Mn[Yn]();Mn=null,Yn=0}}const Jr=e=>e.id==null?1/0:e.id,Yd=(e,n)=>{const t=Jr(e)-Jr(n);if(t===0){if(e.pre&&!n.pre)return-1;if(n.pre&&!e.pre)return 1}return t};function Bc(e){ba=!1,Zr=!0,gt.sort(Yd);try{for(an=0;an<gt.length;an++){const n=gt[an];n&&n.active!==!1&&Cn(n,null,14)}}finally{an=0,gt.length=0,Tc(),Zr=!1,Ca=null,(gt.length||Tr.length)&&Bc()}}function e1(e,n,...t){if(e.isUnmounted)return;const r=e.vnode.props||Qe;let i=t;const o=n.startsWith("update:"),a=o&&n.slice(7);if(a&&a in r){const c=`${a==="modelValue"?"model":a}Modifiers`,{number:v,trim:l}=r[c]||Qe;l&&(i=t.map(h=>et(h)?h.trim():h)),v&&(i=t.map(Kr))}let s,u=r[s=sa(n)]||r[s=sa(At(n))];!u&&o&&(u=r[s=sa(Lt(n))]),u&&Kt(u,e,6,i);const f=r[s+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,Kt(f,e,6,i)}}function Dc(e,n,t=!1){const r=n.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let a={},s=!1;if(!De(e)){const u=f=>{const c=Dc(f,n,!0);c&&(s=!0,at(a,c))};!t&&n.mixins.length&&n.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!o&&!s?(Ze(e)&&r.set(e,null),null):(Ie(o)?o.forEach(u=>a[u]=null):at(a,o),Ze(e)&&r.set(e,a),a)}function zi(e,n){return!e||!Ti(n)?!1:(n=n.slice(2).replace(/Once$/,""),He(e,n[0].toLowerCase()+n.slice(1))||He(e,Lt(n))||He(e,n))}let nt=null,Ki=null;function Xi(e){const n=nt;return nt=e,Ki=e&&e.type.__scopeId||null,n}function Xt(e){Ki=e}function Wt(){Ki=null}function Ve(e,n=nt,t){if(!n||e._n)return e;const r=(...i)=>{r._d&&au(-1);const o=Xi(n);let a;try{a=e(...i)}finally{Xi(o),r._d&&au(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Zy(){}function Ea(e){const{type:n,vnode:t,proxy:r,withProxy:i,props:o,propsOptions:[a],slots:s,attrs:u,emit:f,render:c,renderCache:v,data:l,setupState:h,ctx:p,inheritAttrs:g}=e;let d,m;const y=Xi(e);try{if(t.shapeFlag&4){const x=i||r,C=x;d=cn(c.call(C,x,v,o,h,l,p)),m=u}else{const x=n;d=cn(x.length>1?x(o,{attrs:u,slots:s,emit:f}):x(o,null)),m=n.props?u:t1(u)}}catch(x){ni.length=0,Ui(x,e,1),d=he(jn)}let _=d;if(m&&g!==!1){const x=Object.keys(m),{shapeFlag:C}=_;x.length&&C&7&&(a&&x.some(ia)&&(m=n1(m,a)),_=Dr(_,m))}return t.dirs&&(_=Dr(_),_.dirs=_.dirs?_.dirs.concat(t.dirs):t.dirs),t.transition&&(_.transition=t.transition),d=_,Xi(y),d}const t1=e=>{let n;for(const t in e)(t==="class"||t==="style"||Ti(t))&&((n||(n={}))[t]=e[t]);return n},n1=(e,n)=>{const t={};for(const r in e)(!ia(r)||!(r.slice(9)in n))&&(t[r]=e[r]);return t};function r1(e,n,t){const{props:r,children:i,component:o}=e,{props:a,children:s,patchFlag:u}=n,f=o.emitsOptions;if(n.dirs||n.transition)return!0;if(t&&u>=0){if(u&1024)return!0;if(u&16)return r?Rc(r,a,f):!!a;if(u&8){const c=n.dynamicProps;for(let v=0;v<c.length;v++){const l=c[v];if(a[l]!==r[l]&&!zi(f,l))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===a?!1:r?a?Rc(r,a,f):!0:!!a;return!1}function Rc(e,n,t){const r=Object.keys(n);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(n[o]!==e[o]&&!zi(t,o))return!0}return!1}function i1({vnode:e,parent:n},t){for(;n;){const r=n.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=n.vnode).el=t,n=n.parent;else break}}const Aa="components",o1="directives";function er(e,n){return ka(Aa,e,!0,n)||e}const Lc=Symbol.for("v-ndc");function Wi(e){return et(e)?ka(Aa,e,!1)||e:e||Lc}function a1(e){return ka(o1,e)}function ka(e,n,t=!0,r=!1){const i=nt||ct;if(i){const o=i.type;if(e===Aa){const s=vu(o,!1);if(s&&(s===n||s===At(n)||s===Di(At(n))))return o}const a=Fc(i[e]||o[e],n)||Fc(i.appContext[e],n);return!a&&r?o:a}}function Fc(e,n){return e&&(e[n]||e[At(n)]||e[Di(At(n))])}const s1=e=>e.__isSuspense;function l1(e,n){n&&n.pendingBranch?Ie(e)?n.effects.push(...e):n.effects.push(e):Jd(e)}const c1=Symbol.for("v-scx"),u1=()=>$n(c1);function f1(e,n){return Oa(e,null,{flush:"sync"})}const Gi={};function Ye(e,n,t){return Oa(e,n,t)}function Oa(e,n,{immediate:t,deep:r,flush:i,once:o,onTrack:a,onTrigger:s}=Qe){if(n&&o){const S=n;n=(...A)=>{S(...A),C()}}const u=ct,f=S=>r===!0?S:tr(S,r===!1?1:void 0);let c,v=!1,l=!1;if(tt(e)?(c=()=>e.value,v=Hi(e)):Pn(e)?(c=()=>f(e),v=!0):Ie(e)?(l=!0,v=e.some(S=>Pn(S)||Hi(S)),c=()=>e.map(S=>{if(tt(S))return S.value;if(Pn(S))return f(S);if(De(S))return Cn(S,u,2)})):De(e)?n?c=()=>Cn(e,u,2):c=()=>(h&&h(),Kt(e,u,3,[p])):c=$t,n&&r){const S=c;c=()=>tr(S())}let h,p=S=>{h=_.onStop=()=>{Cn(S,u,4),h=_.onStop=void 0}},g;if(lo)if(p=$t,n?t&&Kt(n,u,3,[c(),l?[]:void 0,p]):c(),i==="sync"){const S=u1();g=S.__watcherHandles||(S.__watcherHandles=[])}else return $t;let d=l?new Array(e.length).fill(Gi):Gi;const m=()=>{if(!(!_.active||!_.dirty))if(n){const S=_.run();(r||v||(l?S.some((A,I)=>on(A,d[I])):on(S,d)))&&(h&&h(),Kt(n,u,3,[S,d===Gi?void 0:l&&d[0]===Gi?[]:d,p]),d=S)}else _.run()};m.allowRecurse=!!n;let y;i==="sync"?y=m:i==="post"?y=()=>Ot(m,u&&u.suspense):(m.pre=!0,u&&(m.id=u.uid),y=()=>wa(m));const _=new ua(c,$t,y),x=rc(),C=()=>{_.stop(),x&&oa(x.effects,_)};return n?t?m():d=_.run():i==="post"?Ot(_.run.bind(_),u&&u.suspense):_.run(),g&&g.push(C),C}function d1(e,n,t){const r=this.proxy,i=et(e)?e.includes(".")?Nc(r,e):()=>r[e]:e.bind(r,r);let o;De(n)?o=n:(o=n.handler,t=n);const a=ai(this),s=Oa(i,o.bind(r),t);return a(),s}function Nc(e,n){const t=n.split(".");return()=>{let r=e;for(let i=0;i<t.length&&r;i++)r=r[t[i]];return r}}function tr(e,n,t=0,r){if(!Ze(e)||e.__v_skip)return e;if(n&&n>0){if(t>=n)return e;t++}if(r=r||new Set,r.has(e))return e;if(r.add(e),tt(e))tr(e.value,n,t,r);else if(Ie(e))for(let i=0;i<e.length;i++)tr(e[i],n,t,r);else if(Sr(e)||Or(e))e.forEach(i=>{tr(i,n,t,r)});else if(Gl(e))for(const i in e)tr(e[i],n,t,r);return e}function ln(e,n){if(nt===null)return e;const t=co(nt)||nt.proxy,r=e.dirs||(e.dirs=[]);for(let i=0;i<n.length;i++){let[o,a,s,u=Qe]=n[i];o&&(De(o)&&(o={mounted:o,updated:o}),o.deep&&tr(a),r.push({dir:o,instance:t,value:a,oldValue:void 0,arg:s,modifiers:u}))}return e}function nr(e,n,t,r){const i=e.dirs,o=n&&n.dirs;for(let a=0;a<i.length;a++){const s=i[a];o&&(s.oldValue=o[a].value);let u=s.dir[r];u&&(Ln(),Kt(u,t,8,[e.el,s,e,n]),Fn())}}/*! #__NO_SIDE_EFFECTS__ */function Pc(e,n){return De(e)?at({name:e.name},n,{setup:e}):e}const Yr=e=>!!e.type.__asyncLoader,Mc=e=>e.type.__isKeepAlive;function h1(e,n){qc(e,"a",n)}function p1(e,n){qc(e,"da",n)}function qc(e,n,t=ct){const r=e.__wdc||(e.__wdc=()=>{let i=t;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Qi(n,r,t),t){let i=t.parent;for(;i&&i.parent;)Mc(i.parent.vnode)&&v1(r,n,t,i),i=i.parent}}function v1(e,n,t,r){const i=Qi(n,e,r,!0);Ji(()=>{oa(r[n],i)},t)}function Qi(e,n,t=ct,r=!1){if(t){const i=t[e]||(t[e]=[]),o=n.__weh||(n.__weh=(...a)=>{if(t.isUnmounted)return;Ln();const s=ai(t),u=Kt(n,t,e,a);return s(),Fn(),u});return r?i.unshift(o):i.push(o),o}}const wn=e=>(n,t=ct)=>(!lo||e==="sp")&&Qi(e,(...r)=>n(...r),t),qn=wn("bm"),Nt=wn("m"),$c=wn("bu"),g1=wn("u"),Zi=wn("bum"),Ji=wn("um"),m1=wn("sp"),y1=wn("rtg"),x1=wn("rtc");function _1(e,n=ct){Qi("ec",e,n)}function Me(e,n,t,r){let i;const o=t&&t[r];if(Ie(e)||et(e)){i=new Array(e.length);for(let a=0,s=e.length;a<s;a++)i[a]=n(e[a],a,void 0,o&&o[a])}else if(typeof e=="number"){i=new Array(e);for(let a=0;a<e;a++)i[a]=n(a+1,a,void 0,o&&o[a])}else if(Ze(e))if(e[Symbol.iterator])i=Array.from(e,(a,s)=>n(a,s,void 0,o&&o[s]));else{const a=Object.keys(e);i=new Array(a.length);for(let s=0,u=a.length;s<u;s++){const f=a[s];i[s]=n(e[f],f,s,o&&o[s])}}else i=[];return t&&(t[r]=i),i}function Je(e,n,t={},r,i){if(nt.isCE||nt.parent&&Yr(nt.parent)&&nt.parent.isCE)return n!=="default"&&(t.name=n),he("slot",t,r&&r());let o=e[n];o&&o._c&&(o._d=!1),U();const a=o&&jc(o(t)),s=ke(be,{key:t.key||a&&a.key||`_${n}`},a||(r?r():[]),a&&e._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),o&&o._c&&(o._d=!0),s}function jc(e){return e.some(n=>ro(n)?!(n.type===jn||n.type===be&&!jc(n.children)):!0)?e:null}const Sa=e=>e?fu(e)?co(e)||e.proxy:Sa(e.parent):null,ei=at(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Sa(e.parent),$root:e=>Sa(e.root),$emit:e=>e.emit,$options:e=>Ba(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,wa(e.update)}),$nextTick:e=>e.n||(e.n=sn.bind(e.proxy)),$watch:e=>d1.bind(e)}),Ia=(e,n)=>e!==Qe&&!e.__isScriptSetup&&He(e,n),b1={get({_:e},n){const{ctx:t,setupState:r,data:i,props:o,accessCache:a,type:s,appContext:u}=e;let f;if(n[0]!=="$"){const h=a[n];if(h!==void 0)switch(h){case 1:return r[n];case 2:return i[n];case 4:return t[n];case 3:return o[n]}else{if(Ia(r,n))return a[n]=1,r[n];if(i!==Qe&&He(i,n))return a[n]=2,i[n];if((f=e.propsOptions[0])&&He(f,n))return a[n]=3,o[n];if(t!==Qe&&He(t,n))return a[n]=4,t[n];Ta&&(a[n]=0)}}const c=ei[n];let v,l;if(c)return n==="$attrs"&&kt(e,"get",n),c(e);if((v=s.__cssModules)&&(v=v[n]))return v;if(t!==Qe&&He(t,n))return a[n]=4,t[n];if(l=u.config.globalProperties,He(l,n))return l[n]},set({_:e},n,t){const{data:r,setupState:i,ctx:o}=e;return Ia(i,n)?(i[n]=t,!0):r!==Qe&&He(r,n)?(r[n]=t,!0):He(e.props,n)||n[0]==="$"&&n.slice(1)in e?!1:(o[n]=t,!0)},has({_:{data:e,setupState:n,accessCache:t,ctx:r,appContext:i,propsOptions:o}},a){let s;return!!t[a]||e!==Qe&&He(e,a)||Ia(n,a)||(s=o[0])&&He(s,a)||He(r,a)||He(ei,a)||He(i.config.globalProperties,a)},defineProperty(e,n,t){return t.get!=null?e._.accessCache[n]=0:He(t,"value")&&this.set(e,n,t.value,null),Reflect.defineProperty(e,n,t)}};function Yi(e){return Ie(e)?e.reduce((n,t)=>(n[t]=null,n),{}):e}function Hc(e,n){return!e||!n?e||n:Ie(e)&&Ie(n)?e.concat(n):at({},Yi(e),Yi(n))}let Ta=!0;function C1(e){const n=Ba(e),t=e.proxy,r=e.ctx;Ta=!1,n.beforeCreate&&Vc(n.beforeCreate,e,"bc");const{data:i,computed:o,methods:a,watch:s,provide:u,inject:f,created:c,beforeMount:v,mounted:l,beforeUpdate:h,updated:p,activated:g,deactivated:d,beforeDestroy:m,beforeUnmount:y,destroyed:_,unmounted:x,render:C,renderTracked:S,renderTriggered:A,errorCaptured:I,serverPrefetch:B,expose:O,inheritAttrs:E,components:k,directives:R,filters:F}=n;if(f&&w1(f,r,null),a)for(const ee in a){const ne=a[ee];De(ne)&&(r[ee]=ne.bind(t))}if(i){const ee=i.call(t,t);Ze(ee)&&(e.data=Xr(ee))}if(Ta=!0,o)for(const ee in o){const ne=o[ee],Q=De(ne)?ne.bind(t,t):De(ne.get)?ne.get.bind(t,t):$t,N=!De(ne)&&De(ne.set)?ne.set.bind(t):$t,w=me({get:Q,set:N});Object.defineProperty(r,ee,{enumerable:!0,configurable:!0,get:()=>w.value,set:D=>w.value=D})}if(s)for(const ee in s)Uc(s[ee],r,t,ee);if(u){const ee=De(u)?u.call(t):u;Reflect.ownKeys(ee).forEach(ne=>{I1(ne,ee[ne])})}c&&Vc(c,e,"c");function Z(ee,ne){Ie(ne)?ne.forEach(Q=>ee(Q.bind(t))):ne&&ee(ne.bind(t))}if(Z(qn,v),Z(Nt,l),Z($c,h),Z(g1,p),Z(h1,g),Z(p1,d),Z(_1,I),Z(x1,S),Z(y1,A),Z(Zi,y),Z(Ji,x),Z(m1,B),Ie(O))if(O.length){const ee=e.exposed||(e.exposed={});O.forEach(ne=>{Object.defineProperty(ee,ne,{get:()=>t[ne],set:Q=>t[ne]=Q})})}else e.exposed||(e.exposed={});C&&e.render===$t&&(e.render=C),E!=null&&(e.inheritAttrs=E),k&&(e.components=k),R&&(e.directives=R)}function w1(e,n,t=$t){Ie(e)&&(e=Da(e));for(const r in e){const i=e[r];let o;Ze(i)?"default"in i?o=$n(i.from||r,i.default,!0):o=$n(i.from||r):o=$n(i),tt(o)?Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):n[r]=o}}function Vc(e,n,t){Kt(Ie(e)?e.map(r=>r.bind(n.proxy)):e.bind(n.proxy),n,t)}function Uc(e,n,t,r){const i=r.includes(".")?Nc(t,r):()=>t[r];if(et(e)){const o=n[e];De(o)&&Ye(i,o)}else if(De(e))Ye(i,e.bind(t));else if(Ze(e))if(Ie(e))e.forEach(o=>Uc(o,n,t,r));else{const o=De(e.handler)?e.handler.bind(t):n[e.handler];De(o)&&Ye(i,o,e)}}function Ba(e){const n=e.type,{mixins:t,extends:r}=n,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,s=o.get(n);let u;return s?u=s:!i.length&&!t&&!r?u=n:(u={},i.length&&i.forEach(f=>eo(u,f,a,!0)),eo(u,n,a)),Ze(n)&&o.set(n,u),u}function eo(e,n,t,r=!1){const{mixins:i,extends:o}=n;o&&eo(e,o,t,!0),i&&i.forEach(a=>eo(e,a,t,!0));for(const a in n)if(!(r&&a==="expose")){const s=E1[a]||t&&t[a];e[a]=s?s(e[a],n[a]):n[a]}return e}const E1={data:zc,props:Kc,emits:Kc,methods:ti,computed:ti,beforeCreate:Ct,created:Ct,beforeMount:Ct,mounted:Ct,beforeUpdate:Ct,updated:Ct,beforeDestroy:Ct,beforeUnmount:Ct,destroyed:Ct,unmounted:Ct,activated:Ct,deactivated:Ct,errorCaptured:Ct,serverPrefetch:Ct,components:ti,directives:ti,watch:k1,provide:zc,inject:A1};function zc(e,n){return n?e?function(){return at(De(e)?e.call(this,this):e,De(n)?n.call(this,this):n)}:n:e}function A1(e,n){return ti(Da(e),Da(n))}function Da(e){if(Ie(e)){const n={};for(let t=0;t<e.length;t++)n[e[t]]=e[t];return n}return e}function Ct(e,n){return e?[...new Set([].concat(e,n))]:n}function ti(e,n){return e?at(Object.create(null),e,n):n}function Kc(e,n){return e?Ie(e)&&Ie(n)?[...new Set([...e,...n])]:at(Object.create(null),Yi(e),Yi(n??{})):n}function k1(e,n){if(!e)return n;if(!n)return e;const t=at(Object.create(null),e);for(const r in n)t[r]=Ct(e[r],n[r]);return t}function Xc(){return{app:null,config:{isNativeTag:nd,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let O1=0;function S1(e,n){return function(r,i=null){De(r)||(r=at({},r)),i!=null&&!Ze(i)&&(i=null);const o=Xc(),a=new WeakSet;let s=!1;const u=o.app={_uid:O1++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:th,get config(){return o.config},set config(f){},use(f,...c){return a.has(f)||(f&&De(f.install)?(a.add(f),f.install(u,...c)):De(f)&&(a.add(f),f(u,...c))),u},mixin(f){return o.mixins.includes(f)||o.mixins.push(f),u},component(f,c){return c?(o.components[f]=c,u):o.components[f]},directive(f,c){return c?(o.directives[f]=c,u):o.directives[f]},mount(f,c,v){if(!s){const l=he(r,i);return l.appContext=o,v===!0?v="svg":v===!1&&(v=void 0),c&&n?n(l,f):e(l,f,v),s=!0,u._container=f,f.__vue_app__=u,co(l.component)||l.component.proxy}},unmount(){s&&(e(null,u._container),delete u._container.__vue_app__)},provide(f,c){return o.provides[f]=c,u},runWithContext(f){const c=Br;Br=u;try{return f()}finally{Br=c}}};return u}}let Br=null;function I1(e,n){if(ct){let t=ct.provides;const r=ct.parent&&ct.parent.provides;r===t&&(t=ct.provides=Object.create(r)),t[e]=n}}function $n(e,n,t=!1){const r=ct||nt;if(r||Br){const i=r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:Br._context.provides;if(i&&e in i)return i[e];if(arguments.length>1)return t&&De(n)?n.call(r&&r.proxy):n}}function Wc(){return!!(ct||nt||Br)}function T1(e,n,t,r=!1){const i={},o={};Li(o,io,1),e.propsDefaults=Object.create(null),Gc(e,n,i,o);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);t?e.props=r?i:Fd(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function B1(e,n,t,r){const{props:i,attrs:o,vnode:{patchFlag:a}}=e,s=Pe(i),[u]=e.propsOptions;let f=!1;if((r||a>0)&&!(a&16)){if(a&8){const c=e.vnode.dynamicProps;for(let v=0;v<c.length;v++){let l=c[v];if(zi(e.emitsOptions,l))continue;const h=n[l];if(u)if(He(o,l))h!==o[l]&&(o[l]=h,f=!0);else{const p=At(l);i[p]=Ra(u,s,p,h,e,!1)}else h!==o[l]&&(o[l]=h,f=!0)}}}else{Gc(e,n,i,o)&&(f=!0);let c;for(const v in s)(!n||!He(n,v)&&((c=Lt(v))===v||!He(n,c)))&&(u?t&&(t[v]!==void 0||t[c]!==void 0)&&(i[v]=Ra(u,s,v,void 0,e,!0)):delete i[v]);if(o!==s)for(const v in o)(!n||!He(n,v))&&(delete o[v],f=!0)}f&&bn(e,"set","$attrs")}function Gc(e,n,t,r){const[i,o]=e.propsOptions;let a=!1,s;if(n)for(let u in n){if(zr(u))continue;const f=n[u];let c;i&&He(i,c=At(u))?!o||!o.includes(c)?t[c]=f:(s||(s={}))[c]=f:zi(e.emitsOptions,u)||(!(u in r)||f!==r[u])&&(r[u]=f,a=!0)}if(o){const u=Pe(t),f=s||Qe;for(let c=0;c<o.length;c++){const v=o[c];t[v]=Ra(i,u,v,f[v],e,!He(f,v))}}return a}function Ra(e,n,t,r,i,o){const a=e[t];if(a!=null){const s=He(a,"default");if(s&&r===void 0){const u=a.default;if(a.type!==Function&&!a.skipFactory&&De(u)){const{propsDefaults:f}=i;if(t in f)r=f[t];else{const c=ai(i);r=f[t]=u.call(null,n),c()}}else r=u}a[0]&&(o&&!s?r=!1:a[1]&&(r===""||r===Lt(t))&&(r=!0))}return r}function Qc(e,n,t=!1){const r=n.propsCache,i=r.get(e);if(i)return i;const o=e.props,a={},s=[];let u=!1;if(!De(e)){const c=v=>{u=!0;const[l,h]=Qc(v,n,!0);at(a,l),h&&s.push(...h)};!t&&n.mixins.length&&n.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!u)return Ze(e)&&r.set(e,kr),kr;if(Ie(o))for(let c=0;c<o.length;c++){const v=At(o[c]);Zc(v)&&(a[v]=Qe)}else if(o)for(const c in o){const v=At(c);if(Zc(v)){const l=o[c],h=a[v]=Ie(l)||De(l)?{type:l}:at({},l);if(h){const p=eu(Boolean,h.type),g=eu(String,h.type);h[0]=p>-1,h[1]=g<0||p<g,(p>-1||He(h,"default"))&&s.push(v)}}}const f=[a,s];return Ze(e)&&r.set(e,f),f}function Zc(e){return e[0]!=="$"&&!zr(e)}function Jc(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Yc(e,n){return Jc(e)===Jc(n)}function eu(e,n){return Ie(n)?n.findIndex(t=>Yc(t,e)):De(n)&&Yc(n,e)?0:-1}const tu=e=>e[0]==="_"||e==="$stable",La=e=>Ie(e)?e.map(cn):[cn(e)],D1=(e,n,t)=>{if(n._n)return n;const r=Ve((...i)=>La(n(...i)),t);return r._c=!1,r},nu=(e,n,t)=>{const r=e._ctx;for(const i in e){if(tu(i))continue;const o=e[i];if(De(o))n[i]=D1(i,o,r);else if(o!=null){const a=La(o);n[i]=()=>a}}},ru=(e,n)=>{const t=La(n);e.slots.default=()=>t},R1=(e,n)=>{if(e.vnode.shapeFlag&32){const t=n._;t?(e.slots=Pe(n),Li(n,"_",t)):nu(n,e.slots={})}else e.slots={},n&&ru(e,n);Li(e.slots,io,1)},L1=(e,n,t)=>{const{vnode:r,slots:i}=e;let o=!0,a=Qe;if(r.shapeFlag&32){const s=n._;s?t&&s===1?o=!1:(at(i,n),!t&&s===1&&delete i._):(o=!n.$stable,nu(n,i)),a=n}else n&&(ru(e,n),a={default:1});if(o)for(const s in i)!tu(s)&&a[s]==null&&delete i[s]};function Fa(e,n,t,r,i=!1){if(Ie(e)){e.forEach((l,h)=>Fa(l,n&&(Ie(n)?n[h]:n),t,r,i));return}if(Yr(r)&&!i)return;const o=r.shapeFlag&4?co(r.component)||r.component.proxy:r.el,a=i?null:o,{i:s,r:u}=e,f=n&&n.r,c=s.refs===Qe?s.refs={}:s.refs,v=s.setupState;if(f!=null&&f!==u&&(et(f)?(c[f]=null,He(v,f)&&(v[f]=null)):tt(f)&&(f.value=null)),De(u))Cn(u,s,12,[a,c]);else{const l=et(u),h=tt(u);if(l||h){const p=()=>{if(e.f){const g=l?He(v,u)?v[u]:c[u]:u.value;i?Ie(g)&&oa(g,o):Ie(g)?g.includes(o)||g.push(o):l?(c[u]=[o],He(v,u)&&(v[u]=c[u])):(u.value=[o],e.k&&(c[e.k]=u.value))}else l?(c[u]=a,He(v,u)&&(v[u]=a)):h&&(u.value=a,e.k&&(c[e.k]=a))};a?(p.id=-1,Ot(p,t)):p()}}}const Ot=l1;function F1(e){return N1(e)}function N1(e,n){const t=Jl();t.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:a,createText:s,createComment:u,setText:f,setElementText:c,parentNode:v,nextSibling:l,setScopeId:h=$t,insertStaticContent:p}=e,g=(P,X,se,fe=null,ce=null,ie=null,oe=void 0,le=null,ue=!!X.dynamicChildren)=>{if(P===X)return;P&&!ii(P,X)&&(fe=W(P),D(P,ce,ie,!0),P=null),X.patchFlag===-2&&(ue=!1,X.dynamicChildren=null);const{type:ae,ref:ve,shapeFlag:ye}=X;switch(ae){case to:d(P,X,se,fe);break;case jn:m(P,X,se,fe);break;case no:P==null&&y(X,se,fe,oe);break;case be:k(P,X,se,fe,ce,ie,oe,le,ue);break;default:ye&1?C(P,X,se,fe,ce,ie,oe,le,ue):ye&6?R(P,X,se,fe,ce,ie,oe,le,ue):(ye&64||ye&128)&&ae.process(P,X,se,fe,ce,ie,oe,le,ue,V)}ve!=null&&ce&&Fa(ve,P&&P.ref,ie,X||P,!X)},d=(P,X,se,fe)=>{if(P==null)r(X.el=s(X.children),se,fe);else{const ce=X.el=P.el;X.children!==P.children&&f(ce,X.children)}},m=(P,X,se,fe)=>{P==null?r(X.el=u(X.children||""),se,fe):X.el=P.el},y=(P,X,se,fe)=>{[P.el,P.anchor]=p(P.children,X,se,fe,P.el,P.anchor)},_=({el:P,anchor:X},se,fe)=>{let ce;for(;P&&P!==X;)ce=l(P),r(P,se,fe),P=ce;r(X,se,fe)},x=({el:P,anchor:X})=>{let se;for(;P&&P!==X;)se=l(P),i(P),P=se;i(X)},C=(P,X,se,fe,ce,ie,oe,le,ue)=>{X.type==="svg"?oe="svg":X.type==="math"&&(oe="mathml"),P==null?S(X,se,fe,ce,ie,oe,le,ue):B(P,X,ce,ie,oe,le,ue)},S=(P,X,se,fe,ce,ie,oe,le)=>{let ue,ae;const{props:ve,shapeFlag:ye,transition:_e,dirs:Ce}=P;if(ue=P.el=a(P.type,ie,ve&&ve.is,ve),ye&8?c(ue,P.children):ye&16&&I(P.children,ue,null,fe,ce,Na(P,ie),oe,le),Ce&&nr(P,null,fe,"created"),A(ue,P,P.scopeId,oe,fe),ve){for(const Ee in ve)Ee!=="value"&&!zr(Ee)&&o(ue,Ee,null,ve[Ee],ie,P.children,fe,ce,j);"value"in ve&&o(ue,"value",null,ve.value,ie),(ae=ve.onVnodeBeforeMount)&&un(ae,fe,P)}Ce&&nr(P,null,fe,"beforeMount");const Ae=P1(ce,_e);Ae&&_e.beforeEnter(ue),r(ue,X,se),((ae=ve&&ve.onVnodeMounted)||Ae||Ce)&&Ot(()=>{ae&&un(ae,fe,P),Ae&&_e.enter(ue),Ce&&nr(P,null,fe,"mounted")},ce)},A=(P,X,se,fe,ce)=>{if(se&&h(P,se),fe)for(let ie=0;ie<fe.length;ie++)h(P,fe[ie]);if(ce){let ie=ce.subTree;if(X===ie){const oe=ce.vnode;A(P,oe,oe.scopeId,oe.slotScopeIds,ce.parent)}}},I=(P,X,se,fe,ce,ie,oe,le,ue=0)=>{for(let ae=ue;ae<P.length;ae++){const ve=P[ae]=le?Hn(P[ae]):cn(P[ae]);g(null,ve,X,se,fe,ce,ie,oe,le)}},B=(P,X,se,fe,ce,ie,oe)=>{const le=X.el=P.el;let{patchFlag:ue,dynamicChildren:ae,dirs:ve}=X;ue|=P.patchFlag&16;const ye=P.props||Qe,_e=X.props||Qe;let Ce;if(se&&rr(se,!1),(Ce=_e.onVnodeBeforeUpdate)&&un(Ce,se,X,P),ve&&nr(X,P,se,"beforeUpdate"),se&&rr(se,!0),ae?O(P.dynamicChildren,ae,le,se,fe,Na(X,ce),ie):oe||ne(P,X,le,null,se,fe,Na(X,ce),ie,!1),ue>0){if(ue&16)E(le,X,ye,_e,se,fe,ce);else if(ue&2&&ye.class!==_e.class&&o(le,"class",null,_e.class,ce),ue&4&&o(le,"style",ye.style,_e.style,ce),ue&8){const Ae=X.dynamicProps;for(let Ee=0;Ee<Ae.length;Ee++){const $e=Ae[Ee],Te=ye[$e],Ke=_e[$e];(Ke!==Te||$e==="value")&&o(le,$e,Te,Ke,ce,P.children,se,fe,j)}}ue&1&&P.children!==X.children&&c(le,X.children)}else!oe&&ae==null&&E(le,X,ye,_e,se,fe,ce);((Ce=_e.onVnodeUpdated)||ve)&&Ot(()=>{Ce&&un(Ce,se,X,P),ve&&nr(X,P,se,"updated")},fe)},O=(P,X,se,fe,ce,ie,oe)=>{for(let le=0;le<X.length;le++){const ue=P[le],ae=X[le],ve=ue.el&&(ue.type===be||!ii(ue,ae)||ue.shapeFlag&70)?v(ue.el):se;g(ue,ae,ve,null,fe,ce,ie,oe,!0)}},E=(P,X,se,fe,ce,ie,oe)=>{if(se!==fe){if(se!==Qe)for(const le in se)!zr(le)&&!(le in fe)&&o(P,le,se[le],null,oe,X.children,ce,ie,j);for(const le in fe){if(zr(le))continue;const ue=fe[le],ae=se[le];ue!==ae&&le!=="value"&&o(P,le,ae,ue,oe,X.children,ce,ie,j)}"value"in fe&&o(P,"value",se.value,fe.value,oe)}},k=(P,X,se,fe,ce,ie,oe,le,ue)=>{const ae=X.el=P?P.el:s(""),ve=X.anchor=P?P.anchor:s("");let{patchFlag:ye,dynamicChildren:_e,slotScopeIds:Ce}=X;Ce&&(le=le?le.concat(Ce):Ce),P==null?(r(ae,se,fe),r(ve,se,fe),I(X.children||[],se,ve,ce,ie,oe,le,ue)):ye>0&&ye&64&&_e&&P.dynamicChildren?(O(P.dynamicChildren,_e,se,ce,ie,oe,le),(X.key!=null||ce&&X===ce.subTree)&&iu(P,X,!0)):ne(P,X,se,ve,ce,ie,oe,le,ue)},R=(P,X,se,fe,ce,ie,oe,le,ue)=>{X.slotScopeIds=le,P==null?X.shapeFlag&512?ce.ctx.activate(X,se,fe,oe,ue):F(X,se,fe,ce,ie,oe,ue):q(P,X,ue)},F=(P,X,se,fe,ce,ie,oe)=>{const le=P.component=z1(P,fe,ce);if(Mc(P)&&(le.ctx.renderer=V),K1(le),le.asyncDep){if(ce&&ce.registerDep(le,Z),!P.el){const ue=le.subTree=he(jn);m(null,ue,X,se)}}else Z(le,P,X,se,ce,ie,oe)},q=(P,X,se)=>{const fe=X.component=P.component;if(r1(P,X,se))if(fe.asyncDep&&!fe.asyncResolved){ee(fe,X,se);return}else fe.next=X,Zd(fe.update),fe.effect.dirty=!0,fe.update();else X.el=P.el,fe.vnode=X},Z=(P,X,se,fe,ce,ie,oe)=>{const le=()=>{if(P.isMounted){let{next:ve,bu:ye,u:_e,parent:Ce,vnode:Ae}=P;{const dt=ou(P);if(dt){ve&&(ve.el=Ae.el,ee(P,ve,oe)),dt.asyncDep.then(()=>{P.isUnmounted||le()});return}}let Ee=ve,$e;rr(P,!1),ve?(ve.el=Ae.el,ee(P,ve,oe)):ve=Ae,ye&&Ri(ye),($e=ve.props&&ve.props.onVnodeBeforeUpdate)&&un($e,Ce,ve,Ae),rr(P,!0);const Te=Ea(P),Ke=P.subTree;P.subTree=Te,g(Ke,Te,v(Ke.el),W(Ke),P,ce,ie),ve.el=Te.el,Ee===null&&i1(P,Te.el),_e&&Ot(_e,ce),($e=ve.props&&ve.props.onVnodeUpdated)&&Ot(()=>un($e,Ce,ve,Ae),ce)}else{let ve;const{el:ye,props:_e}=X,{bm:Ce,m:Ae,parent:Ee}=P,$e=Yr(X);if(rr(P,!1),Ce&&Ri(Ce),!$e&&(ve=_e&&_e.onVnodeBeforeMount)&&un(ve,Ee,X),rr(P,!0),ye&&J){const Te=()=>{P.subTree=Ea(P),J(ye,P.subTree,P,ce,null)};$e?X.type.__asyncLoader().then(()=>!P.isUnmounted&&Te()):Te()}else{const Te=P.subTree=Ea(P);g(null,Te,se,fe,P,ce,ie),X.el=Te.el}if(Ae&&Ot(Ae,ce),!$e&&(ve=_e&&_e.onVnodeMounted)){const Te=X;Ot(()=>un(ve,Ee,Te),ce)}(X.shapeFlag&256||Ee&&Yr(Ee.vnode)&&Ee.vnode.shapeFlag&256)&&P.a&&Ot(P.a,ce),P.isMounted=!0,X=se=fe=null}},ue=P.effect=new ua(le,$t,()=>wa(ae),P.scope),ae=P.update=()=>{ue.dirty&&ue.run()};ae.id=P.uid,rr(P,!0),ae()},ee=(P,X,se)=>{X.component=P;const fe=P.vnode.props;P.vnode=X,P.next=null,B1(P,X.props,fe,se),L1(P,X.children,se),Ln(),Ic(P),Fn()},ne=(P,X,se,fe,ce,ie,oe,le,ue=!1)=>{const ae=P&&P.children,ve=P?P.shapeFlag:0,ye=X.children,{patchFlag:_e,shapeFlag:Ce}=X;if(_e>0){if(_e&128){N(ae,ye,se,fe,ce,ie,oe,le,ue);return}else if(_e&256){Q(ae,ye,se,fe,ce,ie,oe,le,ue);return}}Ce&8?(ve&16&&j(ae,ce,ie),ye!==ae&&c(se,ye)):ve&16?Ce&16?N(ae,ye,se,fe,ce,ie,oe,le,ue):j(ae,ce,ie,!0):(ve&8&&c(se,""),Ce&16&&I(ye,se,fe,ce,ie,oe,le,ue))},Q=(P,X,se,fe,ce,ie,oe,le,ue)=>{P=P||kr,X=X||kr;const ae=P.length,ve=X.length,ye=Math.min(ae,ve);let _e;for(_e=0;_e<ye;_e++){const Ce=X[_e]=ue?Hn(X[_e]):cn(X[_e]);g(P[_e],Ce,se,null,ce,ie,oe,le,ue)}ae>ve?j(P,ce,ie,!0,!1,ye):I(X,se,fe,ce,ie,oe,le,ue,ye)},N=(P,X,se,fe,ce,ie,oe,le,ue)=>{let ae=0;const ve=X.length;let ye=P.length-1,_e=ve-1;for(;ae<=ye&&ae<=_e;){const Ce=P[ae],Ae=X[ae]=ue?Hn(X[ae]):cn(X[ae]);if(ii(Ce,Ae))g(Ce,Ae,se,null,ce,ie,oe,le,ue);else break;ae++}for(;ae<=ye&&ae<=_e;){const Ce=P[ye],Ae=X[_e]=ue?Hn(X[_e]):cn(X[_e]);if(ii(Ce,Ae))g(Ce,Ae,se,null,ce,ie,oe,le,ue);else break;ye--,_e--}if(ae>ye){if(ae<=_e){const Ce=_e+1,Ae=Ce<ve?X[Ce].el:fe;for(;ae<=_e;)g(null,X[ae]=ue?Hn(X[ae]):cn(X[ae]),se,Ae,ce,ie,oe,le,ue),ae++}}else if(ae>_e)for(;ae<=ye;)D(P[ae],ce,ie,!0),ae++;else{const Ce=ae,Ae=ae,Ee=new Map;for(ae=Ae;ae<=_e;ae++){const it=X[ae]=ue?Hn(X[ae]):cn(X[ae]);it.key!=null&&Ee.set(it.key,ae)}let $e,Te=0;const Ke=_e-Ae+1;let dt=!1,Xn=0;const Bt=new Array(Ke);for(ae=0;ae<Ke;ae++)Bt[ae]=0;for(ae=Ce;ae<=ye;ae++){const it=P[ae];if(Te>=Ke){D(it,ce,ie,!0);continue}let st;if(it.key!=null)st=Ee.get(it.key);else for($e=Ae;$e<=_e;$e++)if(Bt[$e-Ae]===0&&ii(it,X[$e])){st=$e;break}st===void 0?D(it,ce,ie,!0):(Bt[st-Ae]=ae+1,st>=Xn?Xn=st:dt=!0,g(it,X[st],se,null,ce,ie,oe,le,ue),Te++)}const Vt=dt?M1(Bt):kr;for($e=Vt.length-1,ae=Ke-1;ae>=0;ae--){const it=Ae+ae,st=X[it],Mt=it+1<ve?X[it+1].el:fe;Bt[ae]===0?g(null,st,se,Mt,ce,ie,oe,le,ue):dt&&($e<0||ae!==Vt[$e]?w(st,se,Mt,2):$e--)}}},w=(P,X,se,fe,ce=null)=>{const{el:ie,type:oe,transition:le,children:ue,shapeFlag:ae}=P;if(ae&6){w(P.component.subTree,X,se,fe);return}if(ae&128){P.suspense.move(X,se,fe);return}if(ae&64){oe.move(P,X,se,V);return}if(oe===be){r(ie,X,se);for(let ye=0;ye<ue.length;ye++)w(ue[ye],X,se,fe);r(P.anchor,X,se);return}if(oe===no){_(P,X,se);return}if(fe!==2&&ae&1&&le)if(fe===0)le.beforeEnter(ie),r(ie,X,se),Ot(()=>le.enter(ie),ce);else{const{leave:ye,delayLeave:_e,afterLeave:Ce}=le,Ae=()=>r(ie,X,se),Ee=()=>{ye(ie,()=>{Ae(),Ce&&Ce()})};_e?_e(ie,Ae,Ee):Ee()}else r(ie,X,se)},D=(P,X,se,fe=!1,ce=!1)=>{const{type:ie,props:oe,ref:le,children:ue,dynamicChildren:ae,shapeFlag:ve,patchFlag:ye,dirs:_e}=P;if(le!=null&&Fa(le,null,se,P,!0),ve&256){X.ctx.deactivate(P);return}const Ce=ve&1&&_e,Ae=!Yr(P);let Ee;if(Ae&&(Ee=oe&&oe.onVnodeBeforeUnmount)&&un(Ee,X,P),ve&6)G(P.component,se,fe);else{if(ve&128){P.suspense.unmount(se,fe);return}Ce&&nr(P,null,X,"beforeUnmount"),ve&64?P.type.remove(P,X,se,ce,V,fe):ae&&(ie!==be||ye>0&&ye&64)?j(ae,X,se,!1,!0):(ie===be&&ye&384||!ce&&ve&16)&&j(ue,X,se),fe&&L(P)}(Ae&&(Ee=oe&&oe.onVnodeUnmounted)||Ce)&&Ot(()=>{Ee&&un(Ee,X,P),Ce&&nr(P,null,X,"unmounted")},se)},L=P=>{const{type:X,el:se,anchor:fe,transition:ce}=P;if(X===be){$(se,fe);return}if(X===no){x(P);return}const ie=()=>{i(se),ce&&!ce.persisted&&ce.afterLeave&&ce.afterLeave()};if(P.shapeFlag&1&&ce&&!ce.persisted){const{leave:oe,delayLeave:le}=ce,ue=()=>oe(se,ie);le?le(P.el,ie,ue):ue()}else ie()},$=(P,X)=>{let se;for(;P!==X;)se=l(P),i(P),P=se;i(X)},G=(P,X,se)=>{const{bum:fe,scope:ce,update:ie,subTree:oe,um:le}=P;fe&&Ri(fe),ce.stop(),ie&&(ie.active=!1,D(oe,P,X,se)),le&&Ot(le,X),Ot(()=>{P.isUnmounted=!0},X),X&&X.pendingBranch&&!X.isUnmounted&&P.asyncDep&&!P.asyncResolved&&P.suspenseId===X.pendingId&&(X.deps--,X.deps===0&&X.resolve())},j=(P,X,se,fe=!1,ce=!1,ie=0)=>{for(let oe=ie;oe<P.length;oe++)D(P[oe],X,se,fe,ce)},W=P=>P.shapeFlag&6?W(P.component.subTree):P.shapeFlag&128?P.suspense.next():l(P.anchor||P.el);let M=!1;const H=(P,X,se)=>{P==null?X._vnode&&D(X._vnode,null,null,!0):g(X._vnode||null,P,X,null,null,null,se),M||(M=!0,Ic(),Tc(),M=!1),X._vnode=P},V={p:g,um:D,m:w,r:L,mt:F,mc:I,pc:ne,pbc:O,n:W,o:e};let K,J;return n&&([K,J]=n(V)),{render:H,hydrate:K,createApp:S1(H,K)}}function Na({type:e,props:n},t){return t==="svg"&&e==="foreignObject"||t==="mathml"&&e==="annotation-xml"&&n&&n.encoding&&n.encoding.includes("html")?void 0:t}function rr({effect:e,update:n},t){e.allowRecurse=n.allowRecurse=t}function P1(e,n){return(!e||e&&!e.pendingBranch)&&n&&!n.persisted}function iu(e,n,t=!1){const r=e.children,i=n.children;if(Ie(r)&&Ie(i))for(let o=0;o<r.length;o++){const a=r[o];let s=i[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[o]=Hn(i[o]),s.el=a.el),t||iu(a,s)),s.type===to&&(s.el=a.el)}}function M1(e){const n=e.slice(),t=[0];let r,i,o,a,s;const u=e.length;for(r=0;r<u;r++){const f=e[r];if(f!==0){if(i=t[t.length-1],e[i]<f){n[r]=i,t.push(r);continue}for(o=0,a=t.length-1;o<a;)s=o+a>>1,e[t[s]]<f?o=s+1:a=s;f<e[t[o]]&&(o>0&&(n[r]=t[o-1]),t[o]=r)}}for(o=t.length,a=t[o-1];o-- >0;)t[o]=a,a=n[a];return t}function ou(e){const n=e.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:ou(n)}const q1=e=>e.__isTeleport,be=Symbol.for("v-fgt"),to=Symbol.for("v-txt"),jn=Symbol.for("v-cmt"),no=Symbol.for("v-stc"),ni=[];let Gt=null;function U(e=!1){ni.push(Gt=e?null:[])}function $1(){ni.pop(),Gt=ni[ni.length-1]||null}let ri=1;function au(e){ri+=e}function su(e){return e.dynamicChildren=ri>0?Gt||kr:null,$1(),ri>0&&Gt&&Gt.push(e),e}function Y(e,n,t,r,i,o){return su(b(e,n,t,r,i,o,!0))}function ke(e,n,t,r,i){return su(he(e,n,t,r,i,!0))}function ro(e){return e?e.__v_isVNode===!0:!1}function ii(e,n){return e.type===n.type&&e.key===n.key}const io="__vInternal",lu=({key:e})=>e??null,oo=({ref:e,ref_key:n,ref_for:t})=>(typeof e=="number"&&(e=""+e),e!=null?et(e)||tt(e)||De(e)?{i:nt,r:e,k:n,f:!!t}:e:null);function b(e,n=null,t=null,r=0,i=null,o=e===be?0:1,a=!1,s=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:n,key:n&&lu(n),ref:n&&oo(n),scopeId:Ki,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:nt};return s?(Pa(u,t),o&128&&e.normalize(u)):t&&(u.shapeFlag|=et(t)?8:16),ri>0&&!a&&Gt&&(u.patchFlag>0||o&6)&&u.patchFlag!==32&&Gt.push(u),u}const he=j1;function j1(e,n=null,t=null,r=0,i=null,o=!1){if((!e||e===Lc)&&(e=jn),ro(e)){const s=Dr(e,n,!0);return t&&Pa(s,t),ri>0&&!o&&Gt&&(s.shapeFlag&6?Gt[Gt.indexOf(e)]=s:Gt.push(s)),s.patchFlag|=-2,s}if(J1(e)&&(e=e.__vccOpts),n){n=H1(n);let{class:s,style:u}=n;s&&!et(s)&&(n.class=we(s)),Ze(u)&&(wc(u)&&!Ie(u)&&(u=at({},u)),n.style=ze(u))}const a=et(e)?1:s1(e)?128:q1(e)?64:Ze(e)?4:De(e)?2:0;return b(e,n,t,r,i,a,o,!0)}function H1(e){return e?wc(e)||io in e?at({},e):e:null}function Dr(e,n,t=!1){const{props:r,ref:i,patchFlag:o,children:a}=e,s=n?ao(r||{},n):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&lu(s),ref:n&&n.ref?t&&i?Ie(i)?i.concat(oo(n)):[i,oo(n)]:oo(n):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:n&&e.type!==be?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Dr(e.ssContent),ssFallback:e.ssFallback&&Dr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Ne(e=" ",n=0){return he(to,null,e,n)}function oi(e,n){const t=he(no,null,e);return t.staticCount=n,t}function ge(e="",n=!1){return n?(U(),ke(jn,null,e)):he(jn,null,e)}function cn(e){return e==null||typeof e=="boolean"?he(jn):Ie(e)?he(be,null,e.slice()):typeof e=="object"?Hn(e):he(to,null,String(e))}function Hn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Dr(e)}function Pa(e,n){let t=0;const{shapeFlag:r}=e;if(n==null)n=null;else if(Ie(n))t=16;else if(typeof n=="object")if(r&65){const i=n.default;i&&(i._c&&(i._d=!1),Pa(e,i()),i._c&&(i._d=!0));return}else{t=32;const i=n._;!i&&!(io in n)?n._ctx=nt:i===3&&nt&&(nt.slots._===1?n._=1:(n._=2,e.patchFlag|=1024))}else De(n)?(n={default:n,_ctx:nt},t=32):(n=String(n),r&64?(t=16,n=[Ne(n)]):t=8);e.children=n,e.shapeFlag|=t}function ao(...e){const n={};for(let t=0;t<e.length;t++){const r=e[t];for(const i in r)if(i==="class")n.class!==r.class&&(n.class=we([n.class,r.class]));else if(i==="style")n.style=ze([n.style,r.style]);else if(Ti(i)){const o=n[i],a=r[i];a&&o!==a&&!(Ie(o)&&o.includes(a))&&(n[i]=o?[].concat(o,a):a)}else i!==""&&(n[i]=r[i])}return n}function un(e,n,t,r=null){Kt(e,n,7,[t,r])}const V1=Xc();let U1=0;function z1(e,n,t){const r=e.type,i=(n?n.appContext:e.appContext)||V1,o={uid:U1++,vnode:e,type:r,parent:n,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new tc(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Qc(r,i),emitsOptions:Dc(r,i),emit:null,emitted:null,propsDefaults:Qe,inheritAttrs:r.inheritAttrs,ctx:Qe,data:Qe,props:Qe,attrs:Qe,slots:Qe,refs:Qe,setupState:Qe,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:t,suspenseId:t?t.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=n?n.root:o,o.emit=e1.bind(null,o),e.ce&&e.ce(o),o}let ct=null;const cu=()=>ct||nt;let so,Ma;{const e=Jl(),n=(t,r)=>{let i;return(i=e[t])||(i=e[t]=[]),i.push(r),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};so=n("__VUE_INSTANCE_SETTERS__",t=>ct=t),Ma=n("__VUE_SSR_SETTERS__",t=>lo=t)}const ai=e=>{const n=ct;return so(e),e.scope.on(),()=>{e.scope.off(),so(n)}},uu=()=>{ct&&ct.scope.off(),so(null)};function fu(e){return e.vnode.shapeFlag&4}let lo=!1;function K1(e,n=!1){n&&Ma(n);const{props:t,children:r}=e.vnode,i=fu(e);T1(e,t,i,n),R1(e,r);const o=i?X1(e,n):void 0;return n&&Ma(!1),o}function X1(e,n){const t=e.type;e.accessCache=Object.create(null),e.proxy=Vi(new Proxy(e.ctx,b1));const{setup:r}=t;if(r){const i=e.setupContext=r.length>1?G1(e):null,o=ai(e);Ln();const a=Cn(r,e,0,[e.props,i]);if(Fn(),o(),Xl(a)){if(a.then(uu,uu),n)return a.then(s=>{du(e,s,n)}).catch(s=>{Ui(s,e,0)});e.asyncDep=a}else du(e,a,n)}else pu(e,n)}function du(e,n,t){De(n)?e.type.__ssrInlineRender?e.ssrRender=n:e.render=n:Ze(n)&&(e.setupState=Ac(n)),pu(e,t)}let hu;function pu(e,n,t){const r=e.type;if(!e.render){if(!n&&hu&&!r.render){const i=r.template||Ba(e).template;if(i){const{isCustomElement:o,compilerOptions:a}=e.appContext.config,{delimiters:s,compilerOptions:u}=r,f=at(at({isCustomElement:o,delimiters:s},a),u);r.render=hu(i,f)}}e.render=r.render||$t}{const i=ai(e);Ln();try{C1(e)}finally{Fn(),i()}}}function W1(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(n,t){return kt(e,"get","$attrs"),n[t]}}))}function G1(e){const n=t=>{e.exposed=t||{}};return{get attrs(){return W1(e)},slots:e.slots,emit:e.emit,expose:n}}function co(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Ac(Vi(e.exposed)),{get(n,t){if(t in n)return n[t];if(t in ei)return ei[t](e)},has(n,t){return t in n||t in ei}}))}const Q1=/(?:^|[-_])(\w)/g,Z1=e=>e.replace(Q1,n=>n.toUpperCase()).replace(/[-_]/g,"");function vu(e,n=!0){return De(e)?e.displayName||e.name:e.name||n&&e.__name}function gu(e,n,t=!1){let r=vu(n);if(!r&&n.__file){const i=n.__file.match(/([^/\\]+)\.\w+$/);i&&(r=i[1])}if(!r&&e&&e.parent){const i=o=>{for(const a in o)if(o[a]===n)return a};r=i(e.components||e.parent.type.components)||i(e.appContext.components)}return r?Z1(r):t?"App":"Anonymous"}function J1(e){return De(e)&&"__vccOpts"in e}const me=(e,n)=>Nd(e,n,lo);function Y1(e,n,t=Qe){const r=cu(),i=At(n),o=Lt(n),a=jd((u,f)=>{let c;return f1(()=>{const v=e[n];on(c,v)&&(c=v,f())}),{get(){return u(),t.get?t.get(c):c},set(v){const l=r.vnode.props;!(l&&(n in l||i in l||o in l)&&(`onUpdate:${n}`in l||`onUpdate:${i}`in l||`onUpdate:${o}`in l))&&on(v,c)&&(c=v,f()),r.emit(`update:${n}`,t.set?t.set(v):v)}}}),s=n==="modelValue"?"modelModifiers":`${n}Modifiers`;return a[Symbol.iterator]=()=>{let u=0;return{next(){return u<2?{value:u++?e[s]||{}:a,done:!1}:{done:!0}}}},a}function eh(e,n,t){const r=arguments.length;return r===2?Ze(n)&&!Ie(n)?ro(n)?he(e,null,[n]):he(e,n):he(e,null,n):(r>3?t=Array.prototype.slice.call(arguments,2):r===3&&ro(t)&&(t=[t]),he(e,n,t))}const th="3.4.21";/**
16
+ `],...Xd(t))}),n}function Xd({vnode:e,recurseCount:n}){const t=n>0?`... (${n} recursive calls)`:"",r=e.component?e.component.parent==null:!1,i=` at <${gu(e.component,e.type,r)}`,o=">"+t;return e.props?[i,...Wd(e.props),o]:[i+o]}function Wd(e){const n=[],t=Object.keys(e);return t.slice(0,3).forEach(r=>{n.push(...kc(r,e[r]))}),t.length>3&&n.push(" ..."),n}function kc(e,n,t){return et(n)?(n=JSON.stringify(n),t?n:[`${e}=${n}`]):typeof n=="number"||typeof n=="boolean"||n==null?t?n:[`${e}=${n}`]:tt(n)?(n=kc(e,Pe(n.value),!0),t?n:[`${e}=Ref<`,n,">"]):De(n)?[`${e}=fn${n.name?`<${n.name}>`:""}`]:(n=Pe(n),t?n:[`${e}=`,n])}function Cn(e,n,t,r){try{return r?e(...r):e()}catch(i){Ui(i,n,t)}}function Kt(e,n,t,r){if(De(e)){const o=Cn(e,n,t,r);return o&&Xl(o)&&o.catch(a=>{Ui(a,n,t)}),o}const i=[];for(let o=0;o<e.length;o++)i.push(Kt(e[o],n,t,r));return i}function Ui(e,n,t,r=!0){const i=n?n.vnode:null;if(n){let o=n.parent;const a=n.proxy,s=`https://vuejs.org/error-reference/#runtime-${t}`;for(;o;){const f=o.ec;if(f){for(let c=0;c<f.length;c++)if(f[c](e,a,s)===!1)return}o=o.parent}const u=n.appContext.config.errorHandler;if(u){Cn(u,null,10,[e,a,s]);return}}Gd(e,t,i,r)}function Gd(e,n,t,r=!0){console.error(e)}let Zr=!1,ba=!1;const gt=[];let an=0;const Tr=[];let Mn=null,Yn=0;const Oc=Promise.resolve();let Ca=null;function sn(e){const n=Ca||Oc;return e?n.then(this?e.bind(this):e):n}function Qd(e){let n=an+1,t=gt.length;for(;n<t;){const r=n+t>>>1,i=gt[r],o=Jr(i);o<e||o===e&&i.pre?n=r+1:t=r}return n}function wa(e){(!gt.length||!gt.includes(e,Zr&&e.allowRecurse?an+1:an))&&(e.id==null?gt.push(e):gt.splice(Qd(e.id),0,e),Sc())}function Sc(){!Zr&&!ba&&(ba=!0,Ca=Oc.then(Bc))}function Zd(e){const n=gt.indexOf(e);n>an&&gt.splice(n,1)}function Jd(e){Ie(e)?Tr.push(...e):(!Mn||!Mn.includes(e,e.allowRecurse?Yn+1:Yn))&&Tr.push(e),Sc()}function Ic(e,n,t=Zr?an+1:0){for(;t<gt.length;t++){const r=gt[t];if(r&&r.pre){if(e&&r.id!==e.uid)continue;gt.splice(t,1),t--,r()}}}function Tc(e){if(Tr.length){const n=[...new Set(Tr)].sort((t,r)=>Jr(t)-Jr(r));if(Tr.length=0,Mn){Mn.push(...n);return}for(Mn=n,Yn=0;Yn<Mn.length;Yn++)Mn[Yn]();Mn=null,Yn=0}}const Jr=e=>e.id==null?1/0:e.id,Yd=(e,n)=>{const t=Jr(e)-Jr(n);if(t===0){if(e.pre&&!n.pre)return-1;if(n.pre&&!e.pre)return 1}return t};function Bc(e){ba=!1,Zr=!0,gt.sort(Yd);try{for(an=0;an<gt.length;an++){const n=gt[an];n&&n.active!==!1&&Cn(n,null,14)}}finally{an=0,gt.length=0,Tc(),Zr=!1,Ca=null,(gt.length||Tr.length)&&Bc()}}function e1(e,n,...t){if(e.isUnmounted)return;const r=e.vnode.props||Qe;let i=t;const o=n.startsWith("update:"),a=o&&n.slice(7);if(a&&a in r){const c=`${a==="modelValue"?"model":a}Modifiers`,{number:v,trim:l}=r[c]||Qe;l&&(i=t.map(h=>et(h)?h.trim():h)),v&&(i=t.map(Kr))}let s,u=r[s=sa(n)]||r[s=sa(At(n))];!u&&o&&(u=r[s=sa(Lt(n))]),u&&Kt(u,e,6,i);const f=r[s+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,Kt(f,e,6,i)}}function Dc(e,n,t=!1){const r=n.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let a={},s=!1;if(!De(e)){const u=f=>{const c=Dc(f,n,!0);c&&(s=!0,at(a,c))};!t&&n.mixins.length&&n.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!o&&!s?(Ze(e)&&r.set(e,null),null):(Ie(o)?o.forEach(u=>a[u]=null):at(a,o),Ze(e)&&r.set(e,a),a)}function zi(e,n){return!e||!Ti(n)?!1:(n=n.slice(2).replace(/Once$/,""),He(e,n[0].toLowerCase()+n.slice(1))||He(e,Lt(n))||He(e,n))}let nt=null,Ki=null;function Xi(e){const n=nt;return nt=e,Ki=e&&e.type.__scopeId||null,n}function Xt(e){Ki=e}function Wt(){Ki=null}function Ve(e,n=nt,t){if(!n||e._n)return e;const r=(...i)=>{r._d&&au(-1);const o=Xi(n);let a;try{a=e(...i)}finally{Xi(o),r._d&&au(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Zy(){}function Ea(e){const{type:n,vnode:t,proxy:r,withProxy:i,props:o,propsOptions:[a],slots:s,attrs:u,emit:f,render:c,renderCache:v,data:l,setupState:h,ctx:p,inheritAttrs:g}=e;let d,m;const y=Xi(e);try{if(t.shapeFlag&4){const x=i||r,C=x;d=cn(c.call(C,x,v,o,h,l,p)),m=u}else{const x=n;d=cn(x.length>1?x(o,{attrs:u,slots:s,emit:f}):x(o,null)),m=n.props?u:t1(u)}}catch(x){ni.length=0,Ui(x,e,1),d=he(jn)}let _=d;if(m&&g!==!1){const x=Object.keys(m),{shapeFlag:C}=_;x.length&&C&7&&(a&&x.some(ia)&&(m=n1(m,a)),_=Dr(_,m))}return t.dirs&&(_=Dr(_),_.dirs=_.dirs?_.dirs.concat(t.dirs):t.dirs),t.transition&&(_.transition=t.transition),d=_,Xi(y),d}const t1=e=>{let n;for(const t in e)(t==="class"||t==="style"||Ti(t))&&((n||(n={}))[t]=e[t]);return n},n1=(e,n)=>{const t={};for(const r in e)(!ia(r)||!(r.slice(9)in n))&&(t[r]=e[r]);return t};function r1(e,n,t){const{props:r,children:i,component:o}=e,{props:a,children:s,patchFlag:u}=n,f=o.emitsOptions;if(n.dirs||n.transition)return!0;if(t&&u>=0){if(u&1024)return!0;if(u&16)return r?Rc(r,a,f):!!a;if(u&8){const c=n.dynamicProps;for(let v=0;v<c.length;v++){const l=c[v];if(a[l]!==r[l]&&!zi(f,l))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===a?!1:r?a?Rc(r,a,f):!0:!!a;return!1}function Rc(e,n,t){const r=Object.keys(n);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(n[o]!==e[o]&&!zi(t,o))return!0}return!1}function i1({vnode:e,parent:n},t){for(;n;){const r=n.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=n.vnode).el=t,n=n.parent;else break}}const Aa="components",o1="directives";function er(e,n){return ka(Aa,e,!0,n)||e}const Lc=Symbol.for("v-ndc");function Wi(e){return et(e)?ka(Aa,e,!1)||e:e||Lc}function a1(e){return ka(o1,e)}function ka(e,n,t=!0,r=!1){const i=nt||ct;if(i){const o=i.type;if(e===Aa){const s=vu(o,!1);if(s&&(s===n||s===At(n)||s===Di(At(n))))return o}const a=Fc(i[e]||o[e],n)||Fc(i.appContext[e],n);return!a&&r?o:a}}function Fc(e,n){return e&&(e[n]||e[At(n)]||e[Di(At(n))])}const s1=e=>e.__isSuspense;function l1(e,n){n&&n.pendingBranch?Ie(e)?n.effects.push(...e):n.effects.push(e):Jd(e)}const c1=Symbol.for("v-scx"),u1=()=>$n(c1);function f1(e,n){return Oa(e,null,{flush:"sync"})}const Gi={};function Ye(e,n,t){return Oa(e,n,t)}function Oa(e,n,{immediate:t,deep:r,flush:i,once:o,onTrack:a,onTrigger:s}=Qe){if(n&&o){const S=n;n=(...A)=>{S(...A),C()}}const u=ct,f=S=>r===!0?S:tr(S,r===!1?1:void 0);let c,v=!1,l=!1;if(tt(e)?(c=()=>e.value,v=Hi(e)):Pn(e)?(c=()=>f(e),v=!0):Ie(e)?(l=!0,v=e.some(S=>Pn(S)||Hi(S)),c=()=>e.map(S=>{if(tt(S))return S.value;if(Pn(S))return f(S);if(De(S))return Cn(S,u,2)})):De(e)?n?c=()=>Cn(e,u,2):c=()=>(h&&h(),Kt(e,u,3,[p])):c=$t,n&&r){const S=c;c=()=>tr(S())}let h,p=S=>{h=_.onStop=()=>{Cn(S,u,4),h=_.onStop=void 0}},g;if(lo)if(p=$t,n?t&&Kt(n,u,3,[c(),l?[]:void 0,p]):c(),i==="sync"){const S=u1();g=S.__watcherHandles||(S.__watcherHandles=[])}else return $t;let d=l?new Array(e.length).fill(Gi):Gi;const m=()=>{if(!(!_.active||!_.dirty))if(n){const S=_.run();(r||v||(l?S.some((A,I)=>on(A,d[I])):on(S,d)))&&(h&&h(),Kt(n,u,3,[S,d===Gi?void 0:l&&d[0]===Gi?[]:d,p]),d=S)}else _.run()};m.allowRecurse=!!n;let y;i==="sync"?y=m:i==="post"?y=()=>Ot(m,u&&u.suspense):(m.pre=!0,u&&(m.id=u.uid),y=()=>wa(m));const _=new ua(c,$t,y),x=rc(),C=()=>{_.stop(),x&&oa(x.effects,_)};return n?t?m():d=_.run():i==="post"?Ot(_.run.bind(_),u&&u.suspense):_.run(),g&&g.push(C),C}function d1(e,n,t){const r=this.proxy,i=et(e)?e.includes(".")?Nc(r,e):()=>r[e]:e.bind(r,r);let o;De(n)?o=n:(o=n.handler,t=n);const a=ai(this),s=Oa(i,o.bind(r),t);return a(),s}function Nc(e,n){const t=n.split(".");return()=>{let r=e;for(let i=0;i<t.length&&r;i++)r=r[t[i]];return r}}function tr(e,n,t=0,r){if(!Ze(e)||e.__v_skip)return e;if(n&&n>0){if(t>=n)return e;t++}if(r=r||new Set,r.has(e))return e;if(r.add(e),tt(e))tr(e.value,n,t,r);else if(Ie(e))for(let i=0;i<e.length;i++)tr(e[i],n,t,r);else if(Sr(e)||Or(e))e.forEach(i=>{tr(i,n,t,r)});else if(Gl(e))for(const i in e)tr(e[i],n,t,r);return e}function ln(e,n){if(nt===null)return e;const t=co(nt)||nt.proxy,r=e.dirs||(e.dirs=[]);for(let i=0;i<n.length;i++){let[o,a,s,u=Qe]=n[i];o&&(De(o)&&(o={mounted:o,updated:o}),o.deep&&tr(a),r.push({dir:o,instance:t,value:a,oldValue:void 0,arg:s,modifiers:u}))}return e}function nr(e,n,t,r){const i=e.dirs,o=n&&n.dirs;for(let a=0;a<i.length;a++){const s=i[a];o&&(s.oldValue=o[a].value);let u=s.dir[r];u&&(Ln(),Kt(u,t,8,[e.el,s,e,n]),Fn())}}/*! #__NO_SIDE_EFFECTS__ */function Pc(e,n){return De(e)?at({name:e.name},n,{setup:e}):e}const Yr=e=>!!e.type.__asyncLoader,Mc=e=>e.type.__isKeepAlive;function h1(e,n){qc(e,"a",n)}function p1(e,n){qc(e,"da",n)}function qc(e,n,t=ct){const r=e.__wdc||(e.__wdc=()=>{let i=t;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Qi(n,r,t),t){let i=t.parent;for(;i&&i.parent;)Mc(i.parent.vnode)&&v1(r,n,t,i),i=i.parent}}function v1(e,n,t,r){const i=Qi(n,e,r,!0);Ji(()=>{oa(r[n],i)},t)}function Qi(e,n,t=ct,r=!1){if(t){const i=t[e]||(t[e]=[]),o=n.__weh||(n.__weh=(...a)=>{if(t.isUnmounted)return;Ln();const s=ai(t),u=Kt(n,t,e,a);return s(),Fn(),u});return r?i.unshift(o):i.push(o),o}}const wn=e=>(n,t=ct)=>(!lo||e==="sp")&&Qi(e,(...r)=>n(...r),t),qn=wn("bm"),Nt=wn("m"),$c=wn("bu"),g1=wn("u"),Zi=wn("bum"),Ji=wn("um"),m1=wn("sp"),y1=wn("rtg"),x1=wn("rtc");function _1(e,n=ct){Qi("ec",e,n)}function Me(e,n,t,r){let i;const o=t&&t[r];if(Ie(e)||et(e)){i=new Array(e.length);for(let a=0,s=e.length;a<s;a++)i[a]=n(e[a],a,void 0,o&&o[a])}else if(typeof e=="number"){i=new Array(e);for(let a=0;a<e;a++)i[a]=n(a+1,a,void 0,o&&o[a])}else if(Ze(e))if(e[Symbol.iterator])i=Array.from(e,(a,s)=>n(a,s,void 0,o&&o[s]));else{const a=Object.keys(e);i=new Array(a.length);for(let s=0,u=a.length;s<u;s++){const f=a[s];i[s]=n(e[f],f,s,o&&o[s])}}else i=[];return t&&(t[r]=i),i}function Je(e,n,t={},r,i){if(nt.isCE||nt.parent&&Yr(nt.parent)&&nt.parent.isCE)return n!=="default"&&(t.name=n),he("slot",t,r&&r());let o=e[n];o&&o._c&&(o._d=!1),U();const a=o&&jc(o(t)),s=ke(be,{key:t.key||a&&a.key||`_${n}`},a||(r?r():[]),a&&e._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),o&&o._c&&(o._d=!0),s}function jc(e){return e.some(n=>ro(n)?!(n.type===jn||n.type===be&&!jc(n.children)):!0)?e:null}const Sa=e=>e?fu(e)?co(e)||e.proxy:Sa(e.parent):null,ei=at(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Sa(e.parent),$root:e=>Sa(e.root),$emit:e=>e.emit,$options:e=>Ba(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,wa(e.update)}),$nextTick:e=>e.n||(e.n=sn.bind(e.proxy)),$watch:e=>d1.bind(e)}),Ia=(e,n)=>e!==Qe&&!e.__isScriptSetup&&He(e,n),b1={get({_:e},n){const{ctx:t,setupState:r,data:i,props:o,accessCache:a,type:s,appContext:u}=e;let f;if(n[0]!=="$"){const h=a[n];if(h!==void 0)switch(h){case 1:return r[n];case 2:return i[n];case 4:return t[n];case 3:return o[n]}else{if(Ia(r,n))return a[n]=1,r[n];if(i!==Qe&&He(i,n))return a[n]=2,i[n];if((f=e.propsOptions[0])&&He(f,n))return a[n]=3,o[n];if(t!==Qe&&He(t,n))return a[n]=4,t[n];Ta&&(a[n]=0)}}const c=ei[n];let v,l;if(c)return n==="$attrs"&&kt(e,"get",n),c(e);if((v=s.__cssModules)&&(v=v[n]))return v;if(t!==Qe&&He(t,n))return a[n]=4,t[n];if(l=u.config.globalProperties,He(l,n))return l[n]},set({_:e},n,t){const{data:r,setupState:i,ctx:o}=e;return Ia(i,n)?(i[n]=t,!0):r!==Qe&&He(r,n)?(r[n]=t,!0):He(e.props,n)||n[0]==="$"&&n.slice(1)in e?!1:(o[n]=t,!0)},has({_:{data:e,setupState:n,accessCache:t,ctx:r,appContext:i,propsOptions:o}},a){let s;return!!t[a]||e!==Qe&&He(e,a)||Ia(n,a)||(s=o[0])&&He(s,a)||He(r,a)||He(ei,a)||He(i.config.globalProperties,a)},defineProperty(e,n,t){return t.get!=null?e._.accessCache[n]=0:He(t,"value")&&this.set(e,n,t.value,null),Reflect.defineProperty(e,n,t)}};function Yi(e){return Ie(e)?e.reduce((n,t)=>(n[t]=null,n),{}):e}function Hc(e,n){return!e||!n?e||n:Ie(e)&&Ie(n)?e.concat(n):at({},Yi(e),Yi(n))}let Ta=!0;function C1(e){const n=Ba(e),t=e.proxy,r=e.ctx;Ta=!1,n.beforeCreate&&Vc(n.beforeCreate,e,"bc");const{data:i,computed:o,methods:a,watch:s,provide:u,inject:f,created:c,beforeMount:v,mounted:l,beforeUpdate:h,updated:p,activated:g,deactivated:d,beforeDestroy:m,beforeUnmount:y,destroyed:_,unmounted:x,render:C,renderTracked:S,renderTriggered:A,errorCaptured:I,serverPrefetch:B,expose:O,inheritAttrs:E,components:k,directives:R,filters:F}=n;if(f&&w1(f,r,null),a)for(const ee in a){const ne=a[ee];De(ne)&&(r[ee]=ne.bind(t))}if(i){const ee=i.call(t,t);Ze(ee)&&(e.data=Xr(ee))}if(Ta=!0,o)for(const ee in o){const ne=o[ee],Q=De(ne)?ne.bind(t,t):De(ne.get)?ne.get.bind(t,t):$t,N=!De(ne)&&De(ne.set)?ne.set.bind(t):$t,w=me({get:Q,set:N});Object.defineProperty(r,ee,{enumerable:!0,configurable:!0,get:()=>w.value,set:D=>w.value=D})}if(s)for(const ee in s)Uc(s[ee],r,t,ee);if(u){const ee=De(u)?u.call(t):u;Reflect.ownKeys(ee).forEach(ne=>{I1(ne,ee[ne])})}c&&Vc(c,e,"c");function Z(ee,ne){Ie(ne)?ne.forEach(Q=>ee(Q.bind(t))):ne&&ee(ne.bind(t))}if(Z(qn,v),Z(Nt,l),Z($c,h),Z(g1,p),Z(h1,g),Z(p1,d),Z(_1,I),Z(x1,S),Z(y1,A),Z(Zi,y),Z(Ji,x),Z(m1,B),Ie(O))if(O.length){const ee=e.exposed||(e.exposed={});O.forEach(ne=>{Object.defineProperty(ee,ne,{get:()=>t[ne],set:Q=>t[ne]=Q})})}else e.exposed||(e.exposed={});C&&e.render===$t&&(e.render=C),E!=null&&(e.inheritAttrs=E),k&&(e.components=k),R&&(e.directives=R)}function w1(e,n,t=$t){Ie(e)&&(e=Da(e));for(const r in e){const i=e[r];let o;Ze(i)?"default"in i?o=$n(i.from||r,i.default,!0):o=$n(i.from||r):o=$n(i),tt(o)?Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):n[r]=o}}function Vc(e,n,t){Kt(Ie(e)?e.map(r=>r.bind(n.proxy)):e.bind(n.proxy),n,t)}function Uc(e,n,t,r){const i=r.includes(".")?Nc(t,r):()=>t[r];if(et(e)){const o=n[e];De(o)&&Ye(i,o)}else if(De(e))Ye(i,e.bind(t));else if(Ze(e))if(Ie(e))e.forEach(o=>Uc(o,n,t,r));else{const o=De(e.handler)?e.handler.bind(t):n[e.handler];De(o)&&Ye(i,o,e)}}function Ba(e){const n=e.type,{mixins:t,extends:r}=n,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,s=o.get(n);let u;return s?u=s:!i.length&&!t&&!r?u=n:(u={},i.length&&i.forEach(f=>eo(u,f,a,!0)),eo(u,n,a)),Ze(n)&&o.set(n,u),u}function eo(e,n,t,r=!1){const{mixins:i,extends:o}=n;o&&eo(e,o,t,!0),i&&i.forEach(a=>eo(e,a,t,!0));for(const a in n)if(!(r&&a==="expose")){const s=E1[a]||t&&t[a];e[a]=s?s(e[a],n[a]):n[a]}return e}const E1={data:zc,props:Kc,emits:Kc,methods:ti,computed:ti,beforeCreate:Ct,created:Ct,beforeMount:Ct,mounted:Ct,beforeUpdate:Ct,updated:Ct,beforeDestroy:Ct,beforeUnmount:Ct,destroyed:Ct,unmounted:Ct,activated:Ct,deactivated:Ct,errorCaptured:Ct,serverPrefetch:Ct,components:ti,directives:ti,watch:k1,provide:zc,inject:A1};function zc(e,n){return n?e?function(){return at(De(e)?e.call(this,this):e,De(n)?n.call(this,this):n)}:n:e}function A1(e,n){return ti(Da(e),Da(n))}function Da(e){if(Ie(e)){const n={};for(let t=0;t<e.length;t++)n[e[t]]=e[t];return n}return e}function Ct(e,n){return e?[...new Set([].concat(e,n))]:n}function ti(e,n){return e?at(Object.create(null),e,n):n}function Kc(e,n){return e?Ie(e)&&Ie(n)?[...new Set([...e,...n])]:at(Object.create(null),Yi(e),Yi(n??{})):n}function k1(e,n){if(!e)return n;if(!n)return e;const t=at(Object.create(null),e);for(const r in n)t[r]=Ct(e[r],n[r]);return t}function Xc(){return{app:null,config:{isNativeTag:nd,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let O1=0;function S1(e,n){return function(r,i=null){De(r)||(r=at({},r)),i!=null&&!Ze(i)&&(i=null);const o=Xc(),a=new WeakSet;let s=!1;const u=o.app={_uid:O1++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:th,get config(){return o.config},set config(f){},use(f,...c){return a.has(f)||(f&&De(f.install)?(a.add(f),f.install(u,...c)):De(f)&&(a.add(f),f(u,...c))),u},mixin(f){return o.mixins.includes(f)||o.mixins.push(f),u},component(f,c){return c?(o.components[f]=c,u):o.components[f]},directive(f,c){return c?(o.directives[f]=c,u):o.directives[f]},mount(f,c,v){if(!s){const l=he(r,i);return l.appContext=o,v===!0?v="svg":v===!1&&(v=void 0),c&&n?n(l,f):e(l,f,v),s=!0,u._container=f,f.__vue_app__=u,co(l.component)||l.component.proxy}},unmount(){s&&(e(null,u._container),delete u._container.__vue_app__)},provide(f,c){return o.provides[f]=c,u},runWithContext(f){const c=Br;Br=u;try{return f()}finally{Br=c}}};return u}}let Br=null;function I1(e,n){if(ct){let t=ct.provides;const r=ct.parent&&ct.parent.provides;r===t&&(t=ct.provides=Object.create(r)),t[e]=n}}function $n(e,n,t=!1){const r=ct||nt;if(r||Br){const i=r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:Br._context.provides;if(i&&e in i)return i[e];if(arguments.length>1)return t&&De(n)?n.call(r&&r.proxy):n}}function Wc(){return!!(ct||nt||Br)}function T1(e,n,t,r=!1){const i={},o={};Li(o,io,1),e.propsDefaults=Object.create(null),Gc(e,n,i,o);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);t?e.props=r?i:Fd(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function B1(e,n,t,r){const{props:i,attrs:o,vnode:{patchFlag:a}}=e,s=Pe(i),[u]=e.propsOptions;let f=!1;if((r||a>0)&&!(a&16)){if(a&8){const c=e.vnode.dynamicProps;for(let v=0;v<c.length;v++){let l=c[v];if(zi(e.emitsOptions,l))continue;const h=n[l];if(u)if(He(o,l))h!==o[l]&&(o[l]=h,f=!0);else{const p=At(l);i[p]=Ra(u,s,p,h,e,!1)}else h!==o[l]&&(o[l]=h,f=!0)}}}else{Gc(e,n,i,o)&&(f=!0);let c;for(const v in s)(!n||!He(n,v)&&((c=Lt(v))===v||!He(n,c)))&&(u?t&&(t[v]!==void 0||t[c]!==void 0)&&(i[v]=Ra(u,s,v,void 0,e,!0)):delete i[v]);if(o!==s)for(const v in o)(!n||!He(n,v))&&(delete o[v],f=!0)}f&&bn(e,"set","$attrs")}function Gc(e,n,t,r){const[i,o]=e.propsOptions;let a=!1,s;if(n)for(let u in n){if(zr(u))continue;const f=n[u];let c;i&&He(i,c=At(u))?!o||!o.includes(c)?t[c]=f:(s||(s={}))[c]=f:zi(e.emitsOptions,u)||(!(u in r)||f!==r[u])&&(r[u]=f,a=!0)}if(o){const u=Pe(t),f=s||Qe;for(let c=0;c<o.length;c++){const v=o[c];t[v]=Ra(i,u,v,f[v],e,!He(f,v))}}return a}function Ra(e,n,t,r,i,o){const a=e[t];if(a!=null){const s=He(a,"default");if(s&&r===void 0){const u=a.default;if(a.type!==Function&&!a.skipFactory&&De(u)){const{propsDefaults:f}=i;if(t in f)r=f[t];else{const c=ai(i);r=f[t]=u.call(null,n),c()}}else r=u}a[0]&&(o&&!s?r=!1:a[1]&&(r===""||r===Lt(t))&&(r=!0))}return r}function Qc(e,n,t=!1){const r=n.propsCache,i=r.get(e);if(i)return i;const o=e.props,a={},s=[];let u=!1;if(!De(e)){const c=v=>{u=!0;const[l,h]=Qc(v,n,!0);at(a,l),h&&s.push(...h)};!t&&n.mixins.length&&n.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!u)return Ze(e)&&r.set(e,kr),kr;if(Ie(o))for(let c=0;c<o.length;c++){const v=At(o[c]);Zc(v)&&(a[v]=Qe)}else if(o)for(const c in o){const v=At(c);if(Zc(v)){const l=o[c],h=a[v]=Ie(l)||De(l)?{type:l}:at({},l);if(h){const p=eu(Boolean,h.type),g=eu(String,h.type);h[0]=p>-1,h[1]=g<0||p<g,(p>-1||He(h,"default"))&&s.push(v)}}}const f=[a,s];return Ze(e)&&r.set(e,f),f}function Zc(e){return e[0]!=="$"&&!zr(e)}function Jc(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Yc(e,n){return Jc(e)===Jc(n)}function eu(e,n){return Ie(n)?n.findIndex(t=>Yc(t,e)):De(n)&&Yc(n,e)?0:-1}const tu=e=>e[0]==="_"||e==="$stable",La=e=>Ie(e)?e.map(cn):[cn(e)],D1=(e,n,t)=>{if(n._n)return n;const r=Ve((...i)=>La(n(...i)),t);return r._c=!1,r},nu=(e,n,t)=>{const r=e._ctx;for(const i in e){if(tu(i))continue;const o=e[i];if(De(o))n[i]=D1(i,o,r);else if(o!=null){const a=La(o);n[i]=()=>a}}},ru=(e,n)=>{const t=La(n);e.slots.default=()=>t},R1=(e,n)=>{if(e.vnode.shapeFlag&32){const t=n._;t?(e.slots=Pe(n),Li(n,"_",t)):nu(n,e.slots={})}else e.slots={},n&&ru(e,n);Li(e.slots,io,1)},L1=(e,n,t)=>{const{vnode:r,slots:i}=e;let o=!0,a=Qe;if(r.shapeFlag&32){const s=n._;s?t&&s===1?o=!1:(at(i,n),!t&&s===1&&delete i._):(o=!n.$stable,nu(n,i)),a=n}else n&&(ru(e,n),a={default:1});if(o)for(const s in i)!tu(s)&&a[s]==null&&delete i[s]};function Fa(e,n,t,r,i=!1){if(Ie(e)){e.forEach((l,h)=>Fa(l,n&&(Ie(n)?n[h]:n),t,r,i));return}if(Yr(r)&&!i)return;const o=r.shapeFlag&4?co(r.component)||r.component.proxy:r.el,a=i?null:o,{i:s,r:u}=e,f=n&&n.r,c=s.refs===Qe?s.refs={}:s.refs,v=s.setupState;if(f!=null&&f!==u&&(et(f)?(c[f]=null,He(v,f)&&(v[f]=null)):tt(f)&&(f.value=null)),De(u))Cn(u,s,12,[a,c]);else{const l=et(u),h=tt(u);if(l||h){const p=()=>{if(e.f){const g=l?He(v,u)?v[u]:c[u]:u.value;i?Ie(g)&&oa(g,o):Ie(g)?g.includes(o)||g.push(o):l?(c[u]=[o],He(v,u)&&(v[u]=c[u])):(u.value=[o],e.k&&(c[e.k]=u.value))}else l?(c[u]=a,He(v,u)&&(v[u]=a)):h&&(u.value=a,e.k&&(c[e.k]=a))};a?(p.id=-1,Ot(p,t)):p()}}}const Ot=l1;function F1(e){return N1(e)}function N1(e,n){const t=Jl();t.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:a,createText:s,createComment:u,setText:f,setElementText:c,parentNode:v,nextSibling:l,setScopeId:h=$t,insertStaticContent:p}=e,g=(P,X,se,fe=null,ue=null,ie=null,oe=void 0,le=null,ce=!!X.dynamicChildren)=>{if(P===X)return;P&&!ii(P,X)&&(fe=W(P),D(P,ue,ie,!0),P=null),X.patchFlag===-2&&(ce=!1,X.dynamicChildren=null);const{type:ae,ref:ve,shapeFlag:ye}=X;switch(ae){case to:d(P,X,se,fe);break;case jn:m(P,X,se,fe);break;case no:P==null&&y(X,se,fe,oe);break;case be:k(P,X,se,fe,ue,ie,oe,le,ce);break;default:ye&1?C(P,X,se,fe,ue,ie,oe,le,ce):ye&6?R(P,X,se,fe,ue,ie,oe,le,ce):(ye&64||ye&128)&&ae.process(P,X,se,fe,ue,ie,oe,le,ce,V)}ve!=null&&ue&&Fa(ve,P&&P.ref,ie,X||P,!X)},d=(P,X,se,fe)=>{if(P==null)r(X.el=s(X.children),se,fe);else{const ue=X.el=P.el;X.children!==P.children&&f(ue,X.children)}},m=(P,X,se,fe)=>{P==null?r(X.el=u(X.children||""),se,fe):X.el=P.el},y=(P,X,se,fe)=>{[P.el,P.anchor]=p(P.children,X,se,fe,P.el,P.anchor)},_=({el:P,anchor:X},se,fe)=>{let ue;for(;P&&P!==X;)ue=l(P),r(P,se,fe),P=ue;r(X,se,fe)},x=({el:P,anchor:X})=>{let se;for(;P&&P!==X;)se=l(P),i(P),P=se;i(X)},C=(P,X,se,fe,ue,ie,oe,le,ce)=>{X.type==="svg"?oe="svg":X.type==="math"&&(oe="mathml"),P==null?S(X,se,fe,ue,ie,oe,le,ce):B(P,X,ue,ie,oe,le,ce)},S=(P,X,se,fe,ue,ie,oe,le)=>{let ce,ae;const{props:ve,shapeFlag:ye,transition:_e,dirs:Ce}=P;if(ce=P.el=a(P.type,ie,ve&&ve.is,ve),ye&8?c(ce,P.children):ye&16&&I(P.children,ce,null,fe,ue,Na(P,ie),oe,le),Ce&&nr(P,null,fe,"created"),A(ce,P,P.scopeId,oe,fe),ve){for(const Ee in ve)Ee!=="value"&&!zr(Ee)&&o(ce,Ee,null,ve[Ee],ie,P.children,fe,ue,j);"value"in ve&&o(ce,"value",null,ve.value,ie),(ae=ve.onVnodeBeforeMount)&&un(ae,fe,P)}Ce&&nr(P,null,fe,"beforeMount");const Ae=P1(ue,_e);Ae&&_e.beforeEnter(ce),r(ce,X,se),((ae=ve&&ve.onVnodeMounted)||Ae||Ce)&&Ot(()=>{ae&&un(ae,fe,P),Ae&&_e.enter(ce),Ce&&nr(P,null,fe,"mounted")},ue)},A=(P,X,se,fe,ue)=>{if(se&&h(P,se),fe)for(let ie=0;ie<fe.length;ie++)h(P,fe[ie]);if(ue){let ie=ue.subTree;if(X===ie){const oe=ue.vnode;A(P,oe,oe.scopeId,oe.slotScopeIds,ue.parent)}}},I=(P,X,se,fe,ue,ie,oe,le,ce=0)=>{for(let ae=ce;ae<P.length;ae++){const ve=P[ae]=le?Hn(P[ae]):cn(P[ae]);g(null,ve,X,se,fe,ue,ie,oe,le)}},B=(P,X,se,fe,ue,ie,oe)=>{const le=X.el=P.el;let{patchFlag:ce,dynamicChildren:ae,dirs:ve}=X;ce|=P.patchFlag&16;const ye=P.props||Qe,_e=X.props||Qe;let Ce;if(se&&rr(se,!1),(Ce=_e.onVnodeBeforeUpdate)&&un(Ce,se,X,P),ve&&nr(X,P,se,"beforeUpdate"),se&&rr(se,!0),ae?O(P.dynamicChildren,ae,le,se,fe,Na(X,ue),ie):oe||ne(P,X,le,null,se,fe,Na(X,ue),ie,!1),ce>0){if(ce&16)E(le,X,ye,_e,se,fe,ue);else if(ce&2&&ye.class!==_e.class&&o(le,"class",null,_e.class,ue),ce&4&&o(le,"style",ye.style,_e.style,ue),ce&8){const Ae=X.dynamicProps;for(let Ee=0;Ee<Ae.length;Ee++){const $e=Ae[Ee],Te=ye[$e],Ke=_e[$e];(Ke!==Te||$e==="value")&&o(le,$e,Te,Ke,ue,P.children,se,fe,j)}}ce&1&&P.children!==X.children&&c(le,X.children)}else!oe&&ae==null&&E(le,X,ye,_e,se,fe,ue);((Ce=_e.onVnodeUpdated)||ve)&&Ot(()=>{Ce&&un(Ce,se,X,P),ve&&nr(X,P,se,"updated")},fe)},O=(P,X,se,fe,ue,ie,oe)=>{for(let le=0;le<X.length;le++){const ce=P[le],ae=X[le],ve=ce.el&&(ce.type===be||!ii(ce,ae)||ce.shapeFlag&70)?v(ce.el):se;g(ce,ae,ve,null,fe,ue,ie,oe,!0)}},E=(P,X,se,fe,ue,ie,oe)=>{if(se!==fe){if(se!==Qe)for(const le in se)!zr(le)&&!(le in fe)&&o(P,le,se[le],null,oe,X.children,ue,ie,j);for(const le in fe){if(zr(le))continue;const ce=fe[le],ae=se[le];ce!==ae&&le!=="value"&&o(P,le,ae,ce,oe,X.children,ue,ie,j)}"value"in fe&&o(P,"value",se.value,fe.value,oe)}},k=(P,X,se,fe,ue,ie,oe,le,ce)=>{const ae=X.el=P?P.el:s(""),ve=X.anchor=P?P.anchor:s("");let{patchFlag:ye,dynamicChildren:_e,slotScopeIds:Ce}=X;Ce&&(le=le?le.concat(Ce):Ce),P==null?(r(ae,se,fe),r(ve,se,fe),I(X.children||[],se,ve,ue,ie,oe,le,ce)):ye>0&&ye&64&&_e&&P.dynamicChildren?(O(P.dynamicChildren,_e,se,ue,ie,oe,le),(X.key!=null||ue&&X===ue.subTree)&&iu(P,X,!0)):ne(P,X,se,ve,ue,ie,oe,le,ce)},R=(P,X,se,fe,ue,ie,oe,le,ce)=>{X.slotScopeIds=le,P==null?X.shapeFlag&512?ue.ctx.activate(X,se,fe,oe,ce):F(X,se,fe,ue,ie,oe,ce):q(P,X,ce)},F=(P,X,se,fe,ue,ie,oe)=>{const le=P.component=z1(P,fe,ue);if(Mc(P)&&(le.ctx.renderer=V),K1(le),le.asyncDep){if(ue&&ue.registerDep(le,Z),!P.el){const ce=le.subTree=he(jn);m(null,ce,X,se)}}else Z(le,P,X,se,ue,ie,oe)},q=(P,X,se)=>{const fe=X.component=P.component;if(r1(P,X,se))if(fe.asyncDep&&!fe.asyncResolved){ee(fe,X,se);return}else fe.next=X,Zd(fe.update),fe.effect.dirty=!0,fe.update();else X.el=P.el,fe.vnode=X},Z=(P,X,se,fe,ue,ie,oe)=>{const le=()=>{if(P.isMounted){let{next:ve,bu:ye,u:_e,parent:Ce,vnode:Ae}=P;{const dt=ou(P);if(dt){ve&&(ve.el=Ae.el,ee(P,ve,oe)),dt.asyncDep.then(()=>{P.isUnmounted||le()});return}}let Ee=ve,$e;rr(P,!1),ve?(ve.el=Ae.el,ee(P,ve,oe)):ve=Ae,ye&&Ri(ye),($e=ve.props&&ve.props.onVnodeBeforeUpdate)&&un($e,Ce,ve,Ae),rr(P,!0);const Te=Ea(P),Ke=P.subTree;P.subTree=Te,g(Ke,Te,v(Ke.el),W(Ke),P,ue,ie),ve.el=Te.el,Ee===null&&i1(P,Te.el),_e&&Ot(_e,ue),($e=ve.props&&ve.props.onVnodeUpdated)&&Ot(()=>un($e,Ce,ve,Ae),ue)}else{let ve;const{el:ye,props:_e}=X,{bm:Ce,m:Ae,parent:Ee}=P,$e=Yr(X);if(rr(P,!1),Ce&&Ri(Ce),!$e&&(ve=_e&&_e.onVnodeBeforeMount)&&un(ve,Ee,X),rr(P,!0),ye&&J){const Te=()=>{P.subTree=Ea(P),J(ye,P.subTree,P,ue,null)};$e?X.type.__asyncLoader().then(()=>!P.isUnmounted&&Te()):Te()}else{const Te=P.subTree=Ea(P);g(null,Te,se,fe,P,ue,ie),X.el=Te.el}if(Ae&&Ot(Ae,ue),!$e&&(ve=_e&&_e.onVnodeMounted)){const Te=X;Ot(()=>un(ve,Ee,Te),ue)}(X.shapeFlag&256||Ee&&Yr(Ee.vnode)&&Ee.vnode.shapeFlag&256)&&P.a&&Ot(P.a,ue),P.isMounted=!0,X=se=fe=null}},ce=P.effect=new ua(le,$t,()=>wa(ae),P.scope),ae=P.update=()=>{ce.dirty&&ce.run()};ae.id=P.uid,rr(P,!0),ae()},ee=(P,X,se)=>{X.component=P;const fe=P.vnode.props;P.vnode=X,P.next=null,B1(P,X.props,fe,se),L1(P,X.children,se),Ln(),Ic(P),Fn()},ne=(P,X,se,fe,ue,ie,oe,le,ce=!1)=>{const ae=P&&P.children,ve=P?P.shapeFlag:0,ye=X.children,{patchFlag:_e,shapeFlag:Ce}=X;if(_e>0){if(_e&128){N(ae,ye,se,fe,ue,ie,oe,le,ce);return}else if(_e&256){Q(ae,ye,se,fe,ue,ie,oe,le,ce);return}}Ce&8?(ve&16&&j(ae,ue,ie),ye!==ae&&c(se,ye)):ve&16?Ce&16?N(ae,ye,se,fe,ue,ie,oe,le,ce):j(ae,ue,ie,!0):(ve&8&&c(se,""),Ce&16&&I(ye,se,fe,ue,ie,oe,le,ce))},Q=(P,X,se,fe,ue,ie,oe,le,ce)=>{P=P||kr,X=X||kr;const ae=P.length,ve=X.length,ye=Math.min(ae,ve);let _e;for(_e=0;_e<ye;_e++){const Ce=X[_e]=ce?Hn(X[_e]):cn(X[_e]);g(P[_e],Ce,se,null,ue,ie,oe,le,ce)}ae>ve?j(P,ue,ie,!0,!1,ye):I(X,se,fe,ue,ie,oe,le,ce,ye)},N=(P,X,se,fe,ue,ie,oe,le,ce)=>{let ae=0;const ve=X.length;let ye=P.length-1,_e=ve-1;for(;ae<=ye&&ae<=_e;){const Ce=P[ae],Ae=X[ae]=ce?Hn(X[ae]):cn(X[ae]);if(ii(Ce,Ae))g(Ce,Ae,se,null,ue,ie,oe,le,ce);else break;ae++}for(;ae<=ye&&ae<=_e;){const Ce=P[ye],Ae=X[_e]=ce?Hn(X[_e]):cn(X[_e]);if(ii(Ce,Ae))g(Ce,Ae,se,null,ue,ie,oe,le,ce);else break;ye--,_e--}if(ae>ye){if(ae<=_e){const Ce=_e+1,Ae=Ce<ve?X[Ce].el:fe;for(;ae<=_e;)g(null,X[ae]=ce?Hn(X[ae]):cn(X[ae]),se,Ae,ue,ie,oe,le,ce),ae++}}else if(ae>_e)for(;ae<=ye;)D(P[ae],ue,ie,!0),ae++;else{const Ce=ae,Ae=ae,Ee=new Map;for(ae=Ae;ae<=_e;ae++){const it=X[ae]=ce?Hn(X[ae]):cn(X[ae]);it.key!=null&&Ee.set(it.key,ae)}let $e,Te=0;const Ke=_e-Ae+1;let dt=!1,Xn=0;const Bt=new Array(Ke);for(ae=0;ae<Ke;ae++)Bt[ae]=0;for(ae=Ce;ae<=ye;ae++){const it=P[ae];if(Te>=Ke){D(it,ue,ie,!0);continue}let st;if(it.key!=null)st=Ee.get(it.key);else for($e=Ae;$e<=_e;$e++)if(Bt[$e-Ae]===0&&ii(it,X[$e])){st=$e;break}st===void 0?D(it,ue,ie,!0):(Bt[st-Ae]=ae+1,st>=Xn?Xn=st:dt=!0,g(it,X[st],se,null,ue,ie,oe,le,ce),Te++)}const Vt=dt?M1(Bt):kr;for($e=Vt.length-1,ae=Ke-1;ae>=0;ae--){const it=Ae+ae,st=X[it],Mt=it+1<ve?X[it+1].el:fe;Bt[ae]===0?g(null,st,se,Mt,ue,ie,oe,le,ce):dt&&($e<0||ae!==Vt[$e]?w(st,se,Mt,2):$e--)}}},w=(P,X,se,fe,ue=null)=>{const{el:ie,type:oe,transition:le,children:ce,shapeFlag:ae}=P;if(ae&6){w(P.component.subTree,X,se,fe);return}if(ae&128){P.suspense.move(X,se,fe);return}if(ae&64){oe.move(P,X,se,V);return}if(oe===be){r(ie,X,se);for(let ye=0;ye<ce.length;ye++)w(ce[ye],X,se,fe);r(P.anchor,X,se);return}if(oe===no){_(P,X,se);return}if(fe!==2&&ae&1&&le)if(fe===0)le.beforeEnter(ie),r(ie,X,se),Ot(()=>le.enter(ie),ue);else{const{leave:ye,delayLeave:_e,afterLeave:Ce}=le,Ae=()=>r(ie,X,se),Ee=()=>{ye(ie,()=>{Ae(),Ce&&Ce()})};_e?_e(ie,Ae,Ee):Ee()}else r(ie,X,se)},D=(P,X,se,fe=!1,ue=!1)=>{const{type:ie,props:oe,ref:le,children:ce,dynamicChildren:ae,shapeFlag:ve,patchFlag:ye,dirs:_e}=P;if(le!=null&&Fa(le,null,se,P,!0),ve&256){X.ctx.deactivate(P);return}const Ce=ve&1&&_e,Ae=!Yr(P);let Ee;if(Ae&&(Ee=oe&&oe.onVnodeBeforeUnmount)&&un(Ee,X,P),ve&6)G(P.component,se,fe);else{if(ve&128){P.suspense.unmount(se,fe);return}Ce&&nr(P,null,X,"beforeUnmount"),ve&64?P.type.remove(P,X,se,ue,V,fe):ae&&(ie!==be||ye>0&&ye&64)?j(ae,X,se,!1,!0):(ie===be&&ye&384||!ue&&ve&16)&&j(ce,X,se),fe&&L(P)}(Ae&&(Ee=oe&&oe.onVnodeUnmounted)||Ce)&&Ot(()=>{Ee&&un(Ee,X,P),Ce&&nr(P,null,X,"unmounted")},se)},L=P=>{const{type:X,el:se,anchor:fe,transition:ue}=P;if(X===be){$(se,fe);return}if(X===no){x(P);return}const ie=()=>{i(se),ue&&!ue.persisted&&ue.afterLeave&&ue.afterLeave()};if(P.shapeFlag&1&&ue&&!ue.persisted){const{leave:oe,delayLeave:le}=ue,ce=()=>oe(se,ie);le?le(P.el,ie,ce):ce()}else ie()},$=(P,X)=>{let se;for(;P!==X;)se=l(P),i(P),P=se;i(X)},G=(P,X,se)=>{const{bum:fe,scope:ue,update:ie,subTree:oe,um:le}=P;fe&&Ri(fe),ue.stop(),ie&&(ie.active=!1,D(oe,P,X,se)),le&&Ot(le,X),Ot(()=>{P.isUnmounted=!0},X),X&&X.pendingBranch&&!X.isUnmounted&&P.asyncDep&&!P.asyncResolved&&P.suspenseId===X.pendingId&&(X.deps--,X.deps===0&&X.resolve())},j=(P,X,se,fe=!1,ue=!1,ie=0)=>{for(let oe=ie;oe<P.length;oe++)D(P[oe],X,se,fe,ue)},W=P=>P.shapeFlag&6?W(P.component.subTree):P.shapeFlag&128?P.suspense.next():l(P.anchor||P.el);let M=!1;const H=(P,X,se)=>{P==null?X._vnode&&D(X._vnode,null,null,!0):g(X._vnode||null,P,X,null,null,null,se),M||(M=!0,Ic(),Tc(),M=!1),X._vnode=P},V={p:g,um:D,m:w,r:L,mt:F,mc:I,pc:ne,pbc:O,n:W,o:e};let K,J;return n&&([K,J]=n(V)),{render:H,hydrate:K,createApp:S1(H,K)}}function Na({type:e,props:n},t){return t==="svg"&&e==="foreignObject"||t==="mathml"&&e==="annotation-xml"&&n&&n.encoding&&n.encoding.includes("html")?void 0:t}function rr({effect:e,update:n},t){e.allowRecurse=n.allowRecurse=t}function P1(e,n){return(!e||e&&!e.pendingBranch)&&n&&!n.persisted}function iu(e,n,t=!1){const r=e.children,i=n.children;if(Ie(r)&&Ie(i))for(let o=0;o<r.length;o++){const a=r[o];let s=i[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[o]=Hn(i[o]),s.el=a.el),t||iu(a,s)),s.type===to&&(s.el=a.el)}}function M1(e){const n=e.slice(),t=[0];let r,i,o,a,s;const u=e.length;for(r=0;r<u;r++){const f=e[r];if(f!==0){if(i=t[t.length-1],e[i]<f){n[r]=i,t.push(r);continue}for(o=0,a=t.length-1;o<a;)s=o+a>>1,e[t[s]]<f?o=s+1:a=s;f<e[t[o]]&&(o>0&&(n[r]=t[o-1]),t[o]=r)}}for(o=t.length,a=t[o-1];o-- >0;)t[o]=a,a=n[a];return t}function ou(e){const n=e.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:ou(n)}const q1=e=>e.__isTeleport,be=Symbol.for("v-fgt"),to=Symbol.for("v-txt"),jn=Symbol.for("v-cmt"),no=Symbol.for("v-stc"),ni=[];let Gt=null;function U(e=!1){ni.push(Gt=e?null:[])}function $1(){ni.pop(),Gt=ni[ni.length-1]||null}let ri=1;function au(e){ri+=e}function su(e){return e.dynamicChildren=ri>0?Gt||kr:null,$1(),ri>0&&Gt&&Gt.push(e),e}function Y(e,n,t,r,i,o){return su(b(e,n,t,r,i,o,!0))}function ke(e,n,t,r,i){return su(he(e,n,t,r,i,!0))}function ro(e){return e?e.__v_isVNode===!0:!1}function ii(e,n){return e.type===n.type&&e.key===n.key}const io="__vInternal",lu=({key:e})=>e??null,oo=({ref:e,ref_key:n,ref_for:t})=>(typeof e=="number"&&(e=""+e),e!=null?et(e)||tt(e)||De(e)?{i:nt,r:e,k:n,f:!!t}:e:null);function b(e,n=null,t=null,r=0,i=null,o=e===be?0:1,a=!1,s=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:n,key:n&&lu(n),ref:n&&oo(n),scopeId:Ki,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:nt};return s?(Pa(u,t),o&128&&e.normalize(u)):t&&(u.shapeFlag|=et(t)?8:16),ri>0&&!a&&Gt&&(u.patchFlag>0||o&6)&&u.patchFlag!==32&&Gt.push(u),u}const he=j1;function j1(e,n=null,t=null,r=0,i=null,o=!1){if((!e||e===Lc)&&(e=jn),ro(e)){const s=Dr(e,n,!0);return t&&Pa(s,t),ri>0&&!o&&Gt&&(s.shapeFlag&6?Gt[Gt.indexOf(e)]=s:Gt.push(s)),s.patchFlag|=-2,s}if(J1(e)&&(e=e.__vccOpts),n){n=H1(n);let{class:s,style:u}=n;s&&!et(s)&&(n.class=we(s)),Ze(u)&&(wc(u)&&!Ie(u)&&(u=at({},u)),n.style=ze(u))}const a=et(e)?1:s1(e)?128:q1(e)?64:Ze(e)?4:De(e)?2:0;return b(e,n,t,r,i,a,o,!0)}function H1(e){return e?wc(e)||io in e?at({},e):e:null}function Dr(e,n,t=!1){const{props:r,ref:i,patchFlag:o,children:a}=e,s=n?ao(r||{},n):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&lu(s),ref:n&&n.ref?t&&i?Ie(i)?i.concat(oo(n)):[i,oo(n)]:oo(n):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:n&&e.type!==be?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Dr(e.ssContent),ssFallback:e.ssFallback&&Dr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Ne(e=" ",n=0){return he(to,null,e,n)}function oi(e,n){const t=he(no,null,e);return t.staticCount=n,t}function ge(e="",n=!1){return n?(U(),ke(jn,null,e)):he(jn,null,e)}function cn(e){return e==null||typeof e=="boolean"?he(jn):Ie(e)?he(be,null,e.slice()):typeof e=="object"?Hn(e):he(to,null,String(e))}function Hn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Dr(e)}function Pa(e,n){let t=0;const{shapeFlag:r}=e;if(n==null)n=null;else if(Ie(n))t=16;else if(typeof n=="object")if(r&65){const i=n.default;i&&(i._c&&(i._d=!1),Pa(e,i()),i._c&&(i._d=!0));return}else{t=32;const i=n._;!i&&!(io in n)?n._ctx=nt:i===3&&nt&&(nt.slots._===1?n._=1:(n._=2,e.patchFlag|=1024))}else De(n)?(n={default:n,_ctx:nt},t=32):(n=String(n),r&64?(t=16,n=[Ne(n)]):t=8);e.children=n,e.shapeFlag|=t}function ao(...e){const n={};for(let t=0;t<e.length;t++){const r=e[t];for(const i in r)if(i==="class")n.class!==r.class&&(n.class=we([n.class,r.class]));else if(i==="style")n.style=ze([n.style,r.style]);else if(Ti(i)){const o=n[i],a=r[i];a&&o!==a&&!(Ie(o)&&o.includes(a))&&(n[i]=o?[].concat(o,a):a)}else i!==""&&(n[i]=r[i])}return n}function un(e,n,t,r=null){Kt(e,n,7,[t,r])}const V1=Xc();let U1=0;function z1(e,n,t){const r=e.type,i=(n?n.appContext:e.appContext)||V1,o={uid:U1++,vnode:e,type:r,parent:n,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new tc(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Qc(r,i),emitsOptions:Dc(r,i),emit:null,emitted:null,propsDefaults:Qe,inheritAttrs:r.inheritAttrs,ctx:Qe,data:Qe,props:Qe,attrs:Qe,slots:Qe,refs:Qe,setupState:Qe,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:t,suspenseId:t?t.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=n?n.root:o,o.emit=e1.bind(null,o),e.ce&&e.ce(o),o}let ct=null;const cu=()=>ct||nt;let so,Ma;{const e=Jl(),n=(t,r)=>{let i;return(i=e[t])||(i=e[t]=[]),i.push(r),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};so=n("__VUE_INSTANCE_SETTERS__",t=>ct=t),Ma=n("__VUE_SSR_SETTERS__",t=>lo=t)}const ai=e=>{const n=ct;return so(e),e.scope.on(),()=>{e.scope.off(),so(n)}},uu=()=>{ct&&ct.scope.off(),so(null)};function fu(e){return e.vnode.shapeFlag&4}let lo=!1;function K1(e,n=!1){n&&Ma(n);const{props:t,children:r}=e.vnode,i=fu(e);T1(e,t,i,n),R1(e,r);const o=i?X1(e,n):void 0;return n&&Ma(!1),o}function X1(e,n){const t=e.type;e.accessCache=Object.create(null),e.proxy=Vi(new Proxy(e.ctx,b1));const{setup:r}=t;if(r){const i=e.setupContext=r.length>1?G1(e):null,o=ai(e);Ln();const a=Cn(r,e,0,[e.props,i]);if(Fn(),o(),Xl(a)){if(a.then(uu,uu),n)return a.then(s=>{du(e,s,n)}).catch(s=>{Ui(s,e,0)});e.asyncDep=a}else du(e,a,n)}else pu(e,n)}function du(e,n,t){De(n)?e.type.__ssrInlineRender?e.ssrRender=n:e.render=n:Ze(n)&&(e.setupState=Ac(n)),pu(e,t)}let hu;function pu(e,n,t){const r=e.type;if(!e.render){if(!n&&hu&&!r.render){const i=r.template||Ba(e).template;if(i){const{isCustomElement:o,compilerOptions:a}=e.appContext.config,{delimiters:s,compilerOptions:u}=r,f=at(at({isCustomElement:o,delimiters:s},a),u);r.render=hu(i,f)}}e.render=r.render||$t}{const i=ai(e);Ln();try{C1(e)}finally{Fn(),i()}}}function W1(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(n,t){return kt(e,"get","$attrs"),n[t]}}))}function G1(e){const n=t=>{e.exposed=t||{}};return{get attrs(){return W1(e)},slots:e.slots,emit:e.emit,expose:n}}function co(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Ac(Vi(e.exposed)),{get(n,t){if(t in n)return n[t];if(t in ei)return ei[t](e)},has(n,t){return t in n||t in ei}}))}const Q1=/(?:^|[-_])(\w)/g,Z1=e=>e.replace(Q1,n=>n.toUpperCase()).replace(/[-_]/g,"");function vu(e,n=!0){return De(e)?e.displayName||e.name:e.name||n&&e.__name}function gu(e,n,t=!1){let r=vu(n);if(!r&&n.__file){const i=n.__file.match(/([^/\\]+)\.\w+$/);i&&(r=i[1])}if(!r&&e&&e.parent){const i=o=>{for(const a in o)if(o[a]===n)return a};r=i(e.components||e.parent.type.components)||i(e.appContext.components)}return r?Z1(r):t?"App":"Anonymous"}function J1(e){return De(e)&&"__vccOpts"in e}const me=(e,n)=>Nd(e,n,lo);function Y1(e,n,t=Qe){const r=cu(),i=At(n),o=Lt(n),a=jd((u,f)=>{let c;return f1(()=>{const v=e[n];on(c,v)&&(c=v,f())}),{get(){return u(),t.get?t.get(c):c},set(v){const l=r.vnode.props;!(l&&(n in l||i in l||o in l)&&(`onUpdate:${n}`in l||`onUpdate:${i}`in l||`onUpdate:${o}`in l))&&on(v,c)&&(c=v,f()),r.emit(`update:${n}`,t.set?t.set(v):v)}}}),s=n==="modelValue"?"modelModifiers":`${n}Modifiers`;return a[Symbol.iterator]=()=>{let u=0;return{next(){return u<2?{value:u++?e[s]||{}:a,done:!1}:{done:!0}}}},a}function eh(e,n,t){const r=arguments.length;return r===2?Ze(n)&&!Ie(n)?ro(n)?he(e,null,[n]):he(e,n):he(e,null,n):(r>3?t=Array.prototype.slice.call(arguments,2):r===3&&ro(t)&&(t=[t]),he(e,n,t))}const th="3.4.21";/**
17
17
  * @vue/runtime-dom v3.4.21
18
18
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
19
19
  * @license MIT
@@ -25,12 +25,12 @@
25
25
  * vue-router-lwc v1.0.4
26
26
  * (c) 2024 Eduardo San Martin Morote
27
27
  * @license MIT
28
- */var Hu;(function(e){e.pop="pop",e.push="push"})(Hu||(Hu={}));var Vu;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Vu||(Vu={}));var Uu;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Uu||(Uu={}));const a5=Symbol(""),s5=Symbol("");function fi(){return $n(a5)}function l5(){return $n(s5)}function St(e){if(typeof e=="string"&&(e=JSON.parse(e)),e!=null&&e.errorMessage)throw new Error(e==null?void 0:e.errorMessage);return e}const Qa={xx_ord1__item__c:"xx_ord1__item__c",xx_ord1__sales_price__c:"xx_ord1__negotiated_price__c",xx_ord1__nrc__c:"xx_ord1__nrc_for_new__c",xx_ord1__line_description__c:"xx_ord1__line_description__c",xx_ord1__list_price__c:"xx_ord1__list_price2__c",xx_ord1__cost__c:"xx_ord1__cost2__c",xx_ord1__rate_plan__c:"xx_ord1__rate_plan__c",xx_ord1__allowed_discount__c:"xx_ord1__allowed_discount__c",xx_ord1__billing_period__c:"xx_ord1__billing_period__c",xx_ord1__ship_to_account__c:"xx_ord1__ship_to_account__c",xx_ord1__erp_item_number__c:"xx_ord1__erp_item_number__c",xx_ord1__mrc__c:"xx_ord1__mrc__c",xx_ord1__qty__c:"xx_ord1__qty__c",id:"id"},zu={xx_ord1__item__c:"xx_ord1__item__c",xx_ord1__negotiated_price__c:"xx_ord1__sales_price__c",xx_ord1__nrc_for_new__c:"xx_ord1__nrc__c",xx_ord1__line_description__c:"xx_ord1__line_description__c",xx_ord1__list_price2__c:"xx_ord1__list_price__c",xx_ord1__cost2__c:"xx_ord1__cost__c",xx_ord1__rate_plan__c:"xx_ord1__rate_plan__c",xx_ord1__allowed_discount__c:"xx_ord1__allowed_discount__c",xx_ord1__billing_period__c:"xx_ord1__billing_period__c",xx_ord1__ship_to_account__c:"xx_ord1__ship_to_account__c",xx_ord1__erp_item_number__c:"xx_ord1__erp_item_number__c",xx_ord1__mrc__c:"xx_ord1__mrc__c",xx_ord1__qty__c:"xx_ord1__qty__c",id:"id"},c5=e=>{var t;let n=[];for(let r of e)if(r.trim()!=="xx_ord1__item__r.xx_ord1__decimal_precision__c")if(r.includes(".")){let o=r.split(".")[0];o=o.slice(0,-1)+"c";const a=((t=Qa[o==null?void 0:o.toLowerCase()])==null?void 0:t.trim())||"";a&&(n.includes(a)||n.push(a||""),n.push(r))}else n.includes(Qa[r==null?void 0:r.toLowerCase()])||n.push(Qa[r==null?void 0:r.toLowerCase()]||"");return n.filter(r=>r!=="")},u5=wt("actions",()=>{const e=go(),n=sr(),t=te(!1);return{openAdaptiveSearch:(s,u=!1)=>{console.info("openAdaptiveSearch",s),e.chatHistory[e.chatHistory.length-1].links=[],e.sendMessage("Open Adaptive Search",!1,{internalCall:!0}),t.value=u},openQuoteItem:s=>{console.info("openQuoteItem",s),e.chatHistory[e.chatHistory.length-1].links=[],e.sendMessage("Open Quote Item",!1,{internalCall:!0})},openQuoteDocument:s=>{console.info("openQuoteDocument",s),e.chatHistory[e.chatHistory.length-1].links=[],e.chatHistory.push({type:"response",message:"Opening quote document",loading:!0});const f=`/apex/XX_ORD1__Expedite_Commerce?scpq=true&oid=${n.quoteId}&atpverified=true&ecCache=false&origin=AI`;window.location.href=`${b2(window.location.href)}${f}`},undo:()=>{const s=e==null?void 0:e.latestDMLRequest;e.sendMessage(`UNDO-${s}`,!1,{internalCall:!0})},isStaticActionCall:t}}),Ku=wt("adaptiveSearch",()=>{const e=sr(),n=mo(),t=go(),r=u5(),i=te(null),o=te(null),a=te(!1),s=te(!1),u=te([]),f=te(""),c=te(!1),v=te(null),l=te(!1),h=te([]),p=Qt(),g=te([]),d=te(0),m=te(!1),y=te({rowLimt:10,paging:!0,offset:0,currentPage:1,totalPages:1});async function _(){a.value=!0;try{const w=JSON.stringify({layoutType:"Search Selection",layoutObject:"xx_ord1__ecatalog_item__c"});let D={};return D=await window.salesforceConnector.getDynamicPageLayout(w),o.value=qu(D,"Unable to find the Search Selection Layout for your user profile"),y.value.rowLimt=o.value.configuration.rowLimit||10,o.value.configuration.columns.forEach(L=>{!L.field&&L.label==="QTY"&&(L.field="xx_ord1__qty__c")}),a.value=!1,x(),D}catch(w){a.value=!1,p.handleError("Failed to get Adaptive Search Layout. Please try again."),console.info("[ERROR]: getAdaptiveSearchLayout() error = ",w)}}function x(){var w,D,L;v.value=(L=(D=(w=o.value)==null?void 0:w.configuration)==null?void 0:D.dynamicFilters)==null?void 0:L.filters.map($=>({...$,field:$.field.toLowerCase(),filtervalue:$.filtervalue||[],filtervaluefrom:$.filtervaluefrom||"",filtervalueTo:$.filtervalueTo||""}))}function C(){var D;let w=[];for(const L of o.value.configuration.columns){let $=L.field;if(w.includes($)||w.push($),$!=null&&$.includes(".")){let j=$.split(".")[0];j=j.slice(0,-1)+"c",w.includes(j)||w.push(j)}}return(D=o.value.configuration)!=null&&D.cardHeader&&w.push(o.value.configuration.cardHeader.imageField),o.value.configuration.objectName.toLowerCase()==="xx_ord1__ecatalog_item__c"&&w.push("xx_ord1__item__r.xx_ord1__decimal_precision__c"),w=w.filter(L=>!!L),w.filter(L=>L.toLowerCase()!=="xx_ord1__qty__c"&&L.toLowerCase()!=="xx_ord1__competitor_sku__c")}function S(w,D=!1){if(!w||w.includes("undefined"))return!1;const L=/[!@#$%^&*()+=[\]{};':"\\|.<>/?]+/;if(D){const $=Array.isArray(w)?w:w.split(",");for(const G of $){const j=G.trim();if(L.test(j))return p.handleError(`Invalid character found in value: ${j}`),!1}}else if(L.test(w))return p.handleError("Special characters are not allowed in filter values"),!1;return!0}function A(w,D){return{field:w.field,operator:w.operator||"contains",value:D,dataType:w.dataType.trim()}}function I(w){if(!w.filtervalue)return null;const D=Array.isArray(w.filtervalue),L=D?w.filtervalue.join(","):w.filtervalue.trim();return S(L,D)?L:null}function B(w){var G,j;const D=(G=w.filtervaluefrom)==null?void 0:G.trim(),L=(j=w.filtervalueTo)==null?void 0:j.trim();if(!D||!L)return null;const $=`${D}, ${L}`;return $!==", "&&S($)?$:null}function O(w){const D=`${Mu(w.filtervaluefrom)}, ${Mu(w.filtervalueTo)}`;return D!==", "&&S(D)?D:null}function E(w){var L;const D=(L=w.filtervaluefrom)==null?void 0:L.trim();return S(D)?D:null}function k(w){const D=[];return w.forEach(L=>{const $=L.dataType.trim();let G=null;switch($){case"PICKLIST":case"MULTIPICKLIST":G=I(L);break;case"DOUBLE":case"CURRENCY":G=B(L);break;case"DATETIME":case"DATE":G=O(L);break;default:G=E(L)}G&&D.push(A(L,G))}),h.value=D,D}async function R(w="",D=[],L=[]){var G,j,W,M,H,V,K,J,P,X;let $=[];if(D.length&&($=k(D)),!$.length&&w.trim()===""){u.value=[],c.value=!1;return}try{c.value=!1,s.value=!0;const se=w.trim();L.length||(L=C());const fe={fields:L,...D.length?{dynamicFilters:$}:{},searchText:se||f.value.trim(),accountId:n.accountId,...n.eCatalogId?{catalogId:n.eCatalogId}:{},...n.objectType==="opportunity"?{opportunityId:n.id}:{},...(j=(G=o.value)==null?void 0:G.configuration)!=null&&j.sort?{primarySortBy:o.value.configuration.sort.primary.field,primarySortOrder:o.value.configuration.sort.primary.direction,secondarySortBy:o.value.configuration.sort.secondary.field,secondarySortOrder:o.value.configuration.sort.secondary.direction}:{},rowLimt:(M=(W=o.value)==null?void 0:W.configuration)==null?void 0:M.rowLimit,paging:(V=(H=o.value)==null?void 0:H.configuration)==null?void 0:V.paging,...((K=y.value)==null?void 0:K.offset)!==0?{offset:y.value.offset}:{},objectName:(P=(J=o.value)==null?void 0:J.configuration)==null?void 0:P.objectName,currencyCode:n.currencyCode},ce=await window.salesforceConnector.getItems(JSON.stringify(fe));if(ce!=null&&ce.errorMessage){p.handleError(ce.errorMessage);return}ce!=null&&ce.itemCount&&(y.value.totalPages=Math.ceil((ce==null?void 0:ce.itemCount)/y.value.rowLimt)),u.value=po(ce.lstItems,{xx_ord1__qty__c:"1"}),(X=ce.lstItems)!=null&&X.length||(c.value=!0),s.value=!1}catch(se){p.handleError("Failed to fetch Results. Please try again."),s.value=!1,console.info("[ERROR]: Adaptive Search getItems() error = ",se)}}async function F(w){try{l.value=!0;const D=JSON.stringify({lstQLIRequest:q(w),quoteId:e.quoteId});let L=await window.salesforceConnector.createQLI(D);typeof L=="string"&&(L=JSON.parse(L));let $=!1;if((L==null?void 0:L.length)>0&&L.forEach(G=>{G.errorMessage&&($=!0,p.handleError(G.errorMessage))}),l.value=!1,$){g.value=L;const G=g.value.reduce((j,W)=>(j[W.eCatalogItemId]=W.errorMessage,j),{});u.value=u.value.map(j=>({...j,backendError:G[j.Id]||""}));return}return L}catch(D){p.handleError("Failed to add item to Quote. Please try again."),console.info("[ERROR]: addToQuote() error = ",D)}}function q(w){const D=[];for(const L of w)if(!L.addedToQuote&&L.id){const $=Z(L);d.value++,D.push({fields:$,recordId:L.id,...w.length===1?{maxSequenceNumber:d.value}:{}})}return D}function Z(w){const D=[],L=ee();return Object.keys(w).forEach($=>{if(L.includes($)){const G=zu[$.toLowerCase()];G&&D.push({fieldname:G,value:w[$]})}}),D}function ee(){const w=[];return o.value.configuration.columns.forEach(D=>{D.field&&!D.field.includes(".")&&D.isEditable&&D.visible&&w.push(D.field)}),w}function ne(){var D,L;const w=[];return o.value.configuration.columns.forEach($=>{const G=$.field.toLowerCase();w.includes(G)||w.push(G)}),(D=o.value.configuration)!=null&&D.dynamicFilters&&o.value.configuration.dynamicFilters.filters.forEach($=>{const G=$.field.toLowerCase();w.includes(G)||w.push(G)}),(L=o.value.configuration)!=null&&L.cardHeader&&w.push(o.value.configuration.cardHeader.imageField),w}async function Q(){var L;const w=ne(),D=((L=o.value.configuration)==null?void 0:L.saveObjectName)||o.value.configuration.objectName;if(D==="xx_ord1__ecatalog_item__c"){const $=w.indexOf("xx_ord1__qty__c");$>-1&&w.splice($,1)}await e.getFieldsData(w,D),e.fieldsData.xx_ord1__qty__c||e.getFieldsData(["xx_ord1__qty__c"],"xx_ord1__quote_line_item__c")}async function N({searchTerm:w="",filters:D=[]}={}){if(m.value=!0,w&&(f.value=w),D.length&&(h.value=D),await _()){await Q(),m.value=!1;const $=f.value;$&&(f.value=$,await R($,e.dynamicFilters)),console.info("actionStore.isStaticActionCall = ",r.isStaticActionCall),r.isStaticActionCall&&(r.isStaticActionCall=!1,t.chatHistory[t.chatHistory.length-1]={type:"response",message:"Adaptive search is now open. Please search for the products you require and add it quote",loading:!1,links:[{action:"quoteItem",label:"Quote Item"},{action:"quoteDocument",label:"Quote Document"}]})}m.value=!1}return{selectedItem:i,AdaptiveSearchLayout:o,searchText:f,loadingAdaptiveLayout:a,getAdaptiveSearchLayout:_,getItems:R,lstItems:u,rowItemsLoading:s,noSearchRecords:c,dynamicFilters:v,setDynamicFilters:x,createQliErrors:g,addToQuote:F,addingToQuote:l,getFieldsData:Q,pagingData:y,appliedDynamicFilters:h,maxSequenceNumber:d,loadingAdaptiveSearch:m,initAdaptiveSearch:N}}),f5=wt("quickSelection",()=>{const e=Qt(),n=mo(),t=sr(),r=te(null),i=te(!1),o=te([]),a=te([]),s=te(!1),u=te({}),f=te({rowLimit:10,paging:!0,offset:0,currentPage:1,totalPages:1}),c=te(!1);async function v(){i.value=!0;try{const C=JSON.stringify({layoutType:"Quick Selection",layoutObject:"xx_ord1__ecatalog_item__c",...n.objectType?{contextObject:n.objectType}:{}});let S={};S=await window.salesforceConnector.getDynamicPageLayout(C),r.value=qu(S,"Unable to find the Quick Selection Layout for your user profile"),console.info("quickSelectionLayout.value = ",r.value),f.value.rowLimit=r.value.configuration.rowLimit||10,r.value.data.columns.forEach(A=>{!A.field&&A.label==="QTY"&&(A.field="xx_ord1__qty__c")}),i.value=!1}catch(C){i.value=!1,e.handleError("Failed to get Page structure data. Please try again."),console.info("[ERROR]: getAdaptiveSearchLayout() error = ",C)}}function l(){const C=new Map;return r.value.data.columns.forEach(S=>{C.set(S.field,!0)}),r.value.data.searchResultColumns.forEach(S=>{C.set(S.field,!0)}),Array.from(C.keys())}async function h(C){var S,A;try{let I=await window.salesforceConnector.saveCompetitorSKU(C);if(I!=null&&I.errorMessage){e.handleError(I.errorMessage);return}if((S=I[0])!=null&&S.errorMessage){e.handleError((A=I[0])==null?void 0:A.errorMessage);return}return I}catch(I){e.handleError("Failed to Match Item. Please try again."),console.info("[ERROR]: saveCompetitorSKU() error = ",I)}}async function p(C="",S=[]){try{let A=r.value.data,I=r.value.configuration;const B=C.trim();if(console.info("searchTextValue.trim() = ",C.trim()),!B)return[];let O=null;console.info("useMappings = ",c.value),c.value?O=c5(g()):O=g(),console.info("fields before filter = ",O),O=O.filter(F=>F!=="xx_ord1__qty__c"),console.info("fields after filter = ",O);const E={fields:O,...S.length?{dynamicFilters:t.getDynamicFilters(S)}:{},searchText:B,accountId:n.accountId,...n.eCatalogId?{catalogId:n.eCatalogId}:{},...n.objectType==="opportunity"?{opportunityId:n.id}:{},...A!=null&&A.sort?{primarySortBy:A.sort.primary.field,primarySortOrder:A.sort.primary.direction,secondarySortBy:A.sort.secondary.field,secondarySortOrder:A.sort.secondary.direction}:{},rowLimt:(I==null?void 0:I.rowLimit)||20,paging:(I==null?void 0:I.paging)||!1,...f.value.offset!==0?{offset:f.value.offset}:{},objectName:A.objectName,currencyCode:n.currencyCode};console.info("getQuickSelectionItems payload = ",JSON.stringify(E));const k=await window.salesforceConnector.getItems(JSON.stringify(E));if(console.info("getQuickSelectionItems Res = ",JSON.stringify(k)),k!=null&&k.errorMessage){e.handleError(k.errorMessage);return}return k!=null&&k.itemCount&&(f.value.totalPages=Math.ceil((k==null?void 0:k.itemCount)/f.value.rowLimit)),po(k.lstItems,{xx_ord1__qty__c:"1"})}catch(A){e.handleError("Failed to fetch Results. Please try again."),console.info("[ERROR]: getQuickSelectionItems() error = ",A)}}function g(){let C=[];for(const S of r.value.data.columns){let A=S.field;if(A!=null&&A.includes(".")){C.includes(A)||C.push(A);let B=A.split(".")[0];B=B.slice(0,-1)+"c",C.includes(B)||C.push(B)}else C.includes(A)||C.push(A)}return console.info("getAllQuickSelectionFields() fields = ",C),C.filter(S=>S.toLowerCase()!=="xx_ord1__qty__c")}async function d(C,S,A,I){console.info("searchText:",JSON.stringify(C)),console.info("row:",JSON.stringify(S)),console.info("rowIndex:",JSON.stringify(A)),console.info("column:",JSON.stringify(I));const B=A+(f.value.currentPage-1)*f.value.rowLimit;if(I.field.toLowerCase().includes("xx_ord1__item__r")){if(o.value[B].itemLookupLoading=!0,c.value=!0,a.value=await p(C),a.value.length>0){const O=[];for(let E=0;E<a.value.length;E++)o.value[B].itemDataRetrieved=!0,a.value[E].xx_ord1__item__c&&O.push({name:a.value[E]["xx_ord1__item__r.name"],value:a.value[E].xx_ord1__item__c,label:a.value[E][I.field.toLowerCase()]});o.value[B][I.field.toLowerCase()+"_options"]=O}o.value[B].itemLookupLoading=!1}else if(I.field.toLowerCase().includes("xx_ord1__competitor_item__r")){o.value[B].competitorLookupLoading=!0;const O=await m(C);O!=null&&O.items&&(o.value[B][I.field.toLowerCase()+"_options"]=O.items.map(E=>({name:E.fields[2].value,value:E.fields[1].value,label:E.fields[0].value}))),o.value[B].competitorLookupLoading=!1,console.info("getLookupData:: Search Lookup Handler Response = ",O)}}async function m(C){var A,I;console.info("getLookupData() searchText = ",C);const S={searchText:C,obj:"xx_ord1__competitor_item__c",filters:null,displayFields:["xx_ord1__sku__c"]};try{let B=await window.salesforceConnector.getLookupData(JSON.stringify(S));if(typeof B=="string"&&(B=JSON.parse(B)),B!=null&&B.errorMessage){e.handleError(B.errorMessage);return}if((A=B[0])!=null&&A.errorMessage){e.handleError((I=B[0])==null?void 0:I.errorMessage);return}return B}catch(B){e.handleError("Failed to Search For Item. Please try again."),console.info("[ERROR]: getLookupData() error = ",B)}}async function y(C,S){var I;console.info("Update Other Fields Value = ",C),console.info("Update Other Fields Row Index = ",S);const A=S+(f.value.currentPage-1)*f.value.rowLimit;console.info("actualRowIndex = ",A);try{if(C){const B=a.value.filter(O=>O.xx_ord1__item__c===C)[0];if(B){s.value=!0;const O=r.value.data.columns[1].field;o.value[A][O]&&await _(B,A),(I=o.value[A])!=null&&I.itemDataRetrieved&&(o.value[A].status="New Match Requested",o.value[A].noMatchCleared=!0),Object.keys(B).forEach(E=>{const k=zu[E.toLowerCase()];console.info("Mapped Key = ",k),k&&(o.value[A][k]=B[E])}),s.value=!1}else o.value[A].status=""}else o.value[A].status="No Match"}catch(B){e.handleError("Unable to request a match for this item please try again."),console.info("Error in updateOtherFields = ",B)}}async function _(C,S){const A=o.value[S],I=r.value.data.columns[1].field,B=[{sku:A[I],name:A[I],productDescription:A.xx_ord1__line_description__c||"",productURL:null,status:"Match Requested",competitorAccountId:null,itemId:C.xx_ord1__item__c}];let O=await h(JSON.stringify(B));console.info("Match Item: ",JSON.stringify(O)),o.value[S][`${I}_options`]=[{value:O[0].competitorItemId,label:O[0].sku}],o.value[S][I]=O[0].competitorItemId}async function x(C){try{let S=await window.salesforceConnector.createQLI(JSON.stringify(C));typeof S=="string"&&(S=JSON.parse(S));let A=!1;if((S==null?void 0:S.length)>0)for(let I=0;I<S.length;I++)S[I].errorMessage&&(A=!0,S[I].errorMessage.includes("Line Description: data value too large")&&(S[I].errorMessage="Error: The description is too long—it must be under 200 characters."));if(A){S.forEach(I=>{u.value[I.eCatalogItemId]=I});return}else u.value=[];return S}catch(S){e.handleError("Failed to add item to Quote. Please try again."),console.info("[ERROR]: addAllItemsToQuote() error = ",S)}}return{quickSelectionLayout:r,quickSelectionLayoutLoading:i,processedRecords:o,useMappings:c,currentSearchData:a,createQliErrors:u,getQuickSelectionLayout:v,getAllFieldsForQuickSelectionLayout:l,saveCompetitorSKU:h,getQuickSelectionItems:p,searchLookupHandler:d,updateOtherFields:y,addAllItemsToQuote:x}}),d5="Preparing Your Quote Please Wait...",h5={message:"Your quote is ready! Begin adding products to complete it.",type:"response",requestId:"no-request-id"},p5=18e4,go=wt("ai",()=>{const e=mo(),n=sr(),t=Ku(),r=f5(),i=dn(),o=l5(),a=te(""),s=te(""),u=te([]),f=te(""),c=te([]),v=te(!1),l=te(null),h=fi(),p=te({}),g=te(null),d=te(null),m=te(null),y=te(null),_=te(null),x=te(d5),C=te([]),S=me(()=>e.orgId+"__"+e.user.Id+"__"+n.quoteId),A=me(()=>l.value.readyState==WebSocket.OPEN),I=()=>{p.value={salesforceOrgId:e.orgId,salesforceOrgType:e.orgType,salesforceUserId:e.user.Id,userType:"Salesforce",chatRoomId:S.value,requestId:"",prompt:"",initiatedFrom:e.origin||"Quote",internalCall:!1,contextObjectId:n.quoteId,contextObjectType:"Quote",payload:{lineItemsCount:n.lineItemsCount},origin:"Genesis AI",defaultBatchSize:10,actionType:"",packageVersion:e.packageVersion,relatedIds:{eCatalogId:e.eCatalogId,accountId:e.accountId}}};async function B(){const H=s.value+"?chatRoomId="+S.value;l.value=new WebSocket(H),l.value.addEventListener("open",O),l.value.addEventListener("message",R),l.value.addEventListener("close",E),l.value.addEventListener("error",k)}const O=()=>{F(),ee()},E=()=>{q()},k=()=>{$(),q()},R=H=>{var K,J;F();const V=JSON.parse(H.data);if(V.status!=="ALIVE"){if(V.loading){x.value=V.message;return}else Array.isArray(V.messages)?(x.value=null,u.value.push(h5),V.messages.length>0&&w(V.messages)):V.agentResponse&&(V.errorMessage&&(V.agentResponse.content=V.errorMessage,V.agentResponse.error=!0),x.value=null,u.value.push({message:V.agentResponse.content,type:V.agentResponse.role,requestId:V.requestId,epoch:V.agentResponse.epoch,error:V.agentResponse.error,isDML:V.agentResponse.isDML,...(K=V.agentResponse)!=null&&K.filesData?{filesData:(J=V.agentResponse)==null?void 0:J.filesData}:{}}));C.value=V.links||[],j(V)}},F=()=>{q(),g.value=setTimeout(()=>{if(A.value){const H={action:"heartbeat"};l.value.send(JSON.stringify(H)),F()}},p5)},q=()=>{g.value&&(clearInterval(g.value),g.value=null)};function Z(H){const V={...p.value};V.requestType="Action",V.actionType="Undo",V.undoRequestId=H,V.requestId=ar(),N(V)}function ee(){const H={...p.value};H.requestType="Action",H.actionType="History",H.requestId=ar(),N(H)}function ne(H){return o.path.startsWith("/configurator")&&i.isChangedConfiguration?(y.value={save:()=>{i.maintainQuoteConfiguration()}},a.value=H,!0):(a.value="",!1)}function Q(H,V=!0,K=null){if(!ne(H)&&H.trim()){let J={...p.value};J.prompt=H.trim(),J.requestType="Chat",J.requestId=ar(),J.internalCall=!1,J.payload=D(),J.componentName=L.value,J.templateId=n.templateId,J.payload.lineItemsCount=n.lineItemsCount,K&&(J={...J,...K}),G(),V&&u.value.push({message:H.trim(),type:"user",..._.value&&{fileData:[_.value]},requestId:J.requestId}),N(J),F()}}function N(H){const V={action:"prompt",data:H};l.value.send(JSON.stringify(V))}const w=H=>{const V=H.filter(({content:K})=>!!K).map(K=>({message:K.content,type:K.role,requestId:K.requestId,epoch:K.epoch,isDML:K.isDML,undone:K.undone}));V.forEach((K,J)=>{K.isDML===!0&&J!==V.length-1&&(K.isDML=!1)}),u.value=[...u.value,...V]};function D(){return o.path==="/quote-item"?n.getPayload():{}}const L=me(()=>o.path==="/quote-item"?"QuoteItem":""),$=()=>{u.value.push({type:"response",message:"Oops! Something went wrong while processing your request. Please try again later.",error:!0})},G=()=>{u.value=u.value.map(H=>({...H,links:[]}))};function j(H){var J,P,X;const V=((J=H==null?void 0:H.redirectObjects)==null?void 0:J.componentName)||(H==null?void 0:H.componentName),K=(H==null?void 0:H.redirectObjects)||{};if(V==="AdaptiveSearch"){const se=(P=H==null?void 0:H.payload)==null?void 0:P.searchTerm,fe=(X=H==null?void 0:H.payload)==null?void 0:X.applyFilters;se&&se!==t.searchText&&t.initAdaptiveSearch({searchTerm:se,filters:fe}),h.push("/adaptive-search")}else V==="Configurator"?h.push(`/configurator/${K.itemId}/${K.qliId}`):V==="QuoteReview"?h.push("/quote-item"):V==="QuoteItem"||V==="QuoteList"?(h.push("/quote-item"),n.performAIAction(H)):V==="QuickSelection"&&(r.quickSelectionLayout=H.payload,console.info("Loading QuickSelection data = ",JSON.stringify(r.quickSelectionLayout)),h.push("/match-records"))}function W(){if(A.value){const H={action:"cancel",data:{requestId:p.value.requestId,chatRoomId:S.value}};l.value.send(JSON.stringify(H))}}const M=()=>{d.value&&(clearInterval(d.value),d.value=null),g.value&&(clearInterval(g.value),g.value=null),m.value&&(clearTimeout(m.value),m.value=null)};return Zi(()=>{M()}),{unsavedChanges:y,loadingMessage:x,promptMessage:a,buttonLinks:C,websocketUrl:s,chatHistory:u,latestDMLRequest:f,strikethroughHistory:c,attachmentData:_,dataManuallyChanged:v,undoAction:Z,connectSocket:B,sendMessage:Q,setInitialPayload:I,cancelRequest:W}}),mo=wt("comRoot",()=>{const e=go(),n=Qt(),t=sr(),r=te(""),i=te(""),o=te("Genesis AI"),a=te(""),s=te({}),u=te(""),f=te(""),c=te(""),v=te(""),l=te({}),h=te(""),p=te(""),g=te(""),d=te(""),m=te(""),y=te(""),_=te(""),x=te("Single"),C=te("closed"),S=me(()=>t.quoteName),A=me(()=>x.value==="Single");async function I(k){r.value=k||Pu("id"),i.value=Pu("origin"),await O(),await B()}async function B(){try{console.info("getRecordInfo",r.value);let k=await window.salesforceConnector.getRecordInfo(r.value);return k=St(k),k!==void 0&&(l.value=k,h.value=k.name,p.value=k.objectType,g.value=k.accountId,d.value=k.eCatalogId,m.value=k.currencyCode,y.value=k.userLocale,_.value=k.opportunityId),(k==null?void 0:k.objectType)==="XX_ORD1__Quote__c"?(t.quoteId=k==null?void 0:k.recordId,t.templateId=k==null?void 0:k.templateId,t.quoteName=k==null?void 0:k.name,t.lineItemsCount=(k==null?void 0:k.lineItemsCount)||0):(k==null?void 0:k.objectType)==="Opportunity"&&await t.getPrimaryQuote(k.recordId),k}catch(k){n.handleError(k.message)}}async function O(){var R,F;console.info("getOrgInformation",r.value);const k=await window.salesforceConnector.getOrgInformation();e.websocketUrl=k.websocketUrl,a.value=(R=k.locale)==null?void 0:R.replace("_","-"),s.value=k.user,u.value=k.orgName,f.value=k.orgId,c.value=k.orgType,v.value=k.packageVersion,x.value=(F=k==null?void 0:k.pricingSchema)==null?void 0:F.toLowerCase()}function E(k){o.value=k,C2(k)}return{id:r,origin:i,title:S,subTitle:o,locale:a,user:s,orgName:u,orgId:f,orgType:c,packageVersion:v,objectType:p,recordInfo:l,name:h,accountId:g,eCatalogId:d,currencyCode:m,userLocale:y,opportunityId:_,pricingSchema:x,isSinglePricingSchema:A,flyoutState:C,start:I,getRecordInfo:B,setSubTitle:E}}),v5="XX_ORD1__Quote__c",g5="xxord1salespricec",yo="xx_ord1__item__c",m5="xxord1productnrcc",y5=wt("cartStore",()=>{const e=sr(),n=Ku(),t=Qt(),r=te(""),i=te("$0"),o=te("$0"),a=te(null),s=te({}),u=te({}),f=te({}),c=te(""),v=te(""),l=te({}),h=te(""),p=te(""),g=te({});async function d(){S()}async function m(){try{let B=await window.salesforceConnector.getProductCount(e.quoteId);if(B=St(B),B!=null&&B.errorMessage){t.handleError(B.errorMessage);return}return r.value=B,B}catch{t.handleError("Failed to get Product Count. Please try again.")}}async function y(){try{let B=await window.salesforceConnector.getQuoteTotal(e.quoteId);if(B=St(B),B!=null&&B.errorMessage){t.handleError(B.errorMessage);return}return o.value=B.monthlyTotal,i.value=B.onetimeTotal,B}catch{t.handleError("Failed to get Total Amount. Please try again.")}}async function _(B,O,E,k=""){if(!e.sectionDataMap.get(E).parentQLIs[O].removingItem){e.sectionDataMap.get(E).parentQLIs[O].removingItem=!0,p.value=B.id,await x(B.id)==="Success"&&(e.fetchAllQuoteLineItems(),k&&k(B,O,E));let F=e.sectionDataMap.get(E).parentQLIs.filter(q=>q[yo]===B[yo]).length;p.value="",n.lstItems.forEach(q=>{q[yo]===B[yo]&&(q.addedToQuote===!0&&(q.addedToQuote=!1),F===0&&(q.removedFromQuote=!0))})}}async function x(B){try{let O=await window.salesforceConnector.deleteQLI(B);if(O!=null&&O.errorMessage){t.handleError(O.errorMessage);return}return m(),y(),O}catch{t.handleError("Failed to remove Quote Item. Please try again.")}}function C(B){var k,R;const O=(k=B==null?void 0:B[m5])==null?void 0:k.match(/\.\d+/);O&&(O.value=O[0].length-1);const E=(R=B==null?void 0:B[g5])==null?void 0:R.match(/\.\d+/);return E&&(E.value=E[0].length-1),O||E}function S(B=!0){m(),y(),B&&e.fetchTemplates(v5).then(()=>{e.getFilteredListWithFields()})}function A(B){const O=e.sectionDataMap;for(const[,E]of O.entries())E.parentQLIs.forEach(k=>{k.id===B.id&&(E.columns.forEach(R=>{if(R.dataType==="CURRENCY"){const F=R.field.replace(/_/g,"");k[F]=I(k[F],B[R.field])}}),B!=null&&B.billingPeriodValue&&(B!=null&&B.formattedBillingPeriodValue)&&(k.formattedBillingPeriodValue=I(k.formattedBillingPeriodValue,B.billingPeriodValue)),B!=null&&B.oneTimeValue&&(B!=null&&B.formattedOneTimeValue)&&(k.formattedOneTimeValue=I(k.formattedOneTimeValue,B.oneTimeValue)))})}function I(B,O){const E=Number(O);if(isNaN(E))return B;const k=B.match(/(\d[\d,]*)(\.\d+)?/);if(!k)return B;const R=k[2]||"",F=R.length?R.length-1:0,q=E.toLocaleString("en-US",{minimumFractionDigits:F,maximumFractionDigits:F});return B.replace(k[1]+R,q)}return{initializeCart:d,loadCartState:S,productCount:r,onetimeTotal:i,monthlyTotal:o,filterCartItem:a,billingPeriodValue:c,hasOneTimeValue:v,hasBillingPeriodInList:s,oneTimeFieldAvailable:u,billingPeriodFieldAvailable:f,priceDecimalPrecision:l,cartItemUpdatingId:h,removingItemLoaderId:p,cartItemColumnsMap:g,getProductCount:m,getQuoteTotal:y,removeItem:_,removeQuoteItem:x,getDecimalPrecisionFromSalesPriceOrNRC:C,updateFormattedValues:A,formateCurrencyValue:I}}),x5=e=>[{title:"Apply Discount",subOptions:[...e.map(n=>`Apply Discount on ${n} for `),"Show Maximum discount allowed","Apply Maximum Discount Allowed",...e.map(n=>`Apply Discount on ${n} for a specific total`)]},{title:"Update Fields",subOptions:["Update the price of","Update the quantity of","Update the term start date to","Update the term end date to","Update the line description for"]},{title:"Price Ramp",subOptions:["Add a price ramp for"]}],_5={salesforceUserLocale:"en_US",chatRoomId:"00DA0000000cDUJMA2__0052G00000AHBNAQA5__a0jKb000004VSaMIAW",status:"SUCCESS",statusCode:200,requestId:"9b1d1f0a9f07aa6cdc",errorMessage:"",payload:{uiModification:{addColumn:[],removeColumn:[],filter:[],groupBy:[{sectionName:"MRC $50 and Above",filters:[{datatype:"currency",field:"XX_ORD1__MRC__c",operator:"greater or equal",value:"50"}],tableId:"4vIEgoK5CbSPrLYPbq"},{sectionName:"MRC Below $50",filters:[{datatype:"currency",field:"XX_ORD1__MRC__c",operator:"less than",value:"50"}],tableId:"BlOPCp7eLBCZ84nDT2"}],showOptions:!0}},agentResponse:{role:"agent",requestId:"9b1d1f0a9f07aa6cdc",content:"Grouped the quote items into two sections: one for MRC $50 and above, and another for MRC below $50.",error:!1,epoch:1759936160464,isDML:!1},redirectObjects:{qliId:"",itemId:"",componentName:"QuoteItem"},actionFunction:"Reload",links:[{action:"quoteDocument",label:"Quote Document"},{action:"addProducts",label:"Add Products"}]},b5=[{label:"Line Description",field:"xx_ord1__line_description__c",isEditable:!0,dataType:"STRING"},{label:"QTY",field:"xx_ord1__qty__c",isEditable:!0,dataType:"DOUBLE"},{label:"Extended Price",field:"xx_ord1__extended_price__c",isEditable:!1,dataType:"CURRENCY"},{label:"Billing Period",field:"xx_ord1__billing_period__c",isEditable:!0,dataType:"PICKLIST",picklistValues:["Monthly","Quarterly","Yearly"]}],sr=wt("quote",()=>{const e=Qt(),n=y5(),t=mo(),r=te(""),i=te(""),o=te(0),a=te(""),s=te([]),u=te({template:!0,filteredList:!1}),f=te(null),c=te(new Map),v=te({}),l=te(!1),h=te(!0),p=te(!1),g=te({text:"Hide Options",altText:"Show Options",handler:()=>{h.value=!h.value,I()},color:"#136E05",isActive:!1}),d=me(()=>{const N=Array.from(c.value.values()).map(w=>w.sectionName);return x5(N)});Ye(a,()=>{u.value.template||A()});function m(){const N=new Map,w=[];for(const[L,$]of c.value.entries())N.set(L,$.selected),w.push($);const D=JSON.parse(JSON.stringify(w));return D.forEach(L=>{delete L.selected;const $=new Map,G=[];L.lineItems.forEach(j=>{j.Selected=N.get(L.tableId).get(j.id)||!1,j.xx_ord1__parent_qli__c?($.has(j.xx_ord1__parent_qli__c)||$.set(j.xx_ord1__parent_qli__c,[]),$.get(j.xx_ord1__parent_qli__c).push(j)):G.push(j)}),L.lineItems=G.map(j=>({...j,options:$.get(j.id)||[]})),delete L.loading,delete L.parentQLIs,delete L.totalValues}),{showOptions:h.value,sections:D,templateId:a.value}}async function y(N){try{let w=await window.salesforceConnector.getPrimaryQuote(N);w=St(w),w!==void 0&&(console.info("getPrimaryQuote",JSON.stringify(w)),r.value=w.recordId,console.info("quoteId",r.value),i.value=w.name,a.value=w==null?void 0:w.templateId,o.value=(w==null?void 0:w.lineItemsCount)||0)}catch(w){e.handleError(w.message),console.info("[ERROR]: getPrimaryQuote() error = ",w)}}async function _(N){var w,D;try{u.value.template=!0;let L=await window.salesforceConnector.fetchContentTemplates(JSON.stringify({lstObjectName:[N],templateType:"Document",templateId:null,fetchOnlyDefault:!1}));L=St(L);const $=L==null?void 0:L.templates[N];return a.value||(a.value=(w=$.find(G=>G.XX_ORD1__Default__c))==null?void 0:w.Id),a.value||(a.value=(D=$[0])==null?void 0:D.Id),s.value=$,u.value.template=!1,s.value}catch(L){e.handleError(L.message),console.info("[ERROR]: fetchTemplates() error = ",L)}}function x(N){if(!N)return null;const w=/\{!\$(\w+):([\w.]+)\}/,D=N.match(w);return D?{function:D[1],apiname:D[2].split(".")[1]}:null}async function C(N){try{const w={Id:r.value,XX_ORD1__Document_Template__c:N};return await window.salesforceConnector.updateQuote(JSON.stringify([w]))}catch(w){e.handleError(w.message),console.info("[ERROR]: updateQuote() error = ",w)}}async function S(){try{u.value.filteredList=!0;let N=await window.salesforceConnector.getQuoteEPageLayout();c.value.clear(),n.cartItemColumnsMap={},N=St(N);const w=N.map(L=>({label:L.fieldLabel,field:L.fieldName.toLowerCase(),isEditable:L.isEditable,dataType:L.dataType,...L.picklistValues?{picklistValues:L.picklistValues}:{}})),D=ar();return c.value.set(D,{loading:!0,lineItems:[],parentQLIs:[],columns:w,tableId:D,sectionName:"All Rows",selected:new Map,filters:[],primarysort:"XX_ORD1__Sequence__c",primarysortdesc:""}),n.cartItemColumnsMap[D]=w,g.value.isActive=!1,h.value=!0,f.value={lstCB:[{columns:w,footer:null,title:"All Rows",sectionName:"All Rows",tableId:D,filters:[],primarysort:"XX_ORD1__Sequence__c",primarysortdesc:""}]},I(),u.value.filteredList=!1,N}catch(N){e.handleError(N.message),console.info("[ERROR]: getQuoteEPageLayout() error = ",N)}}async function A(){if(s.value.length===0){S();return}try{u.value.filteredList=!0;let N=await window.salesforceConnector.getFilteredListWithFields(JSON.stringify({templateId:a.value}));C(a.value),N=St(N),console.info("res.lstCB = ",N.lstCB);const w=N==null?void 0:N.objectFieldsMap;return c.value.clear(),n.cartItemColumnsMap={},N.lstCB=N.lstCB.map(D=>{const{fields:L,filters:$,primarysort:G,primarysortdesc:j}=JSON.parse(D.XX_ORD1__Block_Properties__c),W=L.map(H=>{var V;return{label:(V=w[H.api])==null?void 0:V.label,field:H.api.toLowerCase(),isEditable:H.api.includes(".")?!1:w[H.api].isEditable,dataType:w[H.api].dataType,...w[H.api].picklistValues?{picklistValues:w[H.api].picklistValues}:{}}}),M=D.Id||ar();return c.value.set(M,{loading:!0,lineItems:[],parentQLIs:[],columns:W,tableId:M,sectionName:D.Name,selected:new Map,footer:x(D.XX_ORD1__Table_Footer_HTML__c),filters:$,primarysort:G,primarysortdesc:j}),n.cartItemColumnsMap[M]=W,g.value.isActive=!1,h.value=!0,{columns:W,footer:x(D.XX_ORD1__Table_Footer_HTML__c),title:D.Name,sectionName:D.Name,tableId:M,filters:$,primarysort:G,primarysortdesc:j}}),f.value=N,I(),u.value.filteredList=!1,N}catch(N){e.handleError(N.message),console.info("[ERROR]: getFilteredListWithFields() error = ",N)}}async function I(N=!0){const w=[];for(const[D]of c.value)w.push(E(D,N));return await Promise.all(w),n.getProductCount(),!0}function B(N,w){return c.value.get(N).columns.some(D=>D.field.toLowerCase()===w)||n.cartItemColumnsMap[N].some(D=>D.field.toLowerCase()===w)}function O(N,w){let D=po(N);const L=t.pricingSchema,$=B(w,"xx_ord1__nrc__c"),G=B(w,"xx_ord1__sales_price__c"),j=B(w,"xx_ord1__qty__c");return D=D.map(W=>{let M={};L==="nrc/mrc"&&(W!=null&&W.xx_ord1__billing_period__c)?M={...G?{billingPeriodValue:(W==null?void 0:W.xx_ord1__sales_price__c)===0?"0":(W==null?void 0:W.xx_ord1__sales_price__c)||null,formattedBillingPeriodValue:W==null?void 0:W.xxord1salespricec}:{},...$?{oneTimeValue:(W==null?void 0:W.xx_ord1__nrc__c)===0?"0":(W==null?void 0:W.xx_ord1__nrc__c)||null,formattedOneTimeValue:W==null?void 0:W.xxord1nrcc}:{}}:L==="nrc/mrc"&&!(W!=null&&W.xx_ord1__billing_period__c)?G&&(M={oneTimeValue:(W==null?void 0:W.xx_ord1__sales_price__c)===0?"0":(W==null?void 0:W.xx_ord1__sales_price__c)||null,formattedOneTimeValue:W==null?void 0:W.xxord1salespricec}):L!=="nrc/mrc"&&(W!=null&&W.xx_ord1__billing_period__c)?G&&(M={billingPeriodValue:(W==null?void 0:W.xx_ord1__sales_price__c)===0?"0":(W==null?void 0:W.xx_ord1__sales_price__c)||null,formattedBillingPeriodValue:W==null?void 0:W.xxord1salespricec}):L!=="nrc/mrc"&&!(W!=null&&W.xx_ord1__billing_period__c)&&G&&(M={oneTimeValue:(W==null?void 0:W.xx_ord1__sales_price__c)===0?0:(W==null?void 0:W.xx_ord1__sales_price__c)||null,formattedOneTimeValue:W==null?void 0:W.xxord1salespricec});const{xx_ord1__qty__c:H,xx_ord1__sales_price__c:V,xx_ord1__nrc__c:K,...J}=W,P={...J,id:W.id,description:(W==null?void 0:W.xx_ord1__line_description__c)||"",xx_ord1__billing_period__c:W==null?void 0:W.xx_ord1__billing_period__c,...j?{xx_ord1__qty__c:H}:{},xx_ord1__item__c:W==null?void 0:W.xx_ord1__item__c,"xx_ord1__item__r.xx_ord1__decimal_precision__c":W["xx_ord1__item__r.xx_ord1__decimal_precision__c"]||"0",...M};return P!=null&&P.billingPeriodValue&&(n.hasBillingPeriodInList[w]=!0,n.billingPeriodValue=P==null?void 0:P.xx_ord1__billing_period__c),"oneTimeValue"in P&&(n.oneTimeFieldAvailable[w]=!0),"billingPeriodValue"in P&&(n.billingPeriodFieldAvailable[w]=!0),(P==null?void 0:P.oneTimeValue)!==""&&(P==null?void 0:P.oneTimeValue)!==null&&(n.hasOneTimeValue=!0),P}),D}async function E(N,w=!0){var D,L;try{const $=c.value.get(N);if(console.info("sectionData = ",$.sectionName),!$)return;$.loading=w,w&&($.lineItems=[]);const{columns:G,filters:j,primarysort:W,primarysortdesc:M,footer:H}=$,V=G.map(ce=>ce.field.toLowerCase());V.includes("xx_ord1__parent_qli__c")||V.push("xx_ord1__parent_qli__c"),V.includes("xx_ord1__item__c")||V.push("xx_ord1__item__c"),V.includes("xx_ord1__sys_configuration_status2__c")||V.push("xx_ord1__sys_configuration_status2__c"),(D=n.cartItemColumnsMap[N])==null||D.forEach(ce=>{V.includes(ce.field)||V.push(ce.field)});const K=await k({fields:V,recordId:r.value,filters:j||[],primarySortBy:W||"",primarySortOrder:M?"DESC":"ASC",includeOptions:h.value,totalFields:H?[H.apiname]:[]}),J=K.lineItems,P=new Map;let X=[];const se=(L=K.fieldTotals)==null?void 0:L.map(ce=>ce.totalValue);J.forEach(ce=>{ce.XX_ORD1__Parent_QLI__c?P.has(ce.XX_ORD1__Parent_QLI__c)?P.get(ce.XX_ORD1__Parent_QLI__c).push(ce):P.set(ce.XX_ORD1__Parent_QLI__c,[ce]):X.push(ce)});const fe=[];return X.forEach(ce=>{fe.push(ce),P.has(ce.Id)&&fe.push(...P.get(ce.Id))}),X=O(X,N),$.lineItems=po(fe),$.parentQLIs=X,$.totalValues=se,$.loading=!1,c.value=new Map(c.value),fe}catch($){console.info("[ERROR]: fetchQuoteLineItems()123 error = ",$.message);const G=c.value.get(N);G&&(G.loading=!1)}}async function k(N){try{let w=await window.salesforceConnector.getQuoteLineItemsWithFilteredTable(JSON.stringify(N));return w=St(w),w}catch(w){e.handleError(w.message),console.info("[ERROR]: getQuoteLineItemsWithFilteredTable() error = ",w)}}async function R(N){try{console.info("updateQli() payload = ",N);let w=await window.salesforceConnector.updateQli(JSON.stringify(N));return w=St(w),I(!1),w}catch(w){e.handleError(w.message),console.info("[ERROR]: updateQli() error = ",w)}}async function F(N){try{let w=await window.salesforceConnector.deleteQLI(N);return w=St(w),I(),w}catch(w){e.handleError(w.message),console.info("[ERROR]: deleteQLI() error = ",w)}}async function q(N,w){try{l.value=!0;const D={fields:N};w&&(D.objectName=w),N.includes("xx_ord1__qty__c")&&w==="xx_ord1__ecatalog_item__c"&&(D.fields=D.fields.filter($=>$!=="xx_ord1__qty__c")),N.includes("xx_ord1__sales_price__c")&&w!=="xx_ord1__quote_line_item__c"&&(D.fields=D.fields.filter($=>$!=="xx_ord1__sales_price__c"));let L=await window.salesforceConnector.getFieldsData(JSON.stringify(D));return typeof L=="string"&&(L=JSON.parse(L)),L!=null&&L.errorMessage?(e.handleError(L.errorMessage),null):(v.value={...v.value,...L},console.info("fieldsData.value = ",JSON.stringify(v.value)),L)}catch(D){return e.handleError("Failed to get Fields Data. Please try again."),console.info("[ERROR]: getFieldsData() error = ",D),null}finally{l.value=!1}}function Z(N=""){var w;return!N||N.includes(".")?!1:N.includes("xx_ord1__qty__c")?!0:((w=v.value[N])==null?void 0:w.isEditable)||!1}function ee(){ne(_5)}async function ne(N){var w,D,L,$,G,j,W,M,H;if(N.payload){if((w=N.payload)!=null&&w.uiModification){const V=N.payload.uiModification;if(((D=V.addColumn)==null?void 0:D.length)>0)if(V.addColumn.forEach(K=>{K.columns.forEach(J=>{J.field=J.field.toLowerCase()})}),V.addColumn[0].sectionName==="all_section")for(const[K,J]of c.value)J.columns=[...J.columns,...V.addColumn[0].columns];else V.addColumn.forEach(K=>{c.value.get(K.tableId)&&(c.value.get(K.tableId).columns=[...c.value.get(K.tableId).columns,...K.columns])});if(((L=V.removeColumn)==null?void 0:L.length)>0)if(V.removeColumn.forEach(K=>{K.columns=K.columns.map(J=>J.toLowerCase())}),V.removeColumn[0].sectionName==="all_section")for(const[K,J]of c.value)J.columns=J.columns.filter(P=>!V.removeColumn[0].columns.includes(P.field));else V.removeColumn.forEach(K=>{c.value.get(K.tableId)&&(c.value.get(K.tableId).columns=c.value.get(K.tableId).columns.filter(J=>!K.columns.includes(J.field)))});if((($=V.filter)==null?void 0:$.length)>0)if(V.filter[0].sectionName==="all_section")for(const[K,J]of c.value)J.filters=[...J.filters,...V.filter[0].filters];else V.filter.forEach(K=>{c.value.get(K.tableId)&&(c.value.get(K.tableId).filters=[...c.value.get(K.tableId).filters,...K.filters])});if(((G=V.groupBy)==null?void 0:G.length)>0){const K=((j=[...c.value.values()][0])==null?void 0:j.columns)||b5;c.value.clear(),n.cartItemColumnsMap={},V.groupBy.forEach(J=>{n.cartItemColumnsMap[J.tableId]=J.columns||K,c.value.set(J.tableId,{loading:!0,lineItems:[],parentQLIs:[],columns:J.columns||K,tableId:J.tableId,sectionName:J.sectionName,selected:new Map,footer:x(J.footer),filters:J.filters,primarysort:J.primarysort,primarysortdesc:J.primarysortdesc})})}V.showOptions!==void 0&&(h.value=V.showOptions)}if(((M=(W=N.payload)==null?void 0:W.sections)==null?void 0:M.length)>0){const V=(H=N.payload)==null?void 0:H.sections;c.value.clear(),V.forEach(K=>{K.tableId||(K.tableId=ar()),K.selected=new Map,c.value.set(K.tableId,K)}),I()}}N.actionFunction==="Reload"&&(I(),console.info("Reloading quote line items"))}async function Q(N){var w,D;try{const L=new Set;for(const $ of c.value.keys())(w=c.value.get($).lineItems)==null||w.forEach(j=>{j.attributes=null,L.add(j.id)});if(N){const $={lineItemIds:[...L]},G=await window.productManagerController.getLineItemAttributes({request:JSON.stringify($)}),j=JSON.parse(G.data);for(const W of c.value.keys())(D=c.value.get(W).lineItems)==null||D.forEach(H=>{H.attributes=j[H.id]||null})}}catch(L){console.info("[ERROR]: fetchAttributesData() error = ",L)}}return{showAttributes:p,quoteId:r,quoteName:i,templateId:a,templateOptions:s,loading:u,currentTemplateData:f,fieldsData:v,fieldsDataLoading:l,showOptionHeaderButton:g,sectionDataMap:c,promptSuggestions:d,lineItemsCount:o,addColumns:ee,getQuoteEPageLayout:S,getPayload:m,getPrimaryQuote:y,fetchTemplates:_,getFilteredListWithFields:A,getQuoteLineItemsWithFilteredTable:k,updateQli:R,getFieldsData:q,deleteQLI:F,performAIAction:ne,isEditableField:Z,fetchQuoteLineItems:E,fetchAllQuoteLineItems:I,fetchAttributesData:Q}});function Xu(e,n){return function(){return e.apply(n,arguments)}}const{toString:C5}=Object.prototype,{getPrototypeOf:Za}=Object,{iterator:xo,toStringTag:Wu}=Symbol,_o=(e=>n=>{const t=C5.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Zt=e=>(e=e.toLowerCase(),n=>_o(n)===e),bo=e=>n=>typeof n===e,{isArray:Fr}=Array,Nr=bo("undefined");function di(e){return e!==null&&!Nr(e)&&e.constructor!==null&&!Nr(e.constructor)&&It(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Gu=Zt("ArrayBuffer");function w5(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&Gu(e.buffer),n}const E5=bo("string"),It=bo("function"),Qu=bo("number"),hi=e=>e!==null&&typeof e=="object",A5=e=>e===!0||e===!1,Co=e=>{if(_o(e)!=="object")return!1;const n=Za(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Wu in e)&&!(xo in e)},k5=e=>{if(!hi(e)||di(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},O5=Zt("Date"),S5=Zt("File"),I5=Zt("Blob"),T5=Zt("FileList"),B5=e=>hi(e)&&It(e.pipe),D5=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||It(e.append)&&((n=_o(e))==="formdata"||n==="object"&&It(e.toString)&&e.toString()==="[object FormData]"))},R5=Zt("URLSearchParams"),[L5,F5,N5,P5]=["ReadableStream","Request","Response","Headers"].map(Zt),M5=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pi(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Fr(e))for(r=0,i=e.length;r<i;r++)n.call(null,e[r],r,e);else{if(di(e))return;const o=t?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],n.call(null,e[s],s,e)}}function Zu(e,n){if(di(e))return null;n=n.toLowerCase();const t=Object.keys(e);let r=t.length,i;for(;r-- >0;)if(i=t[r],n===i.toLowerCase())return i;return null}const lr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ju=e=>!Nr(e)&&e!==lr;function Ja(){const{caseless:e,skipUndefined:n}=Ju(this)&&this||{},t={},r=(i,o)=>{const a=e&&Zu(t,o)||o;Co(t[a])&&Co(i)?t[a]=Ja(t[a],i):Co(i)?t[a]=Ja({},i):Fr(i)?t[a]=i.slice():(!n||!Nr(i))&&(t[a]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&pi(arguments[i],r);return t}const q5=(e,n,t,{allOwnKeys:r}={})=>(pi(n,(i,o)=>{t&&It(i)?e[o]=Xu(i,t):e[o]=i},{allOwnKeys:r}),e),$5=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),j5=(e,n,t,r)=>{e.prototype=Object.create(n.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),t&&Object.assign(e.prototype,t)},H5=(e,n,t,r)=>{let i,o,a;const s={};if(n=n||{},e==null)return n;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,n))&&!s[a]&&(n[a]=e[a],s[a]=!0);e=t!==!1&&Za(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},V5=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const r=e.indexOf(n,t);return r!==-1&&r===t},U5=e=>{if(!e)return null;if(Fr(e))return e;let n=e.length;if(!Qu(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},z5=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Za(Uint8Array)),K5=(e,n)=>{const r=(e&&e[xo]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;n.call(e,o[0],o[1])}},X5=(e,n)=>{let t;const r=[];for(;(t=e.exec(n))!==null;)r.push(t);return r},W5=Zt("HTMLFormElement"),G5=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,i){return r.toUpperCase()+i}),Yu=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),Q5=Zt("RegExp"),e0=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),r={};pi(t,(i,o)=>{let a;(a=n(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},Z5=e=>{e0(e,(n,t)=>{if(It(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=e[t];if(It(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},J5=(e,n)=>{const t={},r=i=>{i.forEach(o=>{t[o]=!0})};return Fr(e)?r(e):r(String(e).split(n)),t},Y5=()=>{},e9=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function t9(e){return!!(e&&It(e.append)&&e[Wu]==="FormData"&&e[xo])}const n9=e=>{const n=new Array(10),t=(r,i)=>{if(hi(r)){if(n.indexOf(r)>=0)return;if(di(r))return r;if(!("toJSON"in r)){n[i]=r;const o=Fr(r)?[]:{};return pi(r,(a,s)=>{const u=t(a,i+1);!Nr(u)&&(o[s]=u)}),n[i]=void 0,o}}return r};return t(e,0)},r9=Zt("AsyncFunction"),i9=e=>e&&(hi(e)||It(e))&&It(e.then)&&It(e.catch),t0=((e,n)=>e?setImmediate:n?((t,r)=>(lr.addEventListener("message",({source:i,data:o})=>{i===lr&&o===t&&r.length&&r.shift()()},!1),i=>{r.push(i),lr.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",It(lr.postMessage)),o9=typeof queueMicrotask<"u"?queueMicrotask.bind(lr):typeof process<"u"&&process.nextTick||t0,de={isArray:Fr,isArrayBuffer:Gu,isBuffer:di,isFormData:D5,isArrayBufferView:w5,isString:E5,isNumber:Qu,isBoolean:A5,isObject:hi,isPlainObject:Co,isEmptyObject:k5,isReadableStream:L5,isRequest:F5,isResponse:N5,isHeaders:P5,isUndefined:Nr,isDate:O5,isFile:S5,isBlob:I5,isRegExp:Q5,isFunction:It,isStream:B5,isURLSearchParams:R5,isTypedArray:z5,isFileList:T5,forEach:pi,merge:Ja,extend:q5,trim:M5,stripBOM:$5,inherits:j5,toFlatObject:H5,kindOf:_o,kindOfTest:Zt,endsWith:V5,toArray:U5,forEachEntry:K5,matchAll:X5,isHTMLForm:W5,hasOwnProperty:Yu,hasOwnProp:Yu,reduceDescriptors:e0,freezeMethods:Z5,toObjectSet:J5,toCamelCase:G5,noop:Y5,toFiniteNumber:e9,findKey:Zu,global:lr,isContextDefined:Ju,isSpecCompliantForm:t9,toJSONObject:n9,isAsyncFn:r9,isThenable:i9,setImmediate:t0,asap:o9,isIterable:e=>e!=null&&It(e[xo])};function Re(e,n,t,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),t&&(this.config=t),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}de.inherits(Re,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.status}}});const n0=Re.prototype,r0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{r0[e]={value:e}}),Object.defineProperties(Re,r0),Object.defineProperty(n0,"isAxiosError",{value:!0}),Re.from=(e,n,t,r,i,o)=>{const a=Object.create(n0);de.toFlatObject(e,a,function(c){return c!==Error.prototype},f=>f!=="isAxiosError");const s=e&&e.message?e.message:"Error",u=n==null&&e?e.code:n;return Re.call(a,s,u,t,r,i),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",o&&Object.assign(a,o),a};const a9=null;function Ya(e){return de.isPlainObject(e)||de.isArray(e)}function i0(e){return de.endsWith(e,"[]")?e.slice(0,-2):e}function o0(e,n,t){return e?e.concat(n).map(function(i,o){return i=i0(i),!t&&o?"["+i+"]":i}).join(t?".":""):n}function s9(e){return de.isArray(e)&&!e.some(Ya)}const l9=de.toFlatObject(de,{},null,function(n){return/^is[A-Z]/.test(n)});function wo(e,n,t){if(!de.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,t=de.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,d){return!de.isUndefined(d[g])});const r=t.metaTokens,i=t.visitor||c,o=t.dots,a=t.indexes,u=(t.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(n);if(!de.isFunction(i))throw new TypeError("visitor must be a function");function f(p){if(p===null)return"";if(de.isDate(p))return p.toISOString();if(de.isBoolean(p))return p.toString();if(!u&&de.isBlob(p))throw new Re("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(p)||de.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,g,d){let m=p;if(p&&!d&&typeof p=="object"){if(de.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(de.isArray(p)&&s9(p)||(de.isFileList(p)||de.endsWith(g,"[]"))&&(m=de.toArray(p)))return g=i0(g),m.forEach(function(_,x){!(de.isUndefined(_)||_===null)&&n.append(a===!0?o0([g],x,o):a===null?g:g+"[]",f(_))}),!1}return Ya(p)?!0:(n.append(o0(d,g,o),f(p)),!1)}const v=[],l=Object.assign(l9,{defaultVisitor:c,convertValue:f,isVisitable:Ya});function h(p,g){if(!de.isUndefined(p)){if(v.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));v.push(p),de.forEach(p,function(m,y){(!(de.isUndefined(m)||m===null)&&i.call(n,m,de.isString(y)?y.trim():y,g,l))===!0&&h(m,g?g.concat(y):[y])}),v.pop()}}if(!de.isObject(e))throw new TypeError("data must be an object");return h(e),n}function a0(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return n[r]})}function es(e,n){this._pairs=[],e&&wo(e,this,n)}const s0=es.prototype;s0.append=function(n,t){this._pairs.push([n,t])},s0.toString=function(n){const t=n?function(r){return n.call(this,r,a0)}:a0;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function c9(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function l0(e,n,t){if(!n)return e;const r=t&&t.encode||c9;de.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let o;if(i?o=i(n,t):o=de.isURLSearchParams(n)?n.toString():new es(n,t).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class c0{constructor(){this.handlers=[]}use(n,t,r){return this.handlers.push({fulfilled:n,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){de.forEach(this.handlers,function(r){r!==null&&n(r)})}}const u0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},u9={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:es,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ts=typeof window<"u"&&typeof document<"u",ns=typeof navigator=="object"&&navigator||void 0,f9=ts&&(!ns||["ReactNative","NativeScript","NS"].indexOf(ns.product)<0),d9=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",h9=ts&&window.location.href||"http://localhost",yt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ts,hasStandardBrowserEnv:f9,hasStandardBrowserWebWorkerEnv:d9,navigator:ns,origin:h9},Symbol.toStringTag,{value:"Module"})),...u9};function p9(e,n){return wo(e,new yt.classes.URLSearchParams,{visitor:function(t,r,i,o){return yt.isNode&&de.isBuffer(t)?(this.append(r,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...n})}function v9(e){return de.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function g9(e){const n={},t=Object.keys(e);let r;const i=t.length;let o;for(r=0;r<i;r++)o=t[r],n[o]=e[o];return n}function f0(e){function n(t,r,i,o){let a=t[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),u=o>=t.length;return a=!a&&de.isArray(i)?i.length:a,u?(de.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!de.isObject(i[a]))&&(i[a]=[]),n(t,r,i[a],o)&&de.isArray(i[a])&&(i[a]=g9(i[a])),!s)}if(de.isFormData(e)&&de.isFunction(e.entries)){const t={};return de.forEachEntry(e,(r,i)=>{n(v9(r),i,t,0)}),t}return null}function m9(e,n,t){if(de.isString(e))try{return(n||JSON.parse)(e),de.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(e)}const rs={transitional:u0,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const r=t.getContentType()||"",i=r.indexOf("application/json")>-1,o=de.isObject(n);if(o&&de.isHTMLForm(n)&&(n=new FormData(n)),de.isFormData(n))return i?JSON.stringify(f0(n)):n;if(de.isArrayBuffer(n)||de.isBuffer(n)||de.isStream(n)||de.isFile(n)||de.isBlob(n)||de.isReadableStream(n))return n;if(de.isArrayBufferView(n))return n.buffer;if(de.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return p9(n,this.formSerializer).toString();if((s=de.isFileList(n))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return wo(s?{"files[]":n}:n,u&&new u,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),m9(n)):n}],transformResponse:[function(n){const t=this.transitional||rs.transitional,r=t&&t.forcedJSONParsing,i=this.responseType==="json";if(de.isResponse(n)||de.isReadableStream(n))return n;if(n&&de.isString(n)&&(r&&!this.responseType||i)){const a=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(n,this.parseReviver)}catch(s){if(a)throw s.name==="SyntaxError"?Re.from(s,Re.ERR_BAD_RESPONSE,this,null,this.response):s}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],e=>{rs.headers[e]={}});const is=rs,y9=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),x9=e=>{const n={};let t,r,i;return e&&e.split(`
28
+ */var Hu;(function(e){e.pop="pop",e.push="push"})(Hu||(Hu={}));var Vu;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Vu||(Vu={}));var Uu;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Uu||(Uu={}));const a5=Symbol(""),s5=Symbol("");function fi(){return $n(a5)}function l5(){return $n(s5)}function St(e){if(typeof e=="string"&&(e=JSON.parse(e)),e!=null&&e.errorMessage)throw new Error(e==null?void 0:e.errorMessage);return e}const Qa={xx_ord1__item__c:"xx_ord1__item__c",xx_ord1__sales_price__c:"xx_ord1__negotiated_price__c",xx_ord1__nrc__c:"xx_ord1__nrc_for_new__c",xx_ord1__line_description__c:"xx_ord1__line_description__c",xx_ord1__list_price__c:"xx_ord1__list_price2__c",xx_ord1__cost__c:"xx_ord1__cost2__c",xx_ord1__rate_plan__c:"xx_ord1__rate_plan__c",xx_ord1__allowed_discount__c:"xx_ord1__allowed_discount__c",xx_ord1__billing_period__c:"xx_ord1__billing_period__c",xx_ord1__ship_to_account__c:"xx_ord1__ship_to_account__c",xx_ord1__erp_item_number__c:"xx_ord1__erp_item_number__c",xx_ord1__mrc__c:"xx_ord1__mrc__c",xx_ord1__qty__c:"xx_ord1__qty__c",id:"id"},zu={xx_ord1__item__c:"xx_ord1__item__c",xx_ord1__negotiated_price__c:"xx_ord1__sales_price__c",xx_ord1__nrc_for_new__c:"xx_ord1__nrc__c",xx_ord1__line_description__c:"xx_ord1__line_description__c",xx_ord1__list_price2__c:"xx_ord1__list_price__c",xx_ord1__cost2__c:"xx_ord1__cost__c",xx_ord1__rate_plan__c:"xx_ord1__rate_plan__c",xx_ord1__allowed_discount__c:"xx_ord1__allowed_discount__c",xx_ord1__billing_period__c:"xx_ord1__billing_period__c",xx_ord1__ship_to_account__c:"xx_ord1__ship_to_account__c",xx_ord1__erp_item_number__c:"xx_ord1__erp_item_number__c",xx_ord1__mrc__c:"xx_ord1__mrc__c",xx_ord1__qty__c:"xx_ord1__qty__c",id:"id"},c5=e=>{var t;let n=[];for(let r of e)if(r.trim()!=="xx_ord1__item__r.xx_ord1__decimal_precision__c")if(r.includes(".")){let o=r.split(".")[0];o=o.slice(0,-1)+"c";const a=((t=Qa[o==null?void 0:o.toLowerCase()])==null?void 0:t.trim())||"";a&&(n.includes(a)||n.push(a||""),n.push(r))}else n.includes(Qa[r==null?void 0:r.toLowerCase()])||n.push(Qa[r==null?void 0:r.toLowerCase()]||"");return n.filter(r=>r!=="")},u5=wt("actions",()=>{const e=go(),n=sr(),t=te(!1);return{openAdaptiveSearch:(s,u=!1)=>{console.info("openAdaptiveSearch",s),e.chatHistory[e.chatHistory.length-1].links=[],e.sendMessage("Open Adaptive Search",!1,{internalCall:!0}),t.value=u},openQuoteItem:s=>{console.info("openQuoteItem",s),e.chatHistory[e.chatHistory.length-1].links=[],e.sendMessage("Open Quote Item",!1,{internalCall:!0})},openQuoteDocument:s=>{console.info("openQuoteDocument",s),e.chatHistory[e.chatHistory.length-1].links=[],e.chatHistory.push({type:"response",message:"Opening quote document",loading:!0});const f=`/apex/XX_ORD1__Expedite_Commerce?scpq=true&oid=${n.quoteId}&atpverified=true&ecCache=false&origin=AI`;window.location.href=`${b2(window.location.href)}${f}`},undo:()=>{const s=e==null?void 0:e.latestDMLRequest;e.sendMessage(`UNDO-${s}`,!1,{internalCall:!0})},isStaticActionCall:t}}),Ku=wt("adaptiveSearch",()=>{const e=sr(),n=mo(),t=go(),r=u5(),i=te(null),o=te(null),a=te(!1),s=te(!1),u=te([]),f=te(""),c=te(!1),v=te(null),l=te(!1),h=te([]),p=Qt(),g=te([]),d=te(0),m=te(!1),y=te({rowLimt:10,paging:!0,offset:0,currentPage:1,totalPages:1});async function _(){a.value=!0;try{const w=JSON.stringify({layoutType:"Search Selection",layoutObject:"xx_ord1__ecatalog_item__c"});let D={};return D=await window.salesforceConnector.getDynamicPageLayout(w),o.value=qu(D,"Unable to find the Search Selection Layout for your user profile"),y.value.rowLimt=o.value.configuration.rowLimit||10,o.value.configuration.columns.forEach(L=>{!L.field&&L.label==="QTY"&&(L.field="xx_ord1__qty__c")}),a.value=!1,x(),D}catch(w){a.value=!1,p.handleError("Failed to get Adaptive Search Layout. Please try again."),console.info("[ERROR]: getAdaptiveSearchLayout() error = ",w)}}function x(){var w,D,L;v.value=(L=(D=(w=o.value)==null?void 0:w.configuration)==null?void 0:D.dynamicFilters)==null?void 0:L.filters.map($=>({...$,field:$.field.toLowerCase(),filtervalue:$.filtervalue||[],filtervaluefrom:$.filtervaluefrom||"",filtervalueTo:$.filtervalueTo||""}))}function C(){var D;let w=[];for(const L of o.value.configuration.columns){let $=L.field;if(w.includes($)||w.push($),$!=null&&$.includes(".")){let j=$.split(".")[0];j=j.slice(0,-1)+"c",w.includes(j)||w.push(j)}}return(D=o.value.configuration)!=null&&D.cardHeader&&w.push(o.value.configuration.cardHeader.imageField),o.value.configuration.objectName.toLowerCase()==="xx_ord1__ecatalog_item__c"&&w.push("xx_ord1__item__r.xx_ord1__decimal_precision__c"),w=w.filter(L=>!!L),w.filter(L=>L.toLowerCase()!=="xx_ord1__qty__c"&&L.toLowerCase()!=="xx_ord1__competitor_sku__c")}function S(w,D=!1){if(!w||w.includes("undefined"))return!1;const L=/[!@#$%^&*()+=[\]{};':"\\|.<>/?]+/;if(D){const $=Array.isArray(w)?w:w.split(",");for(const G of $){const j=G.trim();if(L.test(j))return p.handleError(`Invalid character found in value: ${j}`),!1}}else if(L.test(w))return p.handleError("Special characters are not allowed in filter values"),!1;return!0}function A(w,D){return{field:w.field,operator:w.operator||"contains",value:D,dataType:w.dataType.trim()}}function I(w){if(!w.filtervalue)return null;const D=Array.isArray(w.filtervalue),L=D?w.filtervalue.join(","):w.filtervalue.trim();return S(L,D)?L:null}function B(w){var G,j;const D=(G=w.filtervaluefrom)==null?void 0:G.trim(),L=(j=w.filtervalueTo)==null?void 0:j.trim();if(!D||!L)return null;const $=`${D}, ${L}`;return $!==", "&&S($)?$:null}function O(w){const D=`${Mu(w.filtervaluefrom)}, ${Mu(w.filtervalueTo)}`;return D!==", "&&S(D)?D:null}function E(w){var L;const D=(L=w.filtervaluefrom)==null?void 0:L.trim();return S(D)?D:null}function k(w){const D=[];return w.forEach(L=>{const $=L.dataType.trim();let G=null;switch($){case"PICKLIST":case"MULTIPICKLIST":G=I(L);break;case"DOUBLE":case"CURRENCY":G=B(L);break;case"DATETIME":case"DATE":G=O(L);break;default:G=E(L)}G&&D.push(A(L,G))}),h.value=D,D}async function R(w="",D=[],L=[]){var G,j,W,M,H,V,K,J,P,X;let $=[];if(D.length&&($=k(D)),!$.length&&w.trim()===""){u.value=[],c.value=!1;return}try{c.value=!1,s.value=!0;const se=w.trim();L.length||(L=C());const fe={fields:L,...D.length?{dynamicFilters:$}:{},searchText:se||f.value.trim(),accountId:n.accountId,...n.eCatalogId?{catalogId:n.eCatalogId}:{},...n.objectType==="opportunity"?{opportunityId:n.id}:{},...(j=(G=o.value)==null?void 0:G.configuration)!=null&&j.sort?{primarySortBy:o.value.configuration.sort.primary.field,primarySortOrder:o.value.configuration.sort.primary.direction,secondarySortBy:o.value.configuration.sort.secondary.field,secondarySortOrder:o.value.configuration.sort.secondary.direction}:{},rowLimt:(M=(W=o.value)==null?void 0:W.configuration)==null?void 0:M.rowLimit,paging:(V=(H=o.value)==null?void 0:H.configuration)==null?void 0:V.paging,...((K=y.value)==null?void 0:K.offset)!==0?{offset:y.value.offset}:{},objectName:(P=(J=o.value)==null?void 0:J.configuration)==null?void 0:P.objectName,currencyCode:n.currencyCode},ue=await window.salesforceConnector.getItems(JSON.stringify(fe));if(ue!=null&&ue.errorMessage){p.handleError(ue.errorMessage);return}ue!=null&&ue.itemCount&&(y.value.totalPages=Math.ceil((ue==null?void 0:ue.itemCount)/y.value.rowLimt)),u.value=po(ue.lstItems,{xx_ord1__qty__c:"1"}),(X=ue.lstItems)!=null&&X.length||(c.value=!0),s.value=!1}catch(se){p.handleError("Failed to fetch Results. Please try again."),s.value=!1,console.info("[ERROR]: Adaptive Search getItems() error = ",se)}}async function F(w){try{l.value=!0;const D=JSON.stringify({lstQLIRequest:q(w),quoteId:e.quoteId});let L=await window.salesforceConnector.createQLI(D);typeof L=="string"&&(L=JSON.parse(L));let $=!1;if((L==null?void 0:L.length)>0&&L.forEach(G=>{G.errorMessage&&($=!0,p.handleError(G.errorMessage))}),l.value=!1,$){g.value=L;const G=g.value.reduce((j,W)=>(j[W.eCatalogItemId]=W.errorMessage,j),{});u.value=u.value.map(j=>({...j,backendError:G[j.Id]||""}));return}return L}catch(D){p.handleError("Failed to add item to Quote. Please try again."),console.info("[ERROR]: addToQuote() error = ",D)}}function q(w){const D=[];for(const L of w)if(!L.addedToQuote&&L.id){const $=Z(L);d.value++,D.push({fields:$,recordId:L.id,...w.length===1?{maxSequenceNumber:d.value}:{}})}return D}function Z(w){const D=[],L=ee();return Object.keys(w).forEach($=>{if(L.includes($)){const G=zu[$.toLowerCase()];G&&D.push({fieldname:G,value:w[$]})}}),D}function ee(){const w=[];return o.value.configuration.columns.forEach(D=>{D.field&&!D.field.includes(".")&&D.isEditable&&D.visible&&w.push(D.field)}),w}function ne(){var D,L;const w=[];return o.value.configuration.columns.forEach($=>{const G=$.field.toLowerCase();w.includes(G)||w.push(G)}),(D=o.value.configuration)!=null&&D.dynamicFilters&&o.value.configuration.dynamicFilters.filters.forEach($=>{const G=$.field.toLowerCase();w.includes(G)||w.push(G)}),(L=o.value.configuration)!=null&&L.cardHeader&&w.push(o.value.configuration.cardHeader.imageField),w}async function Q(){var L;const w=ne(),D=((L=o.value.configuration)==null?void 0:L.saveObjectName)||o.value.configuration.objectName;if(D==="xx_ord1__ecatalog_item__c"){const $=w.indexOf("xx_ord1__qty__c");$>-1&&w.splice($,1)}await e.getFieldsData(w,D),e.fieldsData.xx_ord1__qty__c||e.getFieldsData(["xx_ord1__qty__c"],"xx_ord1__quote_line_item__c")}async function N({searchTerm:w="",filters:D=[]}={}){if(m.value=!0,w&&(f.value=w),D.length&&(h.value=D),await _()){await Q(),m.value=!1;const $=f.value;$&&(f.value=$,await R($,e.dynamicFilters)),console.info("actionStore.isStaticActionCall = ",r.isStaticActionCall),r.isStaticActionCall&&(r.isStaticActionCall=!1,t.chatHistory[t.chatHistory.length-1]={type:"response",message:"Adaptive search is now open. Please search for the products you require and add it quote",loading:!1,links:[{action:"quoteItem",label:"Quote Item"},{action:"quoteDocument",label:"Quote Document"}]})}m.value=!1}return{selectedItem:i,AdaptiveSearchLayout:o,searchText:f,loadingAdaptiveLayout:a,getAdaptiveSearchLayout:_,getItems:R,lstItems:u,rowItemsLoading:s,noSearchRecords:c,dynamicFilters:v,setDynamicFilters:x,createQliErrors:g,addToQuote:F,addingToQuote:l,getFieldsData:Q,pagingData:y,appliedDynamicFilters:h,maxSequenceNumber:d,loadingAdaptiveSearch:m,initAdaptiveSearch:N}}),f5=wt("quickSelection",()=>{const e=Qt(),n=mo(),t=sr(),r=te(null),i=te(!1),o=te([]),a=te([]),s=te(!1),u=te({}),f=te({rowLimit:10,paging:!0,offset:0,currentPage:1,totalPages:1}),c=te(!1);async function v(){i.value=!0;try{const C=JSON.stringify({layoutType:"Quick Selection",layoutObject:"xx_ord1__ecatalog_item__c",...n.objectType?{contextObject:n.objectType}:{}});let S={};S=await window.salesforceConnector.getDynamicPageLayout(C),r.value=qu(S,"Unable to find the Quick Selection Layout for your user profile"),console.info("quickSelectionLayout.value = ",r.value),f.value.rowLimit=r.value.configuration.rowLimit||10,r.value.data.columns.forEach(A=>{!A.field&&A.label==="QTY"&&(A.field="xx_ord1__qty__c")}),i.value=!1}catch(C){i.value=!1,e.handleError("Failed to get Page structure data. Please try again."),console.info("[ERROR]: getAdaptiveSearchLayout() error = ",C)}}function l(){const C=new Map;return r.value.data.columns.forEach(S=>{C.set(S.field,!0)}),r.value.data.searchResultColumns.forEach(S=>{C.set(S.field,!0)}),Array.from(C.keys())}async function h(C){var S,A;try{let I=await window.salesforceConnector.saveCompetitorSKU(C);if(I!=null&&I.errorMessage){e.handleError(I.errorMessage);return}if((S=I[0])!=null&&S.errorMessage){e.handleError((A=I[0])==null?void 0:A.errorMessage);return}return I}catch(I){e.handleError("Failed to Match Item. Please try again."),console.info("[ERROR]: saveCompetitorSKU() error = ",I)}}async function p(C="",S=[]){try{let A=r.value.data,I=r.value.configuration;const B=C.trim();if(console.info("searchTextValue.trim() = ",C.trim()),!B)return[];let O=null;console.info("useMappings = ",c.value),c.value?O=c5(g()):O=g(),console.info("fields before filter = ",O),O=O.filter(F=>F!=="xx_ord1__qty__c"),console.info("fields after filter = ",O);const E={fields:O,...S.length?{dynamicFilters:t.getDynamicFilters(S)}:{},searchText:B,accountId:n.accountId,...n.eCatalogId?{catalogId:n.eCatalogId}:{},...n.objectType==="opportunity"?{opportunityId:n.id}:{},...A!=null&&A.sort?{primarySortBy:A.sort.primary.field,primarySortOrder:A.sort.primary.direction,secondarySortBy:A.sort.secondary.field,secondarySortOrder:A.sort.secondary.direction}:{},rowLimt:(I==null?void 0:I.rowLimit)||20,paging:(I==null?void 0:I.paging)||!1,...f.value.offset!==0?{offset:f.value.offset}:{},objectName:A.objectName,currencyCode:n.currencyCode};console.info("getQuickSelectionItems payload = ",JSON.stringify(E));const k=await window.salesforceConnector.getItems(JSON.stringify(E));if(console.info("getQuickSelectionItems Res = ",JSON.stringify(k)),k!=null&&k.errorMessage){e.handleError(k.errorMessage);return}return k!=null&&k.itemCount&&(f.value.totalPages=Math.ceil((k==null?void 0:k.itemCount)/f.value.rowLimit)),po(k.lstItems,{xx_ord1__qty__c:"1"})}catch(A){e.handleError("Failed to fetch Results. Please try again."),console.info("[ERROR]: getQuickSelectionItems() error = ",A)}}function g(){let C=[];for(const S of r.value.data.columns){let A=S.field;if(A!=null&&A.includes(".")){C.includes(A)||C.push(A);let B=A.split(".")[0];B=B.slice(0,-1)+"c",C.includes(B)||C.push(B)}else C.includes(A)||C.push(A)}return console.info("getAllQuickSelectionFields() fields = ",C),C.filter(S=>S.toLowerCase()!=="xx_ord1__qty__c")}async function d(C,S,A,I){console.info("searchText:",JSON.stringify(C)),console.info("row:",JSON.stringify(S)),console.info("rowIndex:",JSON.stringify(A)),console.info("column:",JSON.stringify(I));const B=A+(f.value.currentPage-1)*f.value.rowLimit;if(I.field.toLowerCase().includes("xx_ord1__item__r")){if(o.value[B].itemLookupLoading=!0,c.value=!0,a.value=await p(C),a.value.length>0){const O=[];for(let E=0;E<a.value.length;E++)o.value[B].itemDataRetrieved=!0,a.value[E].xx_ord1__item__c&&O.push({name:a.value[E]["xx_ord1__item__r.name"],value:a.value[E].xx_ord1__item__c,label:a.value[E][I.field.toLowerCase()]});o.value[B][I.field.toLowerCase()+"_options"]=O}o.value[B].itemLookupLoading=!1}else if(I.field.toLowerCase().includes("xx_ord1__competitor_item__r")){o.value[B].competitorLookupLoading=!0;const O=await m(C);O!=null&&O.items&&(o.value[B][I.field.toLowerCase()+"_options"]=O.items.map(E=>({name:E.fields[2].value,value:E.fields[1].value,label:E.fields[0].value}))),o.value[B].competitorLookupLoading=!1,console.info("getLookupData:: Search Lookup Handler Response = ",O)}}async function m(C){var A,I;console.info("getLookupData() searchText = ",C);const S={searchText:C,obj:"xx_ord1__competitor_item__c",filters:null,displayFields:["xx_ord1__sku__c"]};try{let B=await window.salesforceConnector.getLookupData(JSON.stringify(S));if(typeof B=="string"&&(B=JSON.parse(B)),B!=null&&B.errorMessage){e.handleError(B.errorMessage);return}if((A=B[0])!=null&&A.errorMessage){e.handleError((I=B[0])==null?void 0:I.errorMessage);return}return B}catch(B){e.handleError("Failed to Search For Item. Please try again."),console.info("[ERROR]: getLookupData() error = ",B)}}async function y(C,S){var I;console.info("Update Other Fields Value = ",C),console.info("Update Other Fields Row Index = ",S);const A=S+(f.value.currentPage-1)*f.value.rowLimit;console.info("actualRowIndex = ",A);try{if(C){const B=a.value.filter(O=>O.xx_ord1__item__c===C)[0];if(B){s.value=!0;const O=r.value.data.columns[1].field;o.value[A][O]&&await _(B,A),(I=o.value[A])!=null&&I.itemDataRetrieved&&(o.value[A].status="New Match Requested",o.value[A].noMatchCleared=!0),Object.keys(B).forEach(E=>{const k=zu[E.toLowerCase()];console.info("Mapped Key = ",k),k&&(o.value[A][k]=B[E])}),s.value=!1}else o.value[A].status=""}else o.value[A].status="No Match"}catch(B){e.handleError("Unable to request a match for this item please try again."),console.info("Error in updateOtherFields = ",B)}}async function _(C,S){const A=o.value[S],I=r.value.data.columns[1].field,B=[{sku:A[I],name:A[I],productDescription:A.xx_ord1__line_description__c||"",productURL:null,status:"Match Requested",competitorAccountId:null,itemId:C.xx_ord1__item__c}];let O=await h(JSON.stringify(B));console.info("Match Item: ",JSON.stringify(O)),o.value[S][`${I}_options`]=[{value:O[0].competitorItemId,label:O[0].sku}],o.value[S][I]=O[0].competitorItemId}async function x(C){try{let S=await window.salesforceConnector.createQLI(JSON.stringify(C));typeof S=="string"&&(S=JSON.parse(S));let A=!1;if((S==null?void 0:S.length)>0)for(let I=0;I<S.length;I++)S[I].errorMessage&&(A=!0,S[I].errorMessage.includes("Line Description: data value too large")&&(S[I].errorMessage="Error: The description is too long—it must be under 200 characters."));if(A){S.forEach(I=>{u.value[I.eCatalogItemId]=I});return}else u.value=[];return S}catch(S){e.handleError("Failed to add item to Quote. Please try again."),console.info("[ERROR]: addAllItemsToQuote() error = ",S)}}return{quickSelectionLayout:r,quickSelectionLayoutLoading:i,processedRecords:o,useMappings:c,currentSearchData:a,createQliErrors:u,getQuickSelectionLayout:v,getAllFieldsForQuickSelectionLayout:l,saveCompetitorSKU:h,getQuickSelectionItems:p,searchLookupHandler:d,updateOtherFields:y,addAllItemsToQuote:x}}),d5="Preparing Your Quote Please Wait...",h5={message:"Your quote is ready! Begin adding products to complete it.",type:"response",requestId:"no-request-id"},p5=18e4,go=wt("ai",()=>{const e=mo(),n=sr(),t=Ku(),r=f5(),i=dn(),o=l5(),a=te(""),s=te(""),u=te([]),f=te(""),c=te([]),v=te(!1),l=te(null),h=fi(),p=te({}),g=te(null),d=te(null),m=te(null),y=te(null),_=te(null),x=te(d5),C=te([]),S=me(()=>e.orgId+"__"+e.user.Id+"__"+n.quoteId),A=me(()=>l.value.readyState==WebSocket.OPEN),I=()=>{p.value={salesforceOrgId:e.orgId,salesforceOrgType:e.orgType,salesforceUserId:e.user.Id,userType:"Salesforce",chatRoomId:S.value,requestId:"",prompt:"",initiatedFrom:e.origin||"Quote",internalCall:!1,contextObjectId:n.quoteId,contextObjectType:"Quote",payload:{lineItemsCount:n.lineItemsCount},origin:"Genesis AI",defaultBatchSize:10,actionType:"",packageVersion:e.packageVersion,relatedIds:{eCatalogId:e.eCatalogId,accountId:e.accountId}}};async function B(){const H=s.value+"?chatRoomId="+S.value;l.value=new WebSocket(H),l.value.addEventListener("open",O),l.value.addEventListener("message",R),l.value.addEventListener("close",E),l.value.addEventListener("error",k)}const O=()=>{F(),ee()},E=()=>{q()},k=()=>{$(),q()},R=H=>{var K,J;F();const V=JSON.parse(H.data);if(V.status!=="ALIVE"){if(V.loading){x.value=V.message;return}else Array.isArray(V.messages)?(x.value=null,u.value.push(h5),V.messages.length>0&&w(V.messages)):V.agentResponse&&(V.errorMessage&&(V.agentResponse.content=V.errorMessage,V.agentResponse.error=!0),x.value=null,u.value.push({message:V.agentResponse.content,type:V.agentResponse.role,requestId:V.requestId,epoch:V.agentResponse.epoch,error:V.agentResponse.error,isDML:V.agentResponse.isDML,...(K=V.agentResponse)!=null&&K.filesData?{filesData:(J=V.agentResponse)==null?void 0:J.filesData}:{}}));C.value=V.links||[],j(V)}},F=()=>{q(),g.value=setTimeout(()=>{if(A.value){const H={action:"heartbeat"};l.value.send(JSON.stringify(H)),F()}},p5)},q=()=>{g.value&&(clearInterval(g.value),g.value=null)};function Z(H){const V={...p.value};V.requestType="Action",V.actionType="Undo",V.undoRequestId=H,V.requestId=ar(),N(V)}function ee(){const H={...p.value};H.requestType="Action",H.actionType="History",H.requestId=ar(),N(H)}function ne(H){return o.path.startsWith("/configurator")&&i.isChangedConfiguration?(y.value={save:()=>{i.maintainQuoteConfiguration()}},a.value=H,!0):(a.value="",!1)}function Q(H,V=!0,K=null){if(!ne(H)&&H.trim()){let J={...p.value};J.prompt=H.trim(),J.requestType="Chat",J.requestId=ar(),J.internalCall=!1,J.payload=D(),J.componentName=L.value,J.templateId=n.templateId,J.payload.lineItemsCount=n.lineItemsCount,K&&(J={...J,...K}),G(),V&&u.value.push({message:H.trim(),type:"user",..._.value&&{fileData:[_.value]},requestId:J.requestId}),N(J),F()}}function N(H){const V={action:"prompt",data:H};l.value.send(JSON.stringify(V))}const w=H=>{const V=H.filter(({content:K})=>!!K).map(K=>({message:K.content,type:K.role,requestId:K.requestId,epoch:K.epoch,isDML:K.isDML,undone:K.undone}));V.forEach((K,J)=>{K.isDML===!0&&J!==V.length-1&&(K.isDML=!1)}),u.value=[...u.value,...V]};function D(){return o.path==="/quote-item"?n.getPayload():{}}const L=me(()=>o.path==="/quote-item"?"QuoteItem":""),$=()=>{u.value.push({type:"response",message:"Oops! Something went wrong while processing your request. Please try again later.",error:!0})},G=()=>{u.value=u.value.map(H=>({...H,links:[]}))};function j(H){var J,P,X;const V=((J=H==null?void 0:H.redirectObjects)==null?void 0:J.componentName)||(H==null?void 0:H.componentName),K=(H==null?void 0:H.redirectObjects)||{};if(V==="AdaptiveSearch"){const se=(P=H==null?void 0:H.payload)==null?void 0:P.searchTerm,fe=(X=H==null?void 0:H.payload)==null?void 0:X.applyFilters;se&&se!==t.searchText&&t.initAdaptiveSearch({searchTerm:se,filters:fe}),h.push("/adaptive-search")}else V==="Configurator"?h.push(`/configurator/${K.itemId}/${K.qliId}`):V==="QuoteReview"?h.push("/quote-item"):V==="QuoteItem"||V==="QuoteList"?(h.push("/quote-item"),n.performAIAction(H)):V==="QuickSelection"&&(r.quickSelectionLayout=H.payload,console.info("Loading QuickSelection data = ",JSON.stringify(r.quickSelectionLayout)),h.push("/match-records"))}function W(){if(A.value){const H={action:"cancel",data:{requestId:p.value.requestId,chatRoomId:S.value}};l.value.send(JSON.stringify(H))}}const M=()=>{d.value&&(clearInterval(d.value),d.value=null),g.value&&(clearInterval(g.value),g.value=null),m.value&&(clearTimeout(m.value),m.value=null)};return Zi(()=>{M()}),{unsavedChanges:y,loadingMessage:x,promptMessage:a,buttonLinks:C,websocketUrl:s,chatHistory:u,latestDMLRequest:f,strikethroughHistory:c,attachmentData:_,dataManuallyChanged:v,undoAction:Z,connectSocket:B,sendMessage:Q,setInitialPayload:I,cancelRequest:W}}),mo=wt("comRoot",()=>{const e=go(),n=Qt(),t=sr(),r=te(""),i=te(""),o=te("Genesis AI"),a=te(""),s=te({}),u=te(""),f=te(""),c=te(""),v=te(""),l=te({}),h=te(""),p=te(""),g=te(""),d=te(""),m=te(""),y=te(""),_=te(""),x=te("Single"),C=te("closed"),S=me(()=>t.quoteName),A=me(()=>x.value==="Single");async function I(k){r.value=k||Pu("id"),i.value=Pu("origin"),await O(),await B()}async function B(){try{console.info("getRecordInfo",r.value);let k=await window.salesforceConnector.getRecordInfo(r.value);return k=St(k),k!==void 0&&(l.value=k,h.value=k.name,p.value=k.objectType,g.value=k.accountId,d.value=k.eCatalogId,m.value=k.currencyCode,y.value=k.userLocale,_.value=k.opportunityId),(k==null?void 0:k.objectType)==="XX_ORD1__Quote__c"?(t.quoteId=k==null?void 0:k.recordId,t.templateId=k==null?void 0:k.templateId,t.quoteName=k==null?void 0:k.name,t.lineItemsCount=(k==null?void 0:k.lineItemsCount)||0):(k==null?void 0:k.objectType)==="Opportunity"&&await t.getPrimaryQuote(k.recordId),k}catch(k){n.handleError(k.message)}}async function O(){var R,F;console.info("getOrgInformation",r.value);const k=await window.salesforceConnector.getOrgInformation();e.websocketUrl=k.websocketUrl,a.value=(R=k.locale)==null?void 0:R.replace("_","-"),s.value=k.user,u.value=k.orgName,f.value=k.orgId,c.value=k.orgType,v.value=k.packageVersion,x.value=(F=k==null?void 0:k.pricingSchema)==null?void 0:F.toLowerCase()}function E(k){o.value=k,C2(k)}return{id:r,origin:i,title:S,subTitle:o,locale:a,user:s,orgName:u,orgId:f,orgType:c,packageVersion:v,objectType:p,recordInfo:l,name:h,accountId:g,eCatalogId:d,currencyCode:m,userLocale:y,opportunityId:_,pricingSchema:x,isSinglePricingSchema:A,flyoutState:C,start:I,getRecordInfo:B,setSubTitle:E}}),v5="XX_ORD1__Quote__c",g5="xxord1salespricec",yo="xx_ord1__item__c",m5="xxord1productnrcc",y5=wt("cartStore",()=>{const e=sr(),n=Ku(),t=Qt(),r=te(""),i=te("$0"),o=te("$0"),a=te(null),s=te({}),u=te({}),f=te({}),c=te(""),v=te(""),l=te({}),h=te(""),p=te(""),g=te({});async function d(){S()}async function m(){try{let B=await window.salesforceConnector.getProductCount(e.quoteId);if(B=St(B),B!=null&&B.errorMessage){t.handleError(B.errorMessage);return}return r.value=B,B}catch{t.handleError("Failed to get Product Count. Please try again.")}}async function y(){try{let B=await window.salesforceConnector.getQuoteTotal(e.quoteId);if(B=St(B),B!=null&&B.errorMessage){t.handleError(B.errorMessage);return}return o.value=B.monthlyTotal,i.value=B.onetimeTotal,B}catch{t.handleError("Failed to get Total Amount. Please try again.")}}async function _(B,O,E,k=""){if(!e.sectionDataMap.get(E).parentQLIs[O].removingItem){e.sectionDataMap.get(E).parentQLIs[O].removingItem=!0,p.value=B.id,await x(B.id)==="Success"&&(e.fetchAllQuoteLineItems(),k&&k(B,O,E));let F=e.sectionDataMap.get(E).parentQLIs.filter(q=>q[yo]===B[yo]).length;p.value="",n.lstItems.forEach(q=>{q[yo]===B[yo]&&(q.addedToQuote===!0&&(q.addedToQuote=!1),F===0&&(q.removedFromQuote=!0))})}}async function x(B){try{let O=await window.salesforceConnector.deleteQLI(B);if(O!=null&&O.errorMessage){t.handleError(O.errorMessage);return}return m(),y(),O}catch{t.handleError("Failed to remove Quote Item. Please try again.")}}function C(B){var k,R;const O=(k=B==null?void 0:B[m5])==null?void 0:k.match(/\.\d+/);O&&(O.value=O[0].length-1);const E=(R=B==null?void 0:B[g5])==null?void 0:R.match(/\.\d+/);return E&&(E.value=E[0].length-1),O||E}function S(B=!0){m(),y(),B&&e.fetchTemplates(v5).then(()=>{e.getFilteredListWithFields()})}function A(B){const O=e.sectionDataMap;for(const[,E]of O.entries())E.parentQLIs.forEach(k=>{k.id===B.id&&(E.columns.forEach(R=>{if(R.dataType==="CURRENCY"){const F=R.field.replace(/_/g,"");k[F]=I(k[F],B[R.field])}}),B!=null&&B.billingPeriodValue&&(B!=null&&B.formattedBillingPeriodValue)&&(k.formattedBillingPeriodValue=I(k.formattedBillingPeriodValue,B.billingPeriodValue)),B!=null&&B.oneTimeValue&&(B!=null&&B.formattedOneTimeValue)&&(k.formattedOneTimeValue=I(k.formattedOneTimeValue,B.oneTimeValue)))})}function I(B,O){const E=Number(O);if(isNaN(E))return B;const k=B.match(/(\d[\d,]*)(\.\d+)?/);if(!k)return B;const R=k[2]||"",F=R.length?R.length-1:0,q=E.toLocaleString("en-US",{minimumFractionDigits:F,maximumFractionDigits:F});return B.replace(k[1]+R,q)}return{initializeCart:d,loadCartState:S,productCount:r,onetimeTotal:i,monthlyTotal:o,filterCartItem:a,billingPeriodValue:c,hasOneTimeValue:v,hasBillingPeriodInList:s,oneTimeFieldAvailable:u,billingPeriodFieldAvailable:f,priceDecimalPrecision:l,cartItemUpdatingId:h,removingItemLoaderId:p,cartItemColumnsMap:g,getProductCount:m,getQuoteTotal:y,removeItem:_,removeQuoteItem:x,getDecimalPrecisionFromSalesPriceOrNRC:C,updateFormattedValues:A,formateCurrencyValue:I}}),x5=e=>[{title:"Apply Discount",subOptions:[...e.map(n=>`Apply Discount on ${n} for `),"Show Maximum discount allowed","Apply Maximum Discount Allowed",...e.map(n=>`Apply Discount on ${n} for a specific total`)]},{title:"Update Fields",subOptions:["Update the price of","Update the quantity of","Update the term start date to","Update the term end date to","Update the line description for"]},{title:"Price Ramp",subOptions:["Add a price ramp for"]}],_5={salesforceUserLocale:"en_US",chatRoomId:"00DA0000000cDUJMA2__0052G00000AHBNAQA5__a0jKb000004VSaMIAW",status:"SUCCESS",statusCode:200,requestId:"9b1d1f0a9f07aa6cdc",errorMessage:"",payload:{uiModification:{addColumn:[],removeColumn:[],filter:[],groupBy:[{sectionName:"MRC $50 and Above",filters:[{datatype:"currency",field:"XX_ORD1__MRC__c",operator:"greater or equal",value:"50"}],tableId:"4vIEgoK5CbSPrLYPbq"},{sectionName:"MRC Below $50",filters:[{datatype:"currency",field:"XX_ORD1__MRC__c",operator:"less than",value:"50"}],tableId:"BlOPCp7eLBCZ84nDT2"}],showOptions:!0}},agentResponse:{role:"agent",requestId:"9b1d1f0a9f07aa6cdc",content:"Grouped the quote items into two sections: one for MRC $50 and above, and another for MRC below $50.",error:!1,epoch:1759936160464,isDML:!1},redirectObjects:{qliId:"",itemId:"",componentName:"QuoteItem"},actionFunction:"Reload",links:[{action:"quoteDocument",label:"Quote Document"},{action:"addProducts",label:"Add Products"}]},b5=[{label:"Line Description",field:"xx_ord1__line_description__c",isEditable:!0,dataType:"STRING"},{label:"QTY",field:"xx_ord1__qty__c",isEditable:!0,dataType:"DOUBLE"},{label:"Extended Price",field:"xx_ord1__extended_price__c",isEditable:!1,dataType:"CURRENCY"},{label:"Billing Period",field:"xx_ord1__billing_period__c",isEditable:!0,dataType:"PICKLIST",picklistValues:["Monthly","Quarterly","Yearly"]}],sr=wt("quote",()=>{const e=Qt(),n=y5(),t=mo(),r=te(""),i=te(""),o=te(0),a=te(""),s=te([]),u=te({template:!0,filteredList:!1}),f=te(null),c=te(new Map),v=te({}),l=te(!1),h=te(!0),p=te(!1),g=te({text:"Hide Options",altText:"Show Options",handler:()=>{h.value=!h.value,I()},color:"#136E05",isActive:!1}),d=me(()=>{const N=Array.from(c.value.values()).map(w=>w.sectionName);return x5(N)});Ye(a,()=>{u.value.template||A()});function m(){const N=new Map,w=[];for(const[L,$]of c.value.entries())N.set(L,$.selected),w.push($);const D=JSON.parse(JSON.stringify(w));return D.forEach(L=>{delete L.selected;const $=new Map,G=[];L.lineItems.forEach(j=>{j.Selected=N.get(L.tableId).get(j.id)||!1,j.xx_ord1__parent_qli__c?($.has(j.xx_ord1__parent_qli__c)||$.set(j.xx_ord1__parent_qli__c,[]),$.get(j.xx_ord1__parent_qli__c).push(j)):G.push(j)}),L.lineItems=G.map(j=>({...j,options:$.get(j.id)||[]})),delete L.loading,delete L.parentQLIs,delete L.totalValues}),{showOptions:h.value,sections:D,templateId:a.value}}async function y(N){try{let w=await window.salesforceConnector.getPrimaryQuote(N);w=St(w),w!==void 0&&(console.info("getPrimaryQuote",JSON.stringify(w)),r.value=w.recordId,console.info("quoteId",r.value),i.value=w.name,a.value=w==null?void 0:w.templateId,o.value=(w==null?void 0:w.lineItemsCount)||0)}catch(w){e.handleError(w.message),console.info("[ERROR]: getPrimaryQuote() error = ",w)}}async function _(N){var w,D;try{u.value.template=!0;let L=await window.salesforceConnector.fetchContentTemplates(JSON.stringify({lstObjectName:[N],templateType:"Document",templateId:null,fetchOnlyDefault:!1}));L=St(L);const $=L==null?void 0:L.templates[N];return a.value||(a.value=(w=$.find(G=>G.XX_ORD1__Default__c))==null?void 0:w.Id),a.value||(a.value=(D=$[0])==null?void 0:D.Id),s.value=$,u.value.template=!1,s.value}catch(L){e.handleError(L.message),console.info("[ERROR]: fetchTemplates() error = ",L)}}function x(N){if(!N)return null;const w=/\{!\$(\w+):([\w.]+)\}/,D=N.match(w);return D?{function:D[1],apiname:D[2].split(".")[1]}:null}async function C(N){try{const w={Id:r.value,XX_ORD1__Document_Template__c:N};return await window.salesforceConnector.updateQuote(JSON.stringify([w]))}catch(w){e.handleError(w.message),console.info("[ERROR]: updateQuote() error = ",w)}}async function S(){try{u.value.filteredList=!0;let N=await window.salesforceConnector.getQuoteEPageLayout();c.value.clear(),n.cartItemColumnsMap={},N=St(N);const w=N.map(L=>({label:L.fieldLabel,field:L.fieldName.toLowerCase(),isEditable:L.isEditable,dataType:L.dataType,...L.picklistValues?{picklistValues:L.picklistValues}:{}})),D=ar();return c.value.set(D,{loading:!0,lineItems:[],parentQLIs:[],columns:w,tableId:D,sectionName:"All Rows",selected:new Map,filters:[],primarysort:"XX_ORD1__Sequence__c",primarysortdesc:""}),n.cartItemColumnsMap[D]=w,g.value.isActive=!1,h.value=!0,f.value={lstCB:[{columns:w,footer:null,title:"All Rows",sectionName:"All Rows",tableId:D,filters:[],primarysort:"XX_ORD1__Sequence__c",primarysortdesc:""}]},I(),u.value.filteredList=!1,N}catch(N){e.handleError(N.message),console.info("[ERROR]: getQuoteEPageLayout() error = ",N)}}async function A(){if(s.value.length===0){S();return}try{u.value.filteredList=!0;let N=await window.salesforceConnector.getFilteredListWithFields(JSON.stringify({templateId:a.value}));C(a.value),N=St(N),console.info("res.lstCB = ",N.lstCB);const w=N==null?void 0:N.objectFieldsMap;return c.value.clear(),n.cartItemColumnsMap={},N.lstCB=N.lstCB.map(D=>{const{fields:L,filters:$,primarysort:G,primarysortdesc:j}=JSON.parse(D.XX_ORD1__Block_Properties__c),W=L.map(H=>{var V;return{label:(V=w[H.api])==null?void 0:V.label,field:H.api.toLowerCase(),isEditable:H.api.includes(".")?!1:w[H.api].isEditable,dataType:w[H.api].dataType,...w[H.api].picklistValues?{picklistValues:w[H.api].picklistValues}:{}}}),M=D.Id||ar();return c.value.set(M,{loading:!0,lineItems:[],parentQLIs:[],columns:W,tableId:M,sectionName:D.Name,selected:new Map,footer:x(D.XX_ORD1__Table_Footer_HTML__c),filters:$,primarysort:G,primarysortdesc:j}),n.cartItemColumnsMap[M]=W,g.value.isActive=!1,h.value=!0,{columns:W,footer:x(D.XX_ORD1__Table_Footer_HTML__c),title:D.Name,sectionName:D.Name,tableId:M,filters:$,primarysort:G,primarysortdesc:j}}),f.value=N,I(),u.value.filteredList=!1,N}catch(N){e.handleError(N.message),console.info("[ERROR]: getFilteredListWithFields() error = ",N)}}async function I(N=!0){const w=[];for(const[D]of c.value)w.push(E(D,N));return await Promise.all(w),n.getProductCount(),!0}function B(N,w){return c.value.get(N).columns.some(D=>D.field.toLowerCase()===w)||n.cartItemColumnsMap[N].some(D=>D.field.toLowerCase()===w)}function O(N,w){let D=po(N);const L=t.pricingSchema,$=B(w,"xx_ord1__nrc__c"),G=B(w,"xx_ord1__sales_price__c"),j=B(w,"xx_ord1__qty__c");return D=D.map(W=>{let M={};L==="nrc/mrc"&&(W!=null&&W.xx_ord1__billing_period__c)?M={...G?{billingPeriodValue:(W==null?void 0:W.xx_ord1__sales_price__c)===0?"0":(W==null?void 0:W.xx_ord1__sales_price__c)||null,formattedBillingPeriodValue:W==null?void 0:W.xxord1salespricec}:{},...$?{oneTimeValue:(W==null?void 0:W.xx_ord1__nrc__c)===0?"0":(W==null?void 0:W.xx_ord1__nrc__c)||null,formattedOneTimeValue:W==null?void 0:W.xxord1nrcc}:{}}:L==="nrc/mrc"&&!(W!=null&&W.xx_ord1__billing_period__c)?G&&(M={oneTimeValue:(W==null?void 0:W.xx_ord1__sales_price__c)===0?"0":(W==null?void 0:W.xx_ord1__sales_price__c)||null,formattedOneTimeValue:W==null?void 0:W.xxord1salespricec}):L!=="nrc/mrc"&&(W!=null&&W.xx_ord1__billing_period__c)?G&&(M={billingPeriodValue:(W==null?void 0:W.xx_ord1__sales_price__c)===0?"0":(W==null?void 0:W.xx_ord1__sales_price__c)||null,formattedBillingPeriodValue:W==null?void 0:W.xxord1salespricec}):L!=="nrc/mrc"&&!(W!=null&&W.xx_ord1__billing_period__c)&&G&&(M={oneTimeValue:(W==null?void 0:W.xx_ord1__sales_price__c)===0?0:(W==null?void 0:W.xx_ord1__sales_price__c)||null,formattedOneTimeValue:W==null?void 0:W.xxord1salespricec});const{xx_ord1__qty__c:H,xx_ord1__sales_price__c:V,xx_ord1__nrc__c:K,...J}=W,P={...J,id:W.id,description:(W==null?void 0:W.xx_ord1__line_description__c)||"",xx_ord1__billing_period__c:W==null?void 0:W.xx_ord1__billing_period__c,...j?{xx_ord1__qty__c:H}:{},xx_ord1__item__c:W==null?void 0:W.xx_ord1__item__c,"xx_ord1__item__r.xx_ord1__decimal_precision__c":W["xx_ord1__item__r.xx_ord1__decimal_precision__c"]||"0",...M};return P!=null&&P.billingPeriodValue&&(n.hasBillingPeriodInList[w]=!0,n.billingPeriodValue=P==null?void 0:P.xx_ord1__billing_period__c),"oneTimeValue"in P&&(n.oneTimeFieldAvailable[w]=!0),"billingPeriodValue"in P&&(n.billingPeriodFieldAvailable[w]=!0),(P==null?void 0:P.oneTimeValue)!==""&&(P==null?void 0:P.oneTimeValue)!==null&&(n.hasOneTimeValue=!0),P}),D}async function E(N,w=!0){var D,L;try{const $=c.value.get(N);if(console.info("sectionData = ",$.sectionName),!$)return;$.loading=w,w&&($.lineItems=[]);const{columns:G,filters:j,primarysort:W,primarysortdesc:M,footer:H}=$,V=G.map(ue=>ue.field.toLowerCase());V.includes("xx_ord1__parent_qli__c")||V.push("xx_ord1__parent_qli__c"),V.includes("xx_ord1__item__c")||V.push("xx_ord1__item__c"),V.includes("xx_ord1__sys_configuration_status2__c")||V.push("xx_ord1__sys_configuration_status2__c"),(D=n.cartItemColumnsMap[N])==null||D.forEach(ue=>{V.includes(ue.field)||V.push(ue.field)});const K=await k({fields:V,recordId:r.value,filters:j||[],primarySortBy:W||"",primarySortOrder:M?"DESC":"ASC",includeOptions:h.value,totalFields:H?[H.apiname]:[]}),J=K.lineItems,P=new Map;let X=[];const se=(L=K.fieldTotals)==null?void 0:L.map(ue=>ue.totalValue);J.forEach(ue=>{ue.XX_ORD1__Parent_QLI__c?P.has(ue.XX_ORD1__Parent_QLI__c)?P.get(ue.XX_ORD1__Parent_QLI__c).push(ue):P.set(ue.XX_ORD1__Parent_QLI__c,[ue]):X.push(ue)});const fe=[];return X.forEach(ue=>{fe.push(ue),P.has(ue.Id)&&fe.push(...P.get(ue.Id))}),X=O(X,N),$.lineItems=po(fe),$.parentQLIs=X,$.totalValues=se,$.loading=!1,c.value=new Map(c.value),fe}catch($){console.info("[ERROR]: fetchQuoteLineItems()123 error = ",$.message);const G=c.value.get(N);G&&(G.loading=!1)}}async function k(N){try{let w=await window.salesforceConnector.getQuoteLineItemsWithFilteredTable(JSON.stringify(N));return w=St(w),w}catch(w){e.handleError(w.message),console.info("[ERROR]: getQuoteLineItemsWithFilteredTable() error = ",w)}}async function R(N){try{console.info("updateQli() payload = ",N);let w=await window.salesforceConnector.updateQli(JSON.stringify(N));return w=St(w),I(!1),w}catch(w){e.handleError(w.message),console.info("[ERROR]: updateQli() error = ",w)}}async function F(N){try{let w=await window.salesforceConnector.deleteQLI(N);return w=St(w),I(),w}catch(w){e.handleError(w.message),console.info("[ERROR]: deleteQLI() error = ",w)}}async function q(N,w){try{l.value=!0;const D={fields:N};w&&(D.objectName=w),N.includes("xx_ord1__qty__c")&&w==="xx_ord1__ecatalog_item__c"&&(D.fields=D.fields.filter($=>$!=="xx_ord1__qty__c")),N.includes("xx_ord1__sales_price__c")&&w!=="xx_ord1__quote_line_item__c"&&(D.fields=D.fields.filter($=>$!=="xx_ord1__sales_price__c"));let L=await window.salesforceConnector.getFieldsData(JSON.stringify(D));return typeof L=="string"&&(L=JSON.parse(L)),L!=null&&L.errorMessage?(e.handleError(L.errorMessage),null):(v.value={...v.value,...L},console.info("fieldsData.value = ",JSON.stringify(v.value)),L)}catch(D){return e.handleError("Failed to get Fields Data. Please try again."),console.info("[ERROR]: getFieldsData() error = ",D),null}finally{l.value=!1}}function Z(N=""){var w;return!N||N.includes(".")?!1:N.includes("xx_ord1__qty__c")?!0:((w=v.value[N])==null?void 0:w.isEditable)||!1}function ee(){ne(_5)}async function ne(N){var w,D,L,$,G,j,W,M,H;if(N.payload){if((w=N.payload)!=null&&w.uiModification){const V=N.payload.uiModification;if(((D=V.addColumn)==null?void 0:D.length)>0)if(V.addColumn.forEach(K=>{K.columns.forEach(J=>{J.field=J.field.toLowerCase()})}),V.addColumn[0].sectionName==="all_section")for(const[K,J]of c.value)J.columns=[...J.columns,...V.addColumn[0].columns];else V.addColumn.forEach(K=>{c.value.get(K.tableId)&&(c.value.get(K.tableId).columns=[...c.value.get(K.tableId).columns,...K.columns])});if(((L=V.removeColumn)==null?void 0:L.length)>0)if(V.removeColumn.forEach(K=>{K.columns=K.columns.map(J=>J.toLowerCase())}),V.removeColumn[0].sectionName==="all_section")for(const[K,J]of c.value)J.columns=J.columns.filter(P=>!V.removeColumn[0].columns.includes(P.field));else V.removeColumn.forEach(K=>{c.value.get(K.tableId)&&(c.value.get(K.tableId).columns=c.value.get(K.tableId).columns.filter(J=>!K.columns.includes(J.field)))});if((($=V.filter)==null?void 0:$.length)>0)if(V.filter[0].sectionName==="all_section")for(const[K,J]of c.value)J.filters=[...J.filters,...V.filter[0].filters];else V.filter.forEach(K=>{c.value.get(K.tableId)&&(c.value.get(K.tableId).filters=[...c.value.get(K.tableId).filters,...K.filters])});if(((G=V.groupBy)==null?void 0:G.length)>0){const K=((j=[...c.value.values()][0])==null?void 0:j.columns)||b5;c.value.clear(),n.cartItemColumnsMap={},V.groupBy.forEach(J=>{n.cartItemColumnsMap[J.tableId]=J.columns||K,c.value.set(J.tableId,{loading:!0,lineItems:[],parentQLIs:[],columns:J.columns||K,tableId:J.tableId,sectionName:J.sectionName,selected:new Map,footer:x(J.footer),filters:J.filters,primarysort:J.primarysort,primarysortdesc:J.primarysortdesc})})}V.showOptions!==void 0&&(h.value=V.showOptions)}if(((M=(W=N.payload)==null?void 0:W.sections)==null?void 0:M.length)>0){const V=(H=N.payload)==null?void 0:H.sections;c.value.clear(),V.forEach(K=>{K.tableId||(K.tableId=ar()),K.selected=new Map,c.value.set(K.tableId,K)}),I()}}N.actionFunction==="Reload"&&(I(),console.info("Reloading quote line items"))}async function Q(N){var w,D;try{const L=new Set;for(const $ of c.value.keys())(w=c.value.get($).lineItems)==null||w.forEach(j=>{j.attributes=null,L.add(j.id)});if(N){const $={lineItemIds:[...L]},G=await window.productManagerController.getLineItemAttributes({request:JSON.stringify($)}),j=JSON.parse(G.data);for(const W of c.value.keys())(D=c.value.get(W).lineItems)==null||D.forEach(H=>{H.attributes=j[H.id]||null})}}catch(L){console.info("[ERROR]: fetchAttributesData() error = ",L)}}return{showAttributes:p,quoteId:r,quoteName:i,templateId:a,templateOptions:s,loading:u,currentTemplateData:f,fieldsData:v,fieldsDataLoading:l,showOptionHeaderButton:g,sectionDataMap:c,promptSuggestions:d,lineItemsCount:o,addColumns:ee,getQuoteEPageLayout:S,getPayload:m,getPrimaryQuote:y,fetchTemplates:_,getFilteredListWithFields:A,getQuoteLineItemsWithFilteredTable:k,updateQli:R,getFieldsData:q,deleteQLI:F,performAIAction:ne,isEditableField:Z,fetchQuoteLineItems:E,fetchAllQuoteLineItems:I,fetchAttributesData:Q}});function Xu(e,n){return function(){return e.apply(n,arguments)}}const{toString:C5}=Object.prototype,{getPrototypeOf:Za}=Object,{iterator:xo,toStringTag:Wu}=Symbol,_o=(e=>n=>{const t=C5.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Zt=e=>(e=e.toLowerCase(),n=>_o(n)===e),bo=e=>n=>typeof n===e,{isArray:Fr}=Array,Nr=bo("undefined");function di(e){return e!==null&&!Nr(e)&&e.constructor!==null&&!Nr(e.constructor)&&It(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Gu=Zt("ArrayBuffer");function w5(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&Gu(e.buffer),n}const E5=bo("string"),It=bo("function"),Qu=bo("number"),hi=e=>e!==null&&typeof e=="object",A5=e=>e===!0||e===!1,Co=e=>{if(_o(e)!=="object")return!1;const n=Za(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Wu in e)&&!(xo in e)},k5=e=>{if(!hi(e)||di(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},O5=Zt("Date"),S5=Zt("File"),I5=Zt("Blob"),T5=Zt("FileList"),B5=e=>hi(e)&&It(e.pipe),D5=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||It(e.append)&&((n=_o(e))==="formdata"||n==="object"&&It(e.toString)&&e.toString()==="[object FormData]"))},R5=Zt("URLSearchParams"),[L5,F5,N5,P5]=["ReadableStream","Request","Response","Headers"].map(Zt),M5=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pi(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Fr(e))for(r=0,i=e.length;r<i;r++)n.call(null,e[r],r,e);else{if(di(e))return;const o=t?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],n.call(null,e[s],s,e)}}function Zu(e,n){if(di(e))return null;n=n.toLowerCase();const t=Object.keys(e);let r=t.length,i;for(;r-- >0;)if(i=t[r],n===i.toLowerCase())return i;return null}const lr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ju=e=>!Nr(e)&&e!==lr;function Ja(){const{caseless:e,skipUndefined:n}=Ju(this)&&this||{},t={},r=(i,o)=>{const a=e&&Zu(t,o)||o;Co(t[a])&&Co(i)?t[a]=Ja(t[a],i):Co(i)?t[a]=Ja({},i):Fr(i)?t[a]=i.slice():(!n||!Nr(i))&&(t[a]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&pi(arguments[i],r);return t}const q5=(e,n,t,{allOwnKeys:r}={})=>(pi(n,(i,o)=>{t&&It(i)?e[o]=Xu(i,t):e[o]=i},{allOwnKeys:r}),e),$5=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),j5=(e,n,t,r)=>{e.prototype=Object.create(n.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),t&&Object.assign(e.prototype,t)},H5=(e,n,t,r)=>{let i,o,a;const s={};if(n=n||{},e==null)return n;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,n))&&!s[a]&&(n[a]=e[a],s[a]=!0);e=t!==!1&&Za(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},V5=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const r=e.indexOf(n,t);return r!==-1&&r===t},U5=e=>{if(!e)return null;if(Fr(e))return e;let n=e.length;if(!Qu(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},z5=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Za(Uint8Array)),K5=(e,n)=>{const r=(e&&e[xo]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;n.call(e,o[0],o[1])}},X5=(e,n)=>{let t;const r=[];for(;(t=e.exec(n))!==null;)r.push(t);return r},W5=Zt("HTMLFormElement"),G5=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,i){return r.toUpperCase()+i}),Yu=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),Q5=Zt("RegExp"),e0=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),r={};pi(t,(i,o)=>{let a;(a=n(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},Z5=e=>{e0(e,(n,t)=>{if(It(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=e[t];if(It(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},J5=(e,n)=>{const t={},r=i=>{i.forEach(o=>{t[o]=!0})};return Fr(e)?r(e):r(String(e).split(n)),t},Y5=()=>{},e9=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function t9(e){return!!(e&&It(e.append)&&e[Wu]==="FormData"&&e[xo])}const n9=e=>{const n=new Array(10),t=(r,i)=>{if(hi(r)){if(n.indexOf(r)>=0)return;if(di(r))return r;if(!("toJSON"in r)){n[i]=r;const o=Fr(r)?[]:{};return pi(r,(a,s)=>{const u=t(a,i+1);!Nr(u)&&(o[s]=u)}),n[i]=void 0,o}}return r};return t(e,0)},r9=Zt("AsyncFunction"),i9=e=>e&&(hi(e)||It(e))&&It(e.then)&&It(e.catch),t0=((e,n)=>e?setImmediate:n?((t,r)=>(lr.addEventListener("message",({source:i,data:o})=>{i===lr&&o===t&&r.length&&r.shift()()},!1),i=>{r.push(i),lr.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",It(lr.postMessage)),o9=typeof queueMicrotask<"u"?queueMicrotask.bind(lr):typeof process<"u"&&process.nextTick||t0,de={isArray:Fr,isArrayBuffer:Gu,isBuffer:di,isFormData:D5,isArrayBufferView:w5,isString:E5,isNumber:Qu,isBoolean:A5,isObject:hi,isPlainObject:Co,isEmptyObject:k5,isReadableStream:L5,isRequest:F5,isResponse:N5,isHeaders:P5,isUndefined:Nr,isDate:O5,isFile:S5,isBlob:I5,isRegExp:Q5,isFunction:It,isStream:B5,isURLSearchParams:R5,isTypedArray:z5,isFileList:T5,forEach:pi,merge:Ja,extend:q5,trim:M5,stripBOM:$5,inherits:j5,toFlatObject:H5,kindOf:_o,kindOfTest:Zt,endsWith:V5,toArray:U5,forEachEntry:K5,matchAll:X5,isHTMLForm:W5,hasOwnProperty:Yu,hasOwnProp:Yu,reduceDescriptors:e0,freezeMethods:Z5,toObjectSet:J5,toCamelCase:G5,noop:Y5,toFiniteNumber:e9,findKey:Zu,global:lr,isContextDefined:Ju,isSpecCompliantForm:t9,toJSONObject:n9,isAsyncFn:r9,isThenable:i9,setImmediate:t0,asap:o9,isIterable:e=>e!=null&&It(e[xo])};function Re(e,n,t,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),t&&(this.config=t),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}de.inherits(Re,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.status}}});const n0=Re.prototype,r0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{r0[e]={value:e}}),Object.defineProperties(Re,r0),Object.defineProperty(n0,"isAxiosError",{value:!0}),Re.from=(e,n,t,r,i,o)=>{const a=Object.create(n0);de.toFlatObject(e,a,function(c){return c!==Error.prototype},f=>f!=="isAxiosError");const s=e&&e.message?e.message:"Error",u=n==null&&e?e.code:n;return Re.call(a,s,u,t,r,i),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",o&&Object.assign(a,o),a};const a9=null;function Ya(e){return de.isPlainObject(e)||de.isArray(e)}function i0(e){return de.endsWith(e,"[]")?e.slice(0,-2):e}function o0(e,n,t){return e?e.concat(n).map(function(i,o){return i=i0(i),!t&&o?"["+i+"]":i}).join(t?".":""):n}function s9(e){return de.isArray(e)&&!e.some(Ya)}const l9=de.toFlatObject(de,{},null,function(n){return/^is[A-Z]/.test(n)});function wo(e,n,t){if(!de.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,t=de.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,d){return!de.isUndefined(d[g])});const r=t.metaTokens,i=t.visitor||c,o=t.dots,a=t.indexes,u=(t.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(n);if(!de.isFunction(i))throw new TypeError("visitor must be a function");function f(p){if(p===null)return"";if(de.isDate(p))return p.toISOString();if(de.isBoolean(p))return p.toString();if(!u&&de.isBlob(p))throw new Re("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(p)||de.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,g,d){let m=p;if(p&&!d&&typeof p=="object"){if(de.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(de.isArray(p)&&s9(p)||(de.isFileList(p)||de.endsWith(g,"[]"))&&(m=de.toArray(p)))return g=i0(g),m.forEach(function(_,x){!(de.isUndefined(_)||_===null)&&n.append(a===!0?o0([g],x,o):a===null?g:g+"[]",f(_))}),!1}return Ya(p)?!0:(n.append(o0(d,g,o),f(p)),!1)}const v=[],l=Object.assign(l9,{defaultVisitor:c,convertValue:f,isVisitable:Ya});function h(p,g){if(!de.isUndefined(p)){if(v.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));v.push(p),de.forEach(p,function(m,y){(!(de.isUndefined(m)||m===null)&&i.call(n,m,de.isString(y)?y.trim():y,g,l))===!0&&h(m,g?g.concat(y):[y])}),v.pop()}}if(!de.isObject(e))throw new TypeError("data must be an object");return h(e),n}function a0(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return n[r]})}function es(e,n){this._pairs=[],e&&wo(e,this,n)}const s0=es.prototype;s0.append=function(n,t){this._pairs.push([n,t])},s0.toString=function(n){const t=n?function(r){return n.call(this,r,a0)}:a0;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function c9(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function l0(e,n,t){if(!n)return e;const r=t&&t.encode||c9;de.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let o;if(i?o=i(n,t):o=de.isURLSearchParams(n)?n.toString():new es(n,t).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class c0{constructor(){this.handlers=[]}use(n,t,r){return this.handlers.push({fulfilled:n,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){de.forEach(this.handlers,function(r){r!==null&&n(r)})}}const u0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},u9={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:es,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ts=typeof window<"u"&&typeof document<"u",ns=typeof navigator=="object"&&navigator||void 0,f9=ts&&(!ns||["ReactNative","NativeScript","NS"].indexOf(ns.product)<0),d9=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",h9=ts&&window.location.href||"http://localhost",yt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ts,hasStandardBrowserEnv:f9,hasStandardBrowserWebWorkerEnv:d9,navigator:ns,origin:h9},Symbol.toStringTag,{value:"Module"})),...u9};function p9(e,n){return wo(e,new yt.classes.URLSearchParams,{visitor:function(t,r,i,o){return yt.isNode&&de.isBuffer(t)?(this.append(r,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...n})}function v9(e){return de.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function g9(e){const n={},t=Object.keys(e);let r;const i=t.length;let o;for(r=0;r<i;r++)o=t[r],n[o]=e[o];return n}function f0(e){function n(t,r,i,o){let a=t[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),u=o>=t.length;return a=!a&&de.isArray(i)?i.length:a,u?(de.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!de.isObject(i[a]))&&(i[a]=[]),n(t,r,i[a],o)&&de.isArray(i[a])&&(i[a]=g9(i[a])),!s)}if(de.isFormData(e)&&de.isFunction(e.entries)){const t={};return de.forEachEntry(e,(r,i)=>{n(v9(r),i,t,0)}),t}return null}function m9(e,n,t){if(de.isString(e))try{return(n||JSON.parse)(e),de.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(e)}const rs={transitional:u0,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const r=t.getContentType()||"",i=r.indexOf("application/json")>-1,o=de.isObject(n);if(o&&de.isHTMLForm(n)&&(n=new FormData(n)),de.isFormData(n))return i?JSON.stringify(f0(n)):n;if(de.isArrayBuffer(n)||de.isBuffer(n)||de.isStream(n)||de.isFile(n)||de.isBlob(n)||de.isReadableStream(n))return n;if(de.isArrayBufferView(n))return n.buffer;if(de.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return p9(n,this.formSerializer).toString();if((s=de.isFileList(n))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return wo(s?{"files[]":n}:n,u&&new u,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),m9(n)):n}],transformResponse:[function(n){const t=this.transitional||rs.transitional,r=t&&t.forcedJSONParsing,i=this.responseType==="json";if(de.isResponse(n)||de.isReadableStream(n))return n;if(n&&de.isString(n)&&(r&&!this.responseType||i)){const a=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(n,this.parseReviver)}catch(s){if(a)throw s.name==="SyntaxError"?Re.from(s,Re.ERR_BAD_RESPONSE,this,null,this.response):s}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],e=>{rs.headers[e]={}});const is=rs,y9=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),x9=e=>{const n={};let t,r,i;return e&&e.split(`
29
29
  `).forEach(function(a){i=a.indexOf(":"),t=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!t||n[t]&&y9[t])&&(t==="set-cookie"?n[t]?n[t].push(r):n[t]=[r]:n[t]=n[t]?n[t]+", "+r:r)}),n},d0=Symbol("internals");function vi(e){return e&&String(e).trim().toLowerCase()}function Eo(e){return e===!1||e==null?e:de.isArray(e)?e.map(Eo):String(e)}function _9(e){const n=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(e);)n[r[1]]=r[2];return n}const b9=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function os(e,n,t,r,i){if(de.isFunction(r))return r.call(this,n,t);if(i&&(n=t),!!de.isString(n)){if(de.isString(r))return n.indexOf(r)!==-1;if(de.isRegExp(r))return r.test(n)}}function C9(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,t,r)=>t.toUpperCase()+r)}function w9(e,n){const t=de.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+t,{value:function(i,o,a){return this[r].call(this,n,i,o,a)},configurable:!0})})}class Ao{constructor(n){n&&this.set(n)}set(n,t,r){const i=this;function o(s,u,f){const c=vi(u);if(!c)throw new Error("header name must be a non-empty string");const v=de.findKey(i,c);(!v||i[v]===void 0||f===!0||f===void 0&&i[v]!==!1)&&(i[v||u]=Eo(s))}const a=(s,u)=>de.forEach(s,(f,c)=>o(f,c,u));if(de.isPlainObject(n)||n instanceof this.constructor)a(n,t);else if(de.isString(n)&&(n=n.trim())&&!b9(n))a(x9(n),t);else if(de.isObject(n)&&de.isIterable(n)){let s={},u,f;for(const c of n){if(!de.isArray(c))throw TypeError("Object iterator must return a key-value pair");s[f=c[0]]=(u=s[f])?de.isArray(u)?[...u,c[1]]:[u,c[1]]:c[1]}a(s,t)}else n!=null&&o(t,n,r);return this}get(n,t){if(n=vi(n),n){const r=de.findKey(this,n);if(r){const i=this[r];if(!t)return i;if(t===!0)return _9(i);if(de.isFunction(t))return t.call(this,i,r);if(de.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=vi(n),n){const r=de.findKey(this,n);return!!(r&&this[r]!==void 0&&(!t||os(this,this[r],r,t)))}return!1}delete(n,t){const r=this;let i=!1;function o(a){if(a=vi(a),a){const s=de.findKey(r,a);s&&(!t||os(r,r[s],s,t))&&(delete r[s],i=!0)}}return de.isArray(n)?n.forEach(o):o(n),i}clear(n){const t=Object.keys(this);let r=t.length,i=!1;for(;r--;){const o=t[r];(!n||os(this,this[o],o,n,!0))&&(delete this[o],i=!0)}return i}normalize(n){const t=this,r={};return de.forEach(this,(i,o)=>{const a=de.findKey(r,o);if(a){t[a]=Eo(i),delete t[o];return}const s=n?C9(o):String(o).trim();s!==o&&delete t[o],t[s]=Eo(i),r[s]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return de.forEach(this,(r,i)=>{r!=null&&r!==!1&&(t[i]=n&&de.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(`
30
30
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const r=new this(n);return t.forEach(i=>r.set(i)),r}static accessor(n){const r=(this[d0]=this[d0]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=vi(a);r[s]||(w9(i,a),r[s]=!0)}return de.isArray(n)?n.forEach(o):o(n),this}}Ao.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),de.reduceDescriptors(Ao.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),de.freezeMethods(Ao);const Jt=Ao;function as(e,n){const t=this||is,r=n||t,i=Jt.from(r.headers);let o=r.data;return de.forEach(e,function(s){o=s.call(t,o,i.normalize(),n?n.status:void 0)}),i.normalize(),o}function h0(e){return!!(e&&e.__CANCEL__)}function Pr(e,n,t){Re.call(this,e??"canceled",Re.ERR_CANCELED,n,t),this.name="CanceledError"}de.inherits(Pr,Re,{__CANCEL__:!0});function p0(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new Re("Request failed with status code "+t.status,[Re.ERR_BAD_REQUEST,Re.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function E9(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function A9(e,n){e=e||10;const t=new Array(e),r=new Array(e);let i=0,o=0,a;return n=n!==void 0?n:1e3,function(u){const f=Date.now(),c=r[o];a||(a=f),t[i]=u,r[i]=f;let v=o,l=0;for(;v!==i;)l+=t[v++],v=v%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-a<n)return;const h=c&&f-c;return h?Math.round(l*1e3/h):void 0}}function k9(e,n){let t=0,r=1e3/n,i,o;const a=(f,c=Date.now())=>{t=c,i=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const c=Date.now(),v=c-t;v>=r?a(f,c):(i=f,o||(o=setTimeout(()=>{o=null,a(i)},r-v)))},()=>i&&a(i)]}const ko=(e,n,t=3)=>{let r=0;const i=A9(50,250);return k9(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,f=i(u),c=a<=s;r=a;const v={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:f||void 0,estimated:f&&s&&c?(s-a)/f:void 0,event:o,lengthComputable:s!=null,[n?"download":"upload"]:!0};e(v)},t)},v0=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},g0=e=>(...n)=>de.asap(()=>e(...n)),O9=yt.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,yt.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,S9=yt.hasStandardBrowserEnv?{write(e,n,t,r,i,o,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(n)}`];de.isNumber(t)&&s.push(`expires=${new Date(t).toUTCString()}`),de.isString(r)&&s.push(`path=${r}`),de.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),de.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function I9(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function T9(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function m0(e,n,t){let r=!I9(n);return e&&(r||t==!1)?T9(e,n):n}const y0=e=>e instanceof Jt?{...e}:e;function cr(e,n){n=n||{};const t={};function r(f,c,v,l){return de.isPlainObject(f)&&de.isPlainObject(c)?de.merge.call({caseless:l},f,c):de.isPlainObject(c)?de.merge({},c):de.isArray(c)?c.slice():c}function i(f,c,v,l){if(de.isUndefined(c)){if(!de.isUndefined(f))return r(void 0,f,v,l)}else return r(f,c,v,l)}function o(f,c){if(!de.isUndefined(c))return r(void 0,c)}function a(f,c){if(de.isUndefined(c)){if(!de.isUndefined(f))return r(void 0,f)}else return r(void 0,c)}function s(f,c,v){if(v in n)return r(f,c);if(v in e)return r(void 0,f)}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(f,c,v)=>i(y0(f),y0(c),v,!0)};return de.forEach(Object.keys({...e,...n}),function(c){const v=u[c]||i,l=v(e[c],n[c],c);de.isUndefined(l)&&v!==s||(t[c]=l)}),t}const x0=e=>{const n=cr({},e);let{data:t,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=n;if(n.headers=a=Jt.from(a),n.url=l0(m0(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),de.isFormData(t)){if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(de.isFunction(t.getHeaders)){const u=t.getHeaders(),f=["content-type","content-length"];Object.entries(u).forEach(([c,v])=>{f.includes(c.toLowerCase())&&a.set(c,v)})}}if(yt.hasStandardBrowserEnv&&(r&&de.isFunction(r)&&(r=r(n)),r||r!==!1&&O9(n.url))){const u=i&&o&&S9.read(o);u&&a.set(i,u)}return n},B9=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,r){const i=x0(e);let o=i.data;const a=Jt.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:f}=i,c,v,l,h,p;function g(){h&&h(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let d=new XMLHttpRequest;d.open(i.method.toUpperCase(),i.url,!0),d.timeout=i.timeout;function m(){if(!d)return;const _=Jt.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:_,config:e,request:d};p0(function(A){t(A),g()},function(A){r(A),g()},C),d=null}"onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(m)},d.onabort=function(){d&&(r(new Re("Request aborted",Re.ECONNABORTED,e,d)),d=null)},d.onerror=function(x){const C=x&&x.message?x.message:"Network Error",S=new Re(C,Re.ERR_NETWORK,e,d);S.event=x||null,r(S),d=null},d.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||u0;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),r(new Re(x,C.clarifyTimeoutError?Re.ETIMEDOUT:Re.ECONNABORTED,e,d)),d=null},o===void 0&&a.setContentType(null),"setRequestHeader"in d&&de.forEach(a.toJSON(),function(x,C){d.setRequestHeader(C,x)}),de.isUndefined(i.withCredentials)||(d.withCredentials=!!i.withCredentials),s&&s!=="json"&&(d.responseType=i.responseType),f&&([l,p]=ko(f,!0),d.addEventListener("progress",l)),u&&d.upload&&([v,h]=ko(u),d.upload.addEventListener("progress",v),d.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=_=>{d&&(r(!_||_.type?new Pr(null,e,d):_),d.abort(),d=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const y=E9(i.url);if(y&&yt.protocols.indexOf(y)===-1){r(new Re("Unsupported protocol "+y+":",Re.ERR_BAD_REQUEST,e));return}d.send(o||null)})},D9=(e,n)=>{const{length:t}=e=e?e.filter(Boolean):[];if(n||t){let r=new AbortController,i;const o=function(f){if(!i){i=!0,s();const c=f instanceof Error?f:this.reason;r.abort(c instanceof Re?c:new Pr(c instanceof Error?c.message:c))}};let a=n&&setTimeout(()=>{a=null,o(new Re(`timeout ${n} of ms exceeded`,Re.ETIMEDOUT))},n);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>de.asap(s),u}},R9=function*(e,n){let t=e.byteLength;if(!n||t<n){yield e;return}let r=0,i;for(;r<t;)i=r+n,yield e.slice(r,i),r=i},L9=async function*(e,n){for await(const t of F9(e))yield*R9(t,n)},F9=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:t,value:r}=await n.read();if(t)break;yield r}}finally{await n.cancel()}},_0=(e,n,t,r)=>{const i=L9(e,n);let o=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:f,value:c}=await i.next();if(f){s(),u.close();return}let v=c.byteLength;if(t){let l=o+=v;t(l)}u.enqueue(new Uint8Array(c))}catch(f){throw s(f),f}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},b0=64*1024,{isFunction:Oo}=de,N9=(({Request:e,Response:n})=>({Request:e,Response:n}))(de.global),{ReadableStream:C0,TextEncoder:w0}=de.global,E0=(e,...n)=>{try{return!!e(...n)}catch{return!1}},P9=e=>{e=de.merge.call({skipUndefined:!0},N9,e);const{fetch:n,Request:t,Response:r}=e,i=n?Oo(n):typeof fetch=="function",o=Oo(t),a=Oo(r);if(!i)return!1;const s=i&&Oo(C0),u=i&&(typeof w0=="function"?(p=>g=>p.encode(g))(new w0):async p=>new Uint8Array(await new t(p).arrayBuffer())),f=o&&s&&E0(()=>{let p=!1;const g=new t(yt.origin,{body:new C0,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!g}),c=a&&s&&E0(()=>de.isReadableStream(new r("").body)),v={stream:c&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!v[p]&&(v[p]=(g,d)=>{let m=g&&g[p];if(m)return m.call(g);throw new Re(`Response type '${p}' is not supported`,Re.ERR_NOT_SUPPORT,d)})});const l=async p=>{if(p==null)return 0;if(de.isBlob(p))return p.size;if(de.isSpecCompliantForm(p))return(await new t(yt.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(de.isArrayBufferView(p)||de.isArrayBuffer(p))return p.byteLength;if(de.isURLSearchParams(p)&&(p=p+""),de.isString(p))return(await u(p)).byteLength},h=async(p,g)=>{const d=de.toFiniteNumber(p.getContentLength());return d??l(g)};return async p=>{let{url:g,method:d,data:m,signal:y,cancelToken:_,timeout:x,onDownloadProgress:C,onUploadProgress:S,responseType:A,headers:I,withCredentials:B="same-origin",fetchOptions:O}=x0(p),E=n||fetch;A=A?(A+"").toLowerCase():"text";let k=D9([y,_&&_.toAbortSignal()],x),R=null;const F=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let q;try{if(S&&f&&d!=="get"&&d!=="head"&&(q=await h(I,m))!==0){let w=new t(g,{method:"POST",body:m,duplex:"half"}),D;if(de.isFormData(m)&&(D=w.headers.get("content-type"))&&I.setContentType(D),w.body){const[L,$]=v0(q,ko(g0(S)));m=_0(w.body,b0,L,$)}}de.isString(B)||(B=B?"include":"omit");const Z=o&&"credentials"in t.prototype,ee={...O,signal:k,method:d.toUpperCase(),headers:I.normalize().toJSON(),body:m,duplex:"half",credentials:Z?B:void 0};R=o&&new t(g,ee);let ne=await(o?E(R,O):E(g,ee));const Q=c&&(A==="stream"||A==="response");if(c&&(C||Q&&F)){const w={};["status","statusText","headers"].forEach(G=>{w[G]=ne[G]});const D=de.toFiniteNumber(ne.headers.get("content-length")),[L,$]=C&&v0(D,ko(g0(C),!0))||[];ne=new r(_0(ne.body,b0,L,()=>{$&&$(),F&&F()}),w)}A=A||"text";let N=await v[de.findKey(v,A)||"text"](ne,p);return!Q&&F&&F(),await new Promise((w,D)=>{p0(w,D,{data:N,headers:Jt.from(ne.headers),status:ne.status,statusText:ne.statusText,config:p,request:R})})}catch(Z){throw F&&F(),Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)?Object.assign(new Re("Network Error",Re.ERR_NETWORK,p,R),{cause:Z.cause||Z}):Re.from(Z,Z&&Z.code,p,R)}}},M9=new Map,A0=e=>{let n=e&&e.env||{};const{fetch:t,Request:r,Response:i}=n,o=[r,i,t];let a=o.length,s=a,u,f,c=M9;for(;s--;)u=o[s],f=c.get(u),f===void 0&&c.set(u,f=s?new Map:P9(n)),c=f;return f};A0();const ss={http:a9,xhr:B9,fetch:{get:A0}};de.forEach(ss,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const k0=e=>`- ${e}`,q9=e=>de.isFunction(e)||e===null||e===!1;function $9(e,n){e=de.isArray(e)?e:[e];const{length:t}=e;let r,i;const o={};for(let a=0;a<t;a++){r=e[a];let s;if(i=r,!q9(r)&&(i=ss[(s=String(r)).toLowerCase()],i===void 0))throw new Re(`Unknown adapter '${s}'`);if(i&&(de.isFunction(i)||(i=i.get(n))))break;o[s||"#"+a]=i}if(!i){const a=Object.entries(o).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
31
31
  `+a.map(k0).join(`
32
32
  `):" "+k0(a[0]):"as no adapter specified";throw new Re("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i}const O0={getAdapter:$9,adapters:ss};function ls(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pr(null,e)}function S0(e){return ls(e),e.headers=Jt.from(e.headers),e.data=as.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),O0.getAdapter(e.adapter||is.adapter,e)(e).then(function(r){return ls(e),r.data=as.call(e,e.transformResponse,r),r.headers=Jt.from(r.headers),r},function(r){return h0(r)||(ls(e),r&&r.response&&(r.response.data=as.call(e,e.transformResponse,r.response),r.response.headers=Jt.from(r.response.headers))),Promise.reject(r)})}const I0="1.13.2",So={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{So[e]=function(r){return typeof r===e||"a"+(n<1?"n ":" ")+e}});const T0={};So.transitional=function(n,t,r){function i(o,a){return"[Axios v"+I0+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(n===!1)throw new Re(i(a," has been removed"+(t?" in "+t:"")),Re.ERR_DEPRECATED);return t&&!T0[a]&&(T0[a]=!0,console.warn(i(a," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(o,a,s):!0}},So.spelling=function(n){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${n}`),!0)};function j9(e,n,t){if(typeof e!="object")throw new Re("options must be an object",Re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=n[o];if(a){const s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new Re("option "+o+" must be "+u,Re.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Re("Unknown option "+o,Re.ERR_BAD_OPTION)}}const Io={assertOptions:j9,validators:So},fn=Io.validators;class To{constructor(n){this.defaults=n||{},this.interceptors={request:new c0,response:new c0}}async request(n,t){try{return await this._request(n,t)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
33
- `+o):r.stack=o}catch{}}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=cr(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&Io.assertOptions(r,{silentJSONParsing:fn.transitional(fn.boolean),forcedJSONParsing:fn.transitional(fn.boolean),clarifyTimeoutError:fn.transitional(fn.boolean)},!1),i!=null&&(de.isFunction(i)?t.paramsSerializer={serialize:i}:Io.assertOptions(i,{encode:fn.function,serialize:fn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Io.assertOptions(t,{baseUrl:fn.spelling("baseURL"),withXsrfToken:fn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&de.merge(o.common,o[t.method]);o&&de.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),t.headers=Jt.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(t)===!1||(u=u&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const f=[];this.interceptors.response.forEach(function(g){f.push(g.fulfilled,g.rejected)});let c,v=0,l;if(!u){const p=[S0.bind(this),void 0];for(p.unshift(...s),p.push(...f),l=p.length,c=Promise.resolve(t);v<l;)c=c.then(p[v++],p[v++]);return c}l=s.length;let h=t;for(;v<l;){const p=s[v++],g=s[v++];try{h=p(h)}catch(d){g.call(this,d);break}}try{c=S0.call(this,h)}catch(p){return Promise.reject(p)}for(v=0,l=f.length;v<l;)c=c.then(f[v++],f[v++]);return c}getUri(n){n=cr(this.defaults,n);const t=m0(n.baseURL,n.url,n.allowAbsoluteUrls);return l0(t,n.params,n.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(n){To.prototype[n]=function(t,r){return this.request(cr(r||{},{method:n,url:t,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(n){function t(r){return function(o,a,s){return this.request(cr(s||{},{method:n,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}To.prototype[n]=t(),To.prototype[n+"Form"]=t(!0)});const Bo=To;class cs{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},n(function(o,a,s){r.reason||(r.reason=new Pr(o,a,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new cs(function(i){n=i}),cancel:n}}}const H9=cs;function V9(e){return function(t){return e.apply(null,t)}}function U9(e){return de.isObject(e)&&e.isAxiosError===!0}const us={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(us).forEach(([e,n])=>{us[n]=e});const z9=us;function B0(e){const n=new Bo(e),t=Xu(Bo.prototype.request,n);return de.extend(t,Bo.prototype,n,{allOwnKeys:!0}),de.extend(t,n,null,{allOwnKeys:!0}),t.create=function(i){return B0(cr(e,i))},t}const Ge=B0(is);Ge.Axios=Bo,Ge.CanceledError=Pr,Ge.CancelToken=H9,Ge.isCancel=h0,Ge.VERSION=I0,Ge.toFormData=wo,Ge.AxiosError=Re,Ge.Cancel=Ge.CanceledError,Ge.all=function(n){return Promise.all(n)},Ge.spread=V9,Ge.isAxiosError=U9,Ge.mergeConfig=cr,Ge.AxiosHeaders=Jt,Ge.formToJSON=e=>f0(de.isHTMLForm(e)?new FormData(e):e),Ge.getAdapter=O0.getAdapter,Ge.HttpStatusCode=z9,Ge.default=Ge;class K9{constructor(n,t,r,i){this.awsURL="https://ec-apigw.blink.expedite1.com",this.headers={"x-api-key":n,"X-Salesforce-Org-Type":t,"X-Salesforce-Org-Id":r,"X-Salesforce-User-Id":i,"Content-Type":"application/json"}}}const D0=wt("comShare",()=>{const e=te(""),n=te(""),t=te(""),r=te(""),i=te(""),o=te(""),a=te(""),s=te("Single"),u=me(()=>s.value==="Single");async function f(c){e.value=c.orgType||"Production",n.value=c.orgId||"",t.value=c.userId||"",r.value=c.accountId||"",i.value=c.opportunityId||"",a.value=c.userLocale||"en_US",s.value=c.pricingSchema||"Single"}return{orgType:e,orgId:n,userId:t,accountId:r,opportunityId:i,userLocale:a,pricingSchema:s,quoteId:o,isSinglePricingSchema:u,setSetupData:f}});function X9(e){return e.offerData.pricingTypes.forEach(n=>{n.appliedOnField==="Catalog Price"?(e.catalogPrice=n,e.salesPrice=n.offerPrice,e.price=n.offerPrice):n.appliedOnField==="MRC"?(e.mrcPrice=n,e.mrc=n.offerPrice):n.appliedOnField==="YRC"&&(e.yrcPrice=n,e.yrc=n.offerPrice)}),e}function W9(e){const n=t=>Math.min(...t.options.map(r=>r.relationshipInfo.primarySortOrder));return e.forEach(t=>{t.itemTypes.forEach(r=>{r.options.sort((i,o)=>i.relationshipInfo.primarySortOrder-o.relationshipInfo.primarySortOrder||i.itemName.localeCompare(o.itemName))}),t.itemTypes.sort((r,i)=>n(r)-n(i)||r.itemTypeName.localeCompare(i.itemTypeName))}),e.sort((t,r)=>{const i=Math.min(...t.itemTypes.map(n)),o=Math.min(...r.itemTypes.map(n));return i-o||t.category.localeCompare(r.category)}),e}const G9=(e,n)=>{const t=(r,i)=>typeof i=="function"?void 0:i;return JSON.stringify(e,t)===JSON.stringify(n,t)};class Q9 extends K9{constructor(n,t,r,i){super(n,t,r,i)}async getAvailableConfiguration(n){return(await Ge.post(`${this.awsURL}/product-pricing/getAvailableConfiguration`,n,{headers:this.headers})).data}async getLineItems({request:n}){const t=await Ge.post(`${this.awsURL}/quoting/getConfiguredLineItems`,n,{headers:this.headers});return console.info("getLineItems:response",t.data),t.data}async maintainQuoteConfiguration({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/maintainConfiguration`,n,{headers:this.headers});return console.info("maintainQuoteConfiguration:response",t.data),t.data}async getProductCrossSells({objectId:n,productItemId:t}){const r=await Ge.get(`${this.awsURL}/pricing/getProductCrossSells?productItemId=${t}&objectId=${n}`,{headers:this.headers});return console.info("getProductCrossSells:response",r.data),r.data}async addLines({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/addLines`,n,{headers:this.headers});return console.info("addLines:response",t.data),t.data}async evaluateConfigurationSelection({request:n}){const t=await Ge.post("https://api-svc.blink.expedite1.com/api/product-pricing/evaluateConfigurationSelection",n,{headers:{headers:this.headers}});return console.info("evaluateConfigurationSelection:response",t.data),t.data}}const dn=wt("comConfigurator",()=>{const e=te(null),n=Qt(),t=D0(),r=fi(),i=te(null),o=te(null),a=te(null),s=te(null),u=te(null),f=te([]),c=te(null),v=te([]),l=te(null),h=te(new Map),p=te(!1),g=te({configuration:!1,lineItem:!1,productOptionsPricing:!1,bestOfferPrice:!1,lineItemAttributes:!1,save:!1}),d=te(!1),m=me(()=>y.value&&!t.isSinglePricingSchema),y=me(()=>{var P;if(!s.value||!((P=s.value.categoryOptions)!=null&&P.length)>0)return!1;let M=!0,H=!0,V=!0,K=null,J=!1;for(const X of s.value.categoryOptions)for(const se of X.itemTypes)for(const fe of se.options)fe.billingPeriod&&(K&&K!==fe.billingPeriod&&(V=!1),K=fe.billingPeriod,!fe.yrcPrice&&fe.billingPeriod==="Monthly"&&(M=!1),!fe.mrcPrice&&fe.billingPeriod==="Yearly"&&(H=!1),J=!0);return M&&H&&V&&J}),_=me(()=>!G9(s.value,u.value)),x=me(()=>{var H;const M=((H=s.value)==null?void 0:H.categoryOptions)||[];return M.forEach(V=>{V.itemTypes.forEach(K=>{K.selectedOptions=K.options.filter(J=>K.selected.includes(J.itemId)),K.totalPrice=function(){return K.selectedOptions.reduce((J,P)=>J+P.price*P.qty,0)||0},K.oneTimePrice=function(){return K.selectedOptions.filter(J=>!J.billingPeriod).reduce((J,P)=>J+P.price*P.qty,0)||0},K.recurringPrice=function(){return K.selectedOptions.filter(J=>J.billingPeriod).reduce((J,P)=>J+P.price*P.qty,0)||0}}),V.selectedItemTypes=V.itemTypes.filter(K=>K.selected.length>0),V.totalPrice=function(){return V.itemTypes.reduce((K,J)=>K+J.totalPrice(),0)},V.oneTimePrice=function(){return V.itemTypes.reduce((K,J)=>K+J.oneTimePrice(),0)},V.recurringPrice=function(){return V.itemTypes.reduce((K,J)=>K+J.recurringPrice(),0)}}),M.filter(V=>V.itemTypes.filter(K=>K.selected.length>0).length>0)}),C=me(()=>x.value.reduce((M,H)=>M+H.totalPrice(),0)),S=me(()=>{if(!s.value)return{basePrice:0,addOns:0,oneTimePrice:0,recurringPrice:0,total:0};const M=x.value.reduce((K,J)=>K+J.totalPrice(),0);let H=x.value.reduce((K,J)=>K+J.oneTimePrice(),0),V=x.value.reduce((K,J)=>K+J.recurringPrice(),0);return s.value.billingPeriod?V=(V+s.value.price)*s.value.qty:H=(H+s.value.price)*s.value.qty,{basePrice:s.value.price,addOns:M,oneTimePrice:H,recurringPrice:V,total:s.value.price*s.value.qty+M*s.value.qty+H+V}}),A=me(()=>{var H,V,K,J;const M=new Map;return(H=c.value)!=null&&H.productLineItem&&M.set((V=c.value)==null?void 0:V.productLineItem.XX_ORD1__Item__c,(K=c.value)==null?void 0:K.productLineItem),(J=c.value)==null||J.options.forEach(P=>{M.set(P.XX_ORD1__Item__c,P)}),M}),I=me(()=>{var H;const M=new Map;return s.value&&((H=s.value.categoryOptions)==null?void 0:H.length)>0&&s.value.categoryOptions.forEach(V=>{V.itemTypes.forEach(K=>{K.options.forEach(J=>{M.set(J.relationshipInfo.publishKey,J)})})}),M}),B=me(()=>{if(!s.value)return{};const M=K=>!K||!Array.isArray(K)?[]:K.filter(J=>J.apiName&&J.value!==null&&J.value!==void 0&&J.value!=="").map(J=>({fieldAPIName:J.apiName,value:J.dataType==="BOOLEAN"?J.value?"true":"false":J.dataType==="REFERENCE"?J.referenceRecordId||J.value||"":J.value||""})),H={itemId:s.value.itemId,qliId:s.value.qliId||null,name:s.value.itemName,qty:s.value.qty||1,salesPrice:s.value.price||0,mrc:s.value.mrc||null,yrc:s.value.yrc||null,attributes:M(s.value.attributes)},V=[];return s.value.categoryOptions.forEach(K=>{K.itemTypes.forEach(J=>{J.options.forEach(P=>{J.selected.includes(P.itemId)&&V.push({itemId:P.itemId,qliId:P.qliId||null,name:P.itemName,qty:P.qty||1,salesPrice:P.price||0,mrc:P.mrc||null,yrc:P.yrc||null,attributes:M(P.attributes)})})})}),{[s.value.itemId]:{product:H,options:V}}}),O=(M,H)=>{if(!M||!Array.isArray(M))return[];const V=new Map;return H.forEach(K=>{V.set(K.fieldAPIName,K.value)}),M.map(K=>(K.value=V.get(K.fieldAPIName)||null,K))};function E(M){const H=new Map;M.options.forEach(V=>{H.set(V.itemId,V)}),s.value.itemName=M.product.name,s.value.qty=M.product.qty,s.value.price=M.product.salesPrice,s.value.attributes=O(s.value.attributes,M.product.attributes),s.value.categoryOptions.forEach(V=>{V.itemTypes.forEach(K=>{K.selected=[],K.options.forEach(J=>{H.has(J.itemId)&&(J.itemName=H.get(J.itemId).name,J.qty=H.get(J.itemId).qty,J.price=H.get(J.itemId).salesPrice,J.qliId=H.get(J.itemId).qliId,J.attributes=O(J.attributes,H.get(J.itemId).attributes),K.selected.push(J.itemId))})})}),s.value={...s.value}}function k(){return{get getConfig(){return B.value},setConfig:E}}function R(M){s.value.qliId&&(s.value.qliBillingPeriod==="Monthly"&&!M?s.value.price=s.value.salesPrice||s.value.mrc:s.value.qliBillingPeriod==="Yearly"&&M&&(s.value.price=s.value.salesPrice)),s.value.categoryOptions.forEach(H=>{H.itemTypes.forEach(V=>{V.options.forEach(K=>{K.billingPeriod&&(K.price=(M?K.yrcPrice.offerPrice:K.mrcPrice.offerPrice)||K.price,K.qliId&&(K.qliBillingPeriod==="Monthly"&&!M?K.price=K.salesPrice||K.mrc:K.qliBillingPeriod==="Yearly"&&M&&(K.price=K.salesPrice)))})})})}function F(){s.value=null,u.value=null,f.value=[],c.value=null,l.value=null,h.value=new Map,p.value=!1,g.value.configuration=!1,g.value.lineItem=!1,g.value.productOptionsPricing=!1,g.value.bestOfferPrice=!1,g.value.lineItemAttributes=!1,g.value.save=!1}function q(M,H,V,K){e.value=new Q9(M,H,V,K)}async function Z(M,H,V){console.time("CONFIGURATOR INIT CONFIGURATOR"),F(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","1"),o.value=M,a.value=H,i.value=V||t.quoteId;const K=await ee();console.timeLog("CONFIGURATOR INIT CONFIGURATOR","2"),s.value=ne(K),a.value&&(await N(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","3"),Q(s.value),s.value.categoryOptions.forEach(J=>{J.itemTypes.forEach(P=>{P.options.forEach(X=>{Q(X),(A.value.has(X.itemId)||X.relationshipInfo.relationship==="Kit")&&P.selected.push(X.itemId)})})}),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","4")),u.value=JSON.parse(JSON.stringify(s.value)),console.timeEnd("CONFIGURATOR INIT CONFIGURATOR")}async function ee(){try{const M={accountId:t.accountId,objectId:i.value,itemId:o.value,configScope:"BASIC",fields:[],pricePreference:"Lowest Price"},H=await e.value.getAvailableConfiguration(M);console.info("getAvailableConfiguration:result",H);const V=H.data.productConfiguration;return V.categoryOptions=W9(V.categoryOptions),V}catch(M){return console.info("error",M.message),!1}}function ne(M){h.value.set(a.value,M.attributes),f.value=M.configRules;const H=new Set;return f.value.forEach(V=>{const K=JSON.parse(V.ruleJson);K.optionSelected.forEach(J=>{H.add(J)}),K.affectedOptions.forEach(J=>{H.add(J)})}),console.info("rulesByPublishKey",H),Q(M),M.categoryOptions.forEach(V=>{V.key=V.category.toLowerCase().replace(/\s+/g,"-").replace(/[&]/g,""),V.itemTypes.forEach(K=>{K.selected=[],K.numberOfColumns||(K.numberOfColumns=1),K.numberOfColumns>1&&(K.lightboxAttributes=!0),K.maxNumber||(K.maxNumber=100),K.minNumber||(K.minNumber=0),K.maxQuantity||(K.maxQuantity=1e4),K.minQuantity||(K.minQuantity=1),K.maxNumber===1?(K.isRadio=!0,K.minMessage="Please select 1 option",K.maxMessage="",K.isKit=K.options.some(J=>J.relationshipInfo.relationship==="Kit")):(K.minMessage=`Minimum of ${K.minNumber} selection${K.minNumber!==1?"s":""} required`,K.maxMessage=`Maximum of ${K.maxNumber} selection${K.maxNumber!==1?"s":""} allowed`),K.options.forEach(J=>{V.showImage=V.showImage||!!J.defaultImageURL,J.showAttributesModal=!1,J.qty=K.minQuantity||1,J.getTags=()=>(J.attributes=J.attributes||[],J.attributes.filter(P=>P.value!==null&&P.value!=="").map(P=>({label:P.label,value:P.value}))),Object.defineProperty(J,"isDisabled",{get:function(){return J.relationshipInfo.relationship==="Kit"||(K.isRadio?K.isKit:!K.selected.includes(J.itemId)&&K.maxNumber===K.selected.length)}}),Q(J)})})}),M}function Q(M){M.isAttributes=M.attributes&&M.attributes.length>0;const H=M.catalogItem;if(A.value.has(M.itemId)){const V=A.value.get(M.itemId);M.qliId=V.Id,M.qty=V.XX_ORD1__QTY__c,M.itemName=V.XX_ORD1__Line_Description__c,M.billingPeriod=V.XX_ORD1__Billing_Period__c,M.price=V.XX_ORD1__Sales_Price__c,M.billingPeriod?M.price=V.XX_ORD1__Sales_Price__c||V.XX_ORD1__MRC__c:M.price=V.XX_ORD1__NRC__c||V.XX_ORD1__Sales_Price__c,M.salesPrice=V.XX_ORD1__Sales_Price__c,M.nrc=V.XX_ORD1__NRC__c,M.mrc=V.XX_ORD1__MRC__c,M.qliBillingPeriod=V.XX_ORD1__Billing_Period__c,h.value.set(M.qliId,M.attributes)}else M.itemName=H.XX_ORD1__Line_Description__c||M.itemName,M.price=H.XX_ORD1__Negotiated_Price__c||H.XX_ORD1__NRC_for_New__c,M.nrcPrice=H.XX_ORD1__NRC_for_New__c,X9(M)}async function N(){g.value.lineItem=!0,console.info("getLineItems",i.value,a.value);try{const M={objectId:i.value,filters:{},additionalFields:["Name","XX_ORD1__Line_Description__c","XX_ORD1__SYS_Configuration_Status2__c"],primarySort:{field:"CreatedDate",direction:"DESC"},productPage:{limit:200,offset:0,productLineItemId:a.value}},H=await e.value.getLineItems({request:JSON.stringify(M)});return(H.data.products||[]).forEach(K=>{const J=K.productLineItem;J.Id===a.value?c.value=K:v.value.push(J)}),console.info("lineItem.value",c.value),console.info("configurableLineItems.value",v.value),g.value.lineItem=!1,H}catch(M){return console.info("error",M.message),g.value.lineItem=!1,!1}}async function w(M){console.info("getRecords");try{const H=await window.productManagerController.getRecords({request:JSON.stringify(M)});return console.info("getRecords:result",H),JSON.parse(H.data)}catch(H){return console.info("error",H.message),!1}}async function D(){p.value=!0,g.value.save=!0,console.info("maintainQuoteConfiguration");const M=[],H=[];s.value.categoryOptions.forEach(J=>{J.itemTypes.forEach(P=>{P.options.forEach(X=>{P.selected.includes(X.itemId)?M.push(L(X)):X.qliId&&H.push(X.qliId)})})});const V={objectId:i.value,eCatalogId:t.eCatalogId,isGenesisAI:!0,blinkUser:!1,optionsToRemove:H,grandFatheredOptionsToRemove:[],productLineItem:{...L(s.value),optionLineItems:M}};console.info("maintainQuoteConfiguration:request",V);const K=await e.value.maintainQuoteConfiguration({request:JSON.stringify(V)});if(console.info("maintainQuoteConfiguration:result",K),K!=null&&K.error){const J={title:"Unable to Save Configuration",description:K.error,button:{label:"Back to Configuration",action:()=>{p.value=!1}},cancel:{label:"Quote List",action:()=>{r.push("/quote-item?id="+i.value)}}};n.errorPopup=J}else u.value=JSON.parse(JSON.stringify(s.value)),console.info("maintainQuoteConfiguration:result",K);g.value.save=!1}function L(M){const H={};M.isAttributes&&M.attributes.forEach(K=>{K.apiName.includes(".")||(K.dataType==="BOOLEAN"?H[K.apiName]=K.value?"true":"false":K.dataType==="REFERENCE"?H[K.apiName]=K.referenceRecordId:H[K.apiName]=K.value)});const V={attributes:H,itemId:M.itemId,lineItemId:M.qliId,lineDescription:M.itemName,qty:M.qty,billingPeriod:M.billingPeriod,...M.offer};return M.billingPeriod&&y.value&&!t.isSinglePricingSchema&&(V.billingPeriod=d.value?"Yearly":"Monthly"),!t.isSinglePricingSchema&&!M.billingPeriod?V.nrcPrice=M.price:(V.applyOnField="Catalog Price",V.salesPrice=M.price,V.nrcPrice=M.nrcPrice),V}async function $(){const M={objectId:t.accountId,productItemId:o.value};try{let H=await e.value.getProductCrossSells(M);const{crossSells:V,offerResult:K}=H.data;if(V.length===0)return H;const J=new Map;return K.forEach(P=>{J.set(P.eCatalogItemId,{...P,...P.pricingTypes[0]})}),V.forEach(P=>{P.loading=!1,P.Name=P.XX_ORD1__Line_Description__c||P.XX_ORD1__Item__r.Name,P.Description=P.XX_ORD1__Item__r.XX_ORD1__Product_Description__c,J.has(P.Id)?(P.Price=J.get(P.Id).offerPrice,P.priceFormatted=J.get(P.Id).formattedOfferPrice,P.offer={offerDiscount:J.get(P.Id).offerDiscount,offerId:J.get(P.Id).offerId,offerType:J.get(P.Id).offerType}):(P.Price=P.XX_ORD1__List_Price2__c,P.priceFormatted=P.XX_ORD1__List_Price2__c,P.offer={offerDiscount:0,offerId:null,offerType:null})}),V}catch(H){return console.info("error",H.message),!1}}const G=M=>!M||!Array.isArray(M)?[]:M.filter(H=>H.apiName&&H.value!==null&&H.value!==void 0&&H.value!=="").map(H=>({attrName:H.apiName,attrValue:H.dataType==="BOOLEAN"?H.value:H.value||"",dataType:H.dataType}));async function j(M,H){var P,X;const V={product:{publishKey:s.value.publishKey,attributes:G(s.value.attributes),lineDescription:s.value.itemName,meta:{XX_ORD1__Sales_Price__c:s.value.price,XX_ORD1__MRC__c:s.value.mrc,XX_ORD1__NRC__c:s.value.nrc,XX_ORD1__YRC__c:s.value.yrc,quantity:s.value.qty}},options:[]};s.value.categoryOptions.forEach(se=>{se.itemTypes.forEach(fe=>{fe.options.forEach(ce=>{fe.selected.includes(ce.itemId)&&V.options.push({publishKey:ce.publishKey,attributes:G(ce.attributes),lineDescription:ce.itemName,meta:{XX_ORD1__Sales_Price__c:ce.price,XX_ORD1__MRC__c:ce.mrc,XX_ORD1__NRC__c:ce.nrc,XX_ORD1__YRC__c:ce.yrc,quantity:ce.qty}})})})}),console.info("evaluateConfigSelection:currentConfig.options",V.options);const K={itemId:o.value,currentConfig:V,selected:M?{publishKey:(P=M.relationshipInfo)==null?void 0:P.publishKey,attributes:M.attributes,lineDescription:M.itemName}:{},unselected:H?{publishKey:(X=H.relationshipInfo)==null?void 0:X.publishKey,attributes:H.attributes,lineDescription:H.itemName}:{}};return await e.value.evaluateConfigurationSelection({request:JSON.stringify(K)})}async function W(M){const H={objectId:i.value,lstLIRequest:[{eCatalogItemId:M.Id,quantity:1,offerApplicable:M.offer}]};try{const V=await e.value.addLines({request:JSON.stringify(H)});console.info("addLines:result",V)}catch(V){return console.info("error",V.message),!1}}return{itemId:o,configuration:s,_configurationCopy:u,lineItem:c,savedScreen:p,loading:g,summary:x,addOns:C,summaryPrices:S,optionByItemId:A,attributesByQLIId:h,optionByPublishKey:I,showYearlyPricing:d,isYearlyPricingExist:y,isChangedConfiguration:_,isRecurringPricingSchema:m,configurableLineItems:v,initializeController:q,exposeProperties:k,updateCurrentConfiguration:E,changePricingScheme:R,addLines:W,resetConfigurator:F,getRecords:w,getProductCrossSells:$,initConfigurator:Z,maintainQuoteConfiguration:D,evaluateConfigSelection:j}}),Z9={class:"ect-p-4 ect-flex ect-gap-2 ect-items-center ect-justify-between ect-border-b ect-border-gray-200"},J9={class:"ect-flex ect-items-center ect-gap-3"},Y9={class:"ect-text-xl ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},e4={key:0,class:"ect-flex ect-gap-1.5 ect-items-center"},t4=b("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Saving configuration...",-1),n4={key:1,class:"ect-flex ect-gap-1.5 ect-items-center"},r4=b("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Configuration Saved Successfully",-1),i4={key:1,class:"ect-flex ect-flex-col ect-gap-4 ect-flex-1 ect-overflow-y-auto ect-mb-16"},o4=b("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed ect-p-4 ect-pb-0"},"You may consider these products",-1),a4={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},s4=["data-test-id"],l4={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},c4={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},u4={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},f4={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},d4={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},h4={key:2,class:"ect-flex ect-flex-col ect-gap-4 ect-m-4 ect-flex-1 ect-overflow-y-auto"},p4=b("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},"What do you want to do next?",-1),v4={class:"ect-flex ect-flex-col ect-gap-4"},g4=["data-test-id","onClick"],m4={class:"ect-flex ect-items-center ect-justify-center"},y4={class:"ect-flex ect-flex-col ect-items-center ect-gap-2 ect-w-full"},x4=["data-test-id"],_4=["data-test-id"],b4={key:3,class:"ect-bg-light-bg-x ect-border-t ect-border-gray-200 ect-flex-shrink-0 ect-sticky ect-bottom-0 ect-pb-4"},C4={class:"ect-flex ect-flex-col ect-gap-4"},w4={class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed ect-p-4 ect-pb-0"},E4={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},A4={class:"ect-bg-white ect-border ect-border-gray-300 ect-rounded-md ect-p-3 ect-flex ect-flex-col","data-test-id":"configurator-recommend-card-next-product"},k4={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},O4={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},S4={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},I4={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},T4={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},B4={__name:"ConfiguratorRecommend",setup(e){const n=dn(),t=sr(),r=fi(),i=me(()=>n.configuration),o=te(!0),a=te(""),s=te([{icon:"configuration",title:"Back to current Product Configuration",description:"Returns to the active product configuration page.",link:"/item/overview",action:"backToConfiguration"},{icon:"menu",title:"Back to Quote List Page",description:"Returns to the main quote list page.",link:"/quote-item",action:"backToQuoteList"}]),u=te(null),f=te([]),c=async p=>{p.loading=!0,await n.addLines(p),p.disabled=!0,p.loading=!1},v=p=>{p.action==="backToConfiguration"?n.savedScreen=!1:p.action==="backToQuoteList"?r.push("/quote-item?id="+t.quoteId):p.link&&r.push(p.link)};async function l(){const p=n.configurableLineItems,g=p.filter(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration").length;a.value=`(${p.length-g}/${p.length})`;const d=p.find(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration"&&m.Id!=n.qliId);return u.value=d?{Name:d.XX_ORD1__Line_Description__c,Description:d.XX_ORD1__Product_Description__c,Price:d.XX_ORD1__Sales_Price__c,XX_ORD1__Item__c:d.XX_ORD1__Item__c,Id:d.Id}:null,p}async function h(){n.resetConfigurator(),r.push({path:"/configurator/"+u.value.XX_ORD1__Item__c+"/"+u.value.Id}),n.initConfigurator(u.value.XX_ORD1__Item__c,u.value.Id)}return qn(async()=>{o.value=!0;const p=await l(),g=await n.getProductCrossSells(),d=new Set;p.forEach(m=>{d.add(m.XX_ORD1__Item__c)}),g.forEach(m=>{m.disabled=d.has(m.XX_ORD1__Item__c)}),f.value=g||[],o.value=!1}),(p,g)=>(U(),Y(be,null,[b("div",Z9,[b("div",J9,[he(We,{icon:"arrow",symbol:"",size:12,onClick:g[0]||(g[0]=d=>Fe(n).savedScreen=!1)}),b("h2",Y9,xe(i.value.itemName),1)]),Fe(n).loading.save?(U(),Y("div",e4,[he(ju,{svg:""}),t4])):(U(),Y("div",n4,[he(We,{icon:"check",color:"#136E05",size:14,"data-test-id":"item-tabs-before-button-icon"}),r4]))]),o.value?(U(),ke($u,{key:0,type:"recommendations",rows:4})):f.value.length>0?(U(),Y("div",i4,[o4,b("div",a4,[(U(!0),Y(be,null,Me(f.value,(d,m)=>(U(),Y("div",{key:d.Id||m,class:"ect-bg-white ect-border ect-border-gray-300 ect-rounded-md ect-p-3 ect-flex ect-flex-col","data-test-id":`configurator-recommend-card-${d.Id||m}`},[b("div",l4,[b("h4",c4,xe(d.Name),1),b("p",u4,xe(d.Description),1)]),b("div",f4,[b("div",d4,xe(Fe(Pt)(d.Price)),1),he(Ht,{btype:d.disabled?"secondary":"primary","button-style":d.disabled?"normal":"outlined",size:"medium",class:we({"ect-w-[120px]":d.loading}),loading:d.loading,disabled:d.disabled||d.loading,"data-test-id":`configurator-recommend-button-add-${d.Id||m}`,onClick:y=>c(d)},{default:Ve(()=>[Ne(xe(d.loading?"":d.disabled?"Added to Quote":"Add to Quote"),1)]),_:2},1032,["btype","button-style","class","loading","disabled","data-test-id","onClick"])])],8,s4))),128))])])):(U(),Y("div",h4,[p4,b("div",v4,[(U(!0),Y(be,null,Me(s.value,(d,m)=>(U(),Y("div",{key:d.title||m,class:"ect-bg-white ect-border ect-border-[#DEDEDE] ect-rounded-xl ect-p-4 md:ect-p-5 lg:ect-p-6 ect-flex ect-flex-col ect-items-center ect-gap-4 md:ect-gap-6 lg:ect-gap-8 ect-cursor-pointer ect-transition-all ect-duration-200 hover:ect-shadow-md hover:ect-border-gray-400","data-test-id":`configurator-recommend-redirect-card-${m}`,onClick:y=>v(d)},[b("div",m4,[he(We,{icon:d.icon,size:20,color:"#000000","data-test-id":`configurator-recommend-redirect-icon-${m}`},null,8,["icon","data-test-id"])]),b("div",y4,[b("h4",{class:"ect-text-sm ect-font-semibold ect-text-[#5F5F5F] ect-text-center ect-leading-[1.43]","data-test-id":`configurator-recommend-redirect-title-${m}`},xe(d.title),9,x4),b("p",{class:"ect-text-sm ect-font-normal ect-text-[#828282] ect-text-center ect-leading-[1.71]","data-test-id":`configurator-recommend-redirect-description-${m}`},xe(d.description),9,_4)])],8,g4))),128))])])),u.value?(U(),Y("footer",b4,[b("div",C4,[b("h3",w4," Configuere next product from your quote "+xe(a.value),1),b("div",E4,[b("div",A4,[b("div",k4,[b("h4",O4,xe(u.value.Name),1),b("p",S4,xe(u.value.Description),1)]),b("div",I4,[b("div",T4,xe(Fe(Pt)(u.value.Price)),1),he(Ht,{btype:"primary","button-style":"filled",size:"medium","data-test-id":"configurator-recommend-button-add-next-product",onClick:h},{default:Ve(()=>[Ne(" Configure Now ")]),_:1})])])])])])):ge("",!0)],64))}},D4=["data-test-id"],R4=Le({__name:"AppPill",props:{variant:{type:String,default:"",validator:e=>["success","error",""].includes(e)},dataTestId:{type:String,default:""}},setup(e){return(n,t)=>(U(),Y("span",{class:we(["ect-pill",{"ect-pill-success":e.variant==="success","ect-pill-error":e.variant==="error","ect-pill-default":!e.variant}]),"data-test-id":e.dataTestId},[Je(n.$slots,"default",{},void 0,!0)],10,D4))}},[["__scopeId","data-v-c7f05fa0"]]),L4=["data-test-id"],F4=["data-test-id"],N4=["data-test-id","onClick"],P4=["data-test-id"],M4=Le({__name:"AppTabsV2",props:{showTabs:{type:Boolean,default:!0},modelValue:{type:String,default:""},border:{type:Boolean,default:!1},tabs:{type:Array,required:!0,validator:e=>e.every(n=>typeof n=="object"&&n.title&&n.key&&(n.sections===void 0||Array.isArray(n.sections)))},dataTestId:{type:String,required:!0}},emits:["update:modelValue","tab-change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>{var a;return t.modelValue||((a=t.tabs[0])==null?void 0:a.key)||""}),o=a=>{r("update:modelValue",a),r("tab-change",a)};return(a,s)=>(U(),Y("div",{class:"ect-page-tabs","data-test-id":e.dataTestId},[e.showTabs?(U(),Y("div",{key:0,class:we(["ect-page-tabs-header",[{"ect-tab-border":e.border}]]),"data-test-id":`${e.dataTestId}-header`},[(U(!0),Y(be,null,Me(e.tabs,u=>(U(),Y("button",{key:u.key,class:we(["ect-page-tab-button",`ect-page-tab-button${i.value===u.key?"-active":""} ${u.tabClass||""}`]),"data-test-id":`${e.dataTestId}-tab-${u.key}`,onClick:f=>o(u.key)},[Ne(xe(u.title)+" ",1),u.pill!==void 0&&u.pill!==null?(U(),ke(R4,{key:0,class:"ect-ml-2",variant:u.pillStyle,"data-test-id":`${e.dataTestId}-tab-${u.key}-pill`},{default:Ve(()=>[Ne(xe(u.pill),1)]),_:2},1032,["variant","data-test-id"])):ge("",!0)],10,N4))),128))],10,F4)):ge("",!0),b("div",{class:"ect-page-tab-content","data-test-id":`${e.dataTestId}-content`},null,8,P4)],8,L4))}},[["__scopeId","data-v-f22cb1ed"]]),q4=["data-test-id"],$4=["disabled","data-test-id"],j4=["value","disabled","data-test-id"],H4=["disabled","data-test-id"],Do={__name:"CounterButton",props:{value:{type:Number,required:!0,default:null},min:{type:Number,default:1},max:{type:Number,default:999},empty:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:value","change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.min==null?0:t.min),o=me(()=>t.max==null?999:t.max),a=(x,C,S)=>Math.min(Math.max(x,C),S),s=x=>{if(x==null||x==="")return NaN;const C=Number(x);return Number.isFinite(C)?C:NaN},u=te(null),f=te(t.value??i.value),c=x=>{f.value=a(x,i.value,o.value)};t.value!==null&&c(t.value);const v=me(()=>f.value),l=me(()=>u.value!=null?u.value:String(v.value)),h=me(()=>t.disabled||v.value<=i.value),p=me(()=>t.disabled||v.value>=o.value);function g(x){x!==t.value&&(f.value=x,r("update:value",x),r("change",x))}function d(){if(h.value)return;const x=a(v.value-1,i.value,o.value);u.value=null,g(x)}function m(){if(p.value)return;const x=a(v.value+1,i.value,o.value);u.value=null,g(x)}function y(x){const S=String(x.target.value??"").replace(/\D+/g,"");u.value=S}function _(){const x=s(u.value),C=i.value,S=a(Number.isNaN(x)?C:x,i.value,o.value);u.value=null,g(S)}return(x,C)=>(U(),Y("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":e.dataTestId},[b("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":h.value,"ect-cursor-not-allowed":h.value}]),disabled:h.value,"data-test-id":`${e.dataTestId}-decrement`,onClick:d}," - ",10,$4),b("input",{type:"text",inputmode:"numeric",pattern:"[0-9]*",value:e.empty?"":l.value,disabled:e.disabled,class:"ect-h-7 ect-w-[48px] ect-px-2 ect-border ect-border-gray ect-rounded-md ect-text-center ect-text-sm ect-font-medium ect-text-gray-900 focus:ect-outline-none focus:ect-border-gray-400 ect-bg-white","data-test-id":`${e.dataTestId}-input`,onInput:y,onBlur:_},null,40,j4),b("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":p.value,"ect-cursor-not-allowed":p.value}]),disabled:p.value,"data-test-id":`${e.dataTestId}-increment`,onClick:m}," + ",10,H4)],8,q4))}},V4={class:"ect-flex ect-justify-end ect-items-center ect-gap-2.5 ect-px-6 ect-py-4 ect-bg-white ect-border-t ect-border-gray-300 ect-shadow-[0_-2px_4px_0px_rgba(0,0,0,0.11)]","data-test-id":"configurator-footer"},U4={"data-test-id":"configurator-footer-quantity"},z4={class:"ect-flex ect-justify-end ect-items-center ect-gap-6 ect-px-8 ect-py-0 ect-flex-1","data-test-id":"configurator-footer-prices"},K4=["data-test-id"],X4=["data-test-id"],W4=["data-test-id"],G4=["data-test-id"],Q4={__name:"ConfiguratorFooter",props:{item:{type:Object,required:!0,default:()=>{}},disabled:{type:Boolean,default:!1},btnText:{type:String,default:"Save"}},emits:["update:qty","continue"],setup(e,{emit:n}){const t=dn(),r=e,i=te(r.item),o=me(()=>{const u=t.summaryPrices,f=[];return t.isRecurringPricingSchema?(f.push({label:"One Time Price",value:u.oneTimePrice,highlight:!1}),f.push({label:t.showYearlyPricing?"Yearly Price":"Monthly Price",value:u.recurringPrice,highlight:!1})):(f.push({label:"Base Price",value:u.basePrice,highlight:!1}),f.push({label:"Add Ons",value:u.addOns,highlight:!1}),f.push({label:"Total Price",value:u.total,highlight:!1})),f}),a=n,s=()=>{r.disabled||a("continue")};return(u,f)=>(U(),Y("footer",V4,[b("div",U4,[he(Do,{value:i.value.qty,"onUpdate:value":f[0]||(f[0]=c=>i.value.qty=c),min:1,max:999,disabled:e.disabled,"is-selected":!0,"data-test-id":"configurator-footer-counter-button"},null,8,["value","disabled"])]),b("div",z4,[(U(!0),Y(be,null,Me(o.value,(c,v)=>(U(),Y(be,{key:v},[b("div",{class:"ect-flex ect-flex-col ect-justify-center","data-test-id":`configurator-footer-price-${v}`},[b("span",{class:"ect-text-xs ect-font-normal ect-text-gray-500 ect-text-left","data-test-id":`configurator-footer-price-label-${v}`},xe(c.label),9,X4),b("span",{class:we(["ect-text-left",c.highlight?"ect-text-lg ect-font-bold ect-text-green-700":"ect-text-sm ect-font-medium ect-text-gray-800 "]),"data-test-id":`configurator-footer-price-value-${v}`},xe(Fe(Pt)(c.value)),11,W4)],8,K4),v<o.value.length-1?(U(),Y("div",{key:0,class:"ect-w-0 ect-h-5 ect-border-l ect-border-gray-400","data-test-id":`configurator-footer-divider-${v}`},null,8,G4)):ge("",!0)],64))),128))]),he(Ht,{class:"ect-min-w-[100px]",btype:e.disabled?"secondary":"primary",disabled:e.disabled,"button-style":"primary",size:"medium","data-test-id":"configurator-footer-button-continue",onClick:s},{default:Ve(()=>[Ne(xe(e.btnText),1)]),_:1},8,["btype","disabled"])]))}},Z4={class:"ect-w-full ect-bg-white ect-mb-4","data-test-id":"configurator-type-section"},J4={class:"ect-sticky ect-top-0 ect-z-30 ect-bg-white ect-shadow-sm ect-p-3 ect-px-4 ect-border-b ect-border-gray-200 ect-flex ect-justify-between ect-items-center","data-test-id":"configurator-type-header-sticky"},Y4={class:"ect-flex ect-flex-col"},e6={class:"ect-font-bold ect-text-text-success ect-leading-tight"},t6=["innerHTML"],n6={key:0,class:"ect-flex ect-items-center ect-gap-2 ect-px-2 ect-py-1","data-test-id":"configurator-type-message"},r6={class:"ect-text-xs ect-font-medium ect-text-gray-600 ect-leading-tight ect-min-w-[190px]"},i6={class:"ect-divide-y ect-divide-gray-100 ect-overflow-y-auto"},o6={__name:"ConfiguratorType",props:{title:{type:String,required:!0},description:{type:String,default:""},message:{type:String,default:""}},setup(e){return(n,t)=>(U(),Y("section",Z4,[b("header",J4,[b("div",Y4,[b("h2",e6,xe(e.title),1),e.description?(U(),Y("p",{key:0,class:"ect-mt-1 ect-text-xs ect-text-gray-500 ect-leading-tight",innerHTML:e.description},null,8,t6)):ge("",!0)]),e.message?(U(),Y("div",n6,[he(We,{icon:"info",symbol:"",color:"#198708",size:14,"data-test-id":"configurator-type-message-icon"}),b("span",r6,xe(e.message),1)])):ge("",!0)]),b("div",i6,[Je(n.$slots,"default")])]))}},a6={__name:"ShadowDisplay",props:{content:{type:String,required:!0}},setup(e){const n=e,t=te(null);let r=null;return Nt(()=>{t.value&&!r&&(r=t.value.attachShadow({mode:"open"}),r.innerHTML=n.content)}),Ye(()=>n.content,i=>{r&&(r.innerHTML=i)}),(i,o)=>(U(),Y("div",{ref_key:"host",ref:t},null,512))}},s6=["data-test-id"],l6=["data-test-id"],c6=["data-test-id"],u6=[b("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("g",{id:"Group"},[b("path",{id:"Vector",d:"M7 1.3125V12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"}),b("path",{id:"Vector_2",d:"M1.3125 7H12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)],f6=["data-test-id"],d6=["data-test-id"],h6=["data-test-id"],p6=["data-test-id"],v6=["data-test-id"],g6=["data-test-id","innerHTML"],hn={__name:"Tag",props:{label:{type:String,default:""},value:{type:String,default:""},addButton:{type:Boolean,default:!1},editButton:{type:Boolean,default:!1},dataTestId:{type:String,default:""}},setup(e){const n=e,t=me(()=>{const r=n.value;if(typeof r!="string")return!1;const i=new DOMParser().parseFromString(r,"text/html");return Array.from(i.body.childNodes).some(o=>o.nodeType===1)});return(r,i)=>e.addButton?(U(),Y("div",{key:0,class:"ect-bg-orange-4 ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-orange-secondary","data-test-id":e.dataTestId},[b("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-orange-secondary ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},[b("div",{"data-test-id":`${e.dataTestId}-add-icon`},u6,8,c6),Ne(" "+xe(e.label),1)],8,l6)],8,s6)):e.editButton?(U(),Y("div",{key:1,class:"ect-bg-white ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-success","data-test-id":e.dataTestId},[b("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-success ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},xe(e.label),9,d6)],8,f6)):(U(),Y("div",{key:2,class:"ect-bg-white ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-rounded-md ect-border ect-border-solid ect-border-neutral-200","data-test-id":e.dataTestId},[b("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-label`},xe(e.label),9,p6),e.value?(U(),Y("span",{key:0,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-separator`}," : ",8,v6)):ge("",!0),t.value?(U(),ke(a6,{key:1,content:e.value},null,8,["content"])):e.value?(U(),Y("span",{key:2,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-neutral-700","data-test-id":`${e.dataTestId}-value`,innerHTML:e.value},null,8,g6)):ge("",!0)],8,h6))}},m6=["data-test-id"],y6=["data-test-id"],x6=["data-test-id"],_6=["type","step","min","data-test-id"],fs=Le({__name:"InputEdit",props:{modelValue:{type:[String,Number],required:!0},type:{type:String,default:"string",validator:e=>["string","number","currency"].includes(e)},tag:{type:String,default:"span"},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:modelValue","change"],setup(e,{expose:n,emit:t}){const r=e,i=t,o=te(!1),a=te(!1),s=te(""),u=te(null),f=me(()=>r.type==="currency"?m(r.modelValue):r.type==="number"?y(r.modelValue):r.modelValue),c=me(()=>r.type==="string"?"text":"number"),v=me(()=>r.type==="currency"?"0.01":void 0),l=me(()=>r.type==="currency"?"0":void 0),h=()=>{r.disabled||(r.type==="currency"?s.value=parseFloat(r.modelValue)||"0.00":r.type==="number"?s.value=parseFloat(r.modelValue)||"0":s.value=r.modelValue,o.value=!0,sn(()=>{u.value&&(u.value.focus(),u.value.select())}))},p=()=>{let _=s.value;if(r.type==="number"||r.type==="currency"){const x=parseFloat(s.value);isNaN(x)?_=r.modelValue:_=r.type==="currency"?x.toFixed(2):x.toString()}_!==r.modelValue&&(i("update:modelValue",_),i("change",_)),o.value=!1},g=()=>{s.value=r.modelValue,o.value=!1},d=()=>{o.value&&p()},m=_=>!_||isNaN(_)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(parseFloat(_)),y=_=>!_||isNaN(_)?"0":new Intl.NumberFormat("en-US").format(parseFloat(_));return Ye(()=>r.modelValue,_=>{o.value||(s.value=_)}),n({startEditing:h,saveChanges:p,cancelEditing:g}),(_,x)=>{const C=a1("click-outside");return U(),Y("div",{class:"ect-relative ect-inline-block ect-min-w-[60px] ect-h-[30px]","data-test-id":e.dataTestId,onMouseenter:x[1]||(x[1]=S=>a.value=!0),onMouseleave:x[2]||(x[2]=S=>a.value=!1)},[o.value?ln((U(),Y("div",{key:1,class:"ect-w-full ect-h-full","data-test-id":`${e.dataTestId}-input-wrapper`},[ln(b("input",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":x[0]||(x[0]=S=>s.value=S),type:c.value,step:v.value,min:l.value,class:we(["ect-w-full ect-h-full ect-px-3 ect-bg-white ect-border ect-border-green-500 ect-rounded-sm ect-text-gray-700 ect-text-base ect-font-sans ect-outline-none ect-duration-200",_.$attrs.class]),"data-test-id":`${e.dataTestId}-input`,onKeyup:[ir(p,["enter"]),ir(g,["esc"])],onBlur:p},null,42,_6),[[Ah,s.value]])],8,x6)),[[C,d]]):(U(),Y("div",{key:0,class:we(["ect-flex ect-items-center ect-gap-2 ect-rounded ect-transition-colors ect-duration-200",{"ect-cursor-pointer":!e.disabled}]),"data-test-id":`${e.dataTestId}-display`,onClick:h},[(U(),ke(Wi(e.tag),ao(_.$attrs,{class:"ect-m-0 ect-text-inherit","data-test-id":`${e.dataTestId}-text`}),{default:Ve(()=>[Ne(xe(f.value)+" ",1),he(We,{class:we(a.value&&!e.disabled?"ect-visible":"ect-invisible"),icon:"edit",size:"12",color:"#828282","data-test-id":`${e.dataTestId}-edit-icon`},null,8,["class","data-test-id"])]),_:1},16,["data-test-id"]))],10,y6))],40,m6)}}},[["__scopeId","data-v-5cd60070"]]),b6=["data-test-id","data-publish-key"],C6={key:0,class:"ect-text-xs ect-text-gray-500 ect-text-white ect-font-medium ect-leading-tight ect-absolute ect-top-[-.7rem] ect-left-[-1rem] ect-bg-text-success ect-rounded-xl ect-px-2 ect-py-1"},w6={key:1,class:"ect-flex ect-items-start ect-gap-4 ect-p-3 ect-px-4"},E6={key:0,class:"ect-w-16 ect-h-16 ect-flex ect-items-center ect-justify-center ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0"},A6=["src","alt"],k6={class:"ect-flex-1 ect-min-w-0"},O6={class:"ect-flex ect-gap-4 ect-items-center ect-justify-between"},S6={class:"ect-flex ect-flex-row ect-gap-3"},I6=b("div",{class:"ect-w-px ect-h-auto ect-bg-gray-200 ect-mx-2"},null,-1),T6={class:"ect-flex ect-flex-col ect-max-w-[125px]"},B6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},D6=["innerHTML"],R6={key:0,class:"ect-flex ect-flex-wrap ect-gap-2.5 ect-mt-2"},L6=["data-test-id"],F6=["data-test-id"],N6={key:1,class:"ect-inline-block ect-mb-2"},P6={key:2,class:"ect-flex ect-flex-col ect-gap-3 ect-p-3 ect-h-full ect-justify-between"},M6={class:"ect-flex ect-items-start ect-gap-2"},q6={key:0,class:"ect-w-16 ect-h-16 ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0 ect-overflow-hidden"},$6=["src","alt"],j6={class:"ect-flex-1 ect-min-w-0"},H6={class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},V6=["innerHTML"],U6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},z6={key:0,class:"ect-flex ect-flex-wrap ect-gap-1.5"},K6=["data-test-id"],X6=["data-test-id"],W6={key:1,class:"ect-inline-block ect-mb-2"},G6={class:"ect-flex ect-justify-between ect-items-center"},Q6={class:"ect-flex ect-flex-col"},Z6=b("p",{class:"ect-text-xs ect-text-gray-500 ect-font-medium ect-leading-tight"},"Price",-1),J6={key:3,"data-test-id":"configurator-item-slot-details",class:"ect-bg-white ect-rounded-md"},Y6={__name:"ConfiguratorItem",props:{item:{type:Object,required:!0},name:{type:String,required:!0},description:{type:String,default:""},imageUrl:{type:String,default:""},price:{type:Number,required:!0},quantity:{type:Number,default:1},selected:{type:Boolean,default:!1},tags:{type:Array,default:()=>[]},attributes:{type:Array,default:()=>[]},size:{type:Number,default:1},minQuantity:{type:Number,default:null},maxQuantity:{type:Number,default:null},showImage:{type:Boolean,default:!1},option:{type:Object,default:null},isAttributes:{type:Boolean,default:!1},showAttributes:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:quantity","update:name","edit-attributes"],setup(e,{emit:n}){const t=e,r=n,i=te(null),o=te(0),a=te(t.item),s=me(()=>a.value.relationshipInfo.relationship==="Kit"?"ect-bg-green-3 ect-border-gray-200 ect-border-success":t.disabled?"ect-bg-light-bg-x ect-border-gray-200":t.selected?"ect-bg-green-3 ect-border-gray-200 ect-border-success":"ect-bg-white ect-border-gray-200 hover:ect-border-success"),u=me({get:()=>t.quantity,set:p=>r("update:quantity",p)}),f=me({get:()=>t.name,set:p=>r("update:name",p)}),c=p=>{r("update:quantity",p)},v=me(()=>{if(o.value===0)return t.tags;const g=Math.floor(o.value/120);return t.tags.slice(0,Math.max(1,g))}),l=me(()=>Math.max(0,t.tags.length-v.value.length)),h=()=>{if(i.value){const p=i.value,g=80,d=120,m=32,y=64;o.value=p.offsetWidth-g-d-m-y}};return Nt(()=>{sn(()=>{h()})}),Ye(()=>t.tags,()=>{sn(()=>{h()})},{deep:!0}),Nt(()=>{window.addEventListener("resize",h)}),(p,g)=>(U(),Y("div",{ref_key:"containerRef",ref:i,class:we(["ect-w-full ect-rounded-md ect-border-1 ect-transition-colors ect-relative",s.value]),"data-test-id":`configurator-item-${e.item.itemId}`,"data-publish-key":e.item.publishKey},[e.item.relationshipInfo.relationship==="Kit"?(U(),Y("div",C6," KIT ")):ge("",!0),e.size===1?(U(),Y("div",w6,[e.showImage?(U(),Y("div",E6,[e.imageUrl?(U(),Y("img",{key:0,src:e.imageUrl,alt:f.value,class:"ect-w-full ect-h-full ect-object-cover"},null,8,A6)):(U(),ke(We,{key:1,disabled:"",icon:"image",symbol:"",size:20,color:"#ACACAC"}))])):ge("",!0),b("div",k6,[b("div",O6,[he(fs,{modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=d=>f.value=d),tag:"h3","data-test-id":"itemId"+e.item.itemId,class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},null,8,["modelValue","data-test-id"]),b("div",S6,[b("div",{onClick:g[2]||(g[2]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[1]||(g[1]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),I6,b("div",T6,[he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[3]||(g[3]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])]),b("div",B6,[Je(p.$slots,"selection-control")])])]),b("p",{class:"ect-mt-2 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,D6),e.isAttributes&&e.showAttributes&&e.selected?(U(),Y("div",R6,[a.value.getTags().length>0?(U(),Y(be,{key:0},[(U(!0),Y(be,null,Me(v.value,(d,m)=>(U(),Y("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(U(),Y("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[4]||(g[4]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,L6)):ge("",!0),e.selected?(U(),Y("button",{key:1,"data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[5]||(g[5]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,F6)):ge("",!0)],64)):(U(),Y("span",N6,[b("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[6]||(g[6]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0)])])):(U(),Y("div",P6,[b("div",M6,[e.showImage?(U(),Y("div",q6,[e.imageUrl?(U(),Y("img",{key:0,src:e.imageUrl,alt:e.name,class:"ect-w-full ect-h-full ect-object-cover"},null,8,$6)):ge("",!0)])):ge("",!0),b("div",j6,[b("h3",H6,xe(e.name),1),b("p",{class:"ect-mt-1 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,V6)]),b("div",U6,[Je(p.$slots,"selection-control")])]),e.isAttributes&&e.showAttributes&&e.selected?(U(),Y("div",z6,[a.value.getTags().length>0?(U(),Y(be,{key:0},[(U(!0),Y(be,null,Me(v.value,(d,m)=>(U(),Y("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(U(),Y("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[7]||(g[7]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,K6)):ge("",!0),e.selected?(U(),Y("button",{key:1,class:"ect-ml-auto","data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[8]||(g[8]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,X6)):ge("",!0)],64)):(U(),Y("span",W6,[b("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[9]||(g[9]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0),b("div",G6,[b("div",{onClick:g[11]||(g[11]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[10]||(g[10]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),b("div",Q6,[Z6,he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[12]||(g[12]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-w-[125px] ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])])])])),e.selected&&e.isAttributes?(U(),Y("div",J6,[Je(p.$slots,"default")])):ge("",!0)],10,b6))}},e8={"af-ZA":",","sq-AL":",","ar-DZ":",","ar-BH":"٫","ar-EG":"٫","ar-IQ":"٫","ar-JO":"٫","ar-KW":"٫","ar-LB":"٫","ar-LY":",","ar-MA":",","ar-OM":"٫","ar-QA":"٫","ar-SA":"٫","ar-SD":"٫","ar-SY":"٫","ar-TN":",","ar-AE":"٫","ar-YE":"٫","hy-AM":",","az-AZ":",","bn-BD":".","bn-IN":".","eu-ES":",","be-BY":",","bs-BA":",","bg-BG":",","my-MM":".","ca-ES":",","ca-ES-EURO":",","zh-CN":".","zh-CN-PINYIN":".","zh-CN-STROKE":".","zh-HK":".","zh-HK-STROKE":".","zh-MO":".","zh-SG":".","zh-TW":".","zh-TW-STROKE":".","hr-HR":",","cs-CZ":",","da-DK":",","nl-AW":",","nl-BE":",","nl-NL":",","nl-SR":",","dz-BT":".","en-AG":".","en-AU":".","en-BS":".","en-BB":".","en-BZ":".","en-BM":".","en-BW":".","en-CM":".","en-CA":".","en-DE":",","en-KY":".","en-ER":".","en-FK":".","en-FJ":".","en-GM":".","en-GH":".","en-GI":".","en-GY":".","en-HK":".","en-IN":".","en-ID":".","en-IE":".","en-IE-EURO":".","en-JM":".","en-KE":".","en-LR":".","en-MG":".","en-MW":".","en-MY":".","en-MU":".","en-NA":".","en-NZ":".","en-NG":".","en-PK":".","en-PG":".","en-PH":".","en-RW":".","en-WS":".","en-SC":".","en-SL":".","en-SG":".","en-SX":".","en-SB":".","en-ZA":",","en-SH":".","en-SZ":".","en-TZ":".","en-TO":".","en-TT":".","en-UG":".","en-GB":".","en-US":".","en-VU":".","et-EE":",","fi-FI":",","fi-FI-EURO":",","fr-BE":",","fr-CA":",","fr-KM":",","fr-FR":",","fr-FR-EURO":",","fr-GN":",","fr-HT":",","fr-LU":",","fr-MR":",","fr-MC":",","fr-CH":",","fr-WF":",","ka-GE":",","de-AT":",","de-AT-EURO":",","de-BE":",","de-DE":",","de-DE-EURO":",","de-LU":",","de-LU-EURO":",","de-CH":".","el-GR":",","gu-IN":".","iw-IL":".","hi-IN":".","hu-HU":",","is-IS":",","in-ID":",","ga-IE":".","it-IT":",","it-CH":".","ja-JP":".","kn-IN":".","kk-KZ":",","km-KH":",","ko-KP":".","ko-KR":".","ky-KG":",","lo-LA":",","lv-LV":",","lt-LT":",","lu-CD":",","lb-LU":",","mk-MK":",","ms-BN":",","ms-MY":".","ml-IN":".","mt-MT":".","mi-NZ":".","mr-IN":".","ne-NP":".","no-NO":",","ps-AF":"٫","fa-IR":"٫","pl-PL":",","pt-AO":",","pt-BR":",","pt-CV":",","pt-MZ":",","pt-PT":",","pt-ST":",","ro-MD":",","ro-RO":",","rm-CH":".","rn-BI":",","ru-KZ":",","ru-RU":",","sr-BA":",","sr-RS":",","sh-BA":",","sh-ME":",","sh-ME-USD":",","sh-CS":",","sk-SK":",","sl-SI":",","so-DJ":".","so-SO":".","es-AR":",","es-BO":",","es-CL":",","es-CO":",","es-CR":",","es-CU":".","es-DO":".","es-EC":",","es-SV":".","es-GT":".","es-HN":".","es-MX":".","es-NI":".","es-PA":".","es-PY":",","es-PE":".","es-PR":".","es-ES":",","es-ES-EURO":",","es-US":".","es-UY":",","es-VE":",","sw-KE":".","sv-SE":",","tl-PH":".","tg-TJ":",","ta-IN":".","ta-LK":".","te-IN":".","th-TH":".","ti-ET":".","tr-TR":",","uk-UA":",","ur-PK":".","uz-LATN-UZ":",","vi-VN":",","cy-GB":".","xh-ZA":".","yo-BJ":".","zu-ZA":"."},t8={name:"CustomInput",components:{AppIcon:We},props:{editMode:{type:Boolean,default:!0},type:{type:String,default:"text"},max:{type:Number,default:500},label:{type:String,default:""},name:{type:String,default:""},showLabel:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},isReadOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},highlight:{type:Boolean,default:!1},placeholder:{type:String,default:""},error:{type:[Boolean,String],default:!1},cssClass:{type:Object,default:()=>({})},tooltip:{type:String,default:null},locale:{type:String,default:"en-US"},icon:{type:String,default:null},itooltip:{type:String,default:null},icolor:{type:String,default:"#7d7d7d"},ihover:{type:String,default:"#57c046"},icustom:{type:Boolean,default:!1},idisabled:{type:Boolean,default:!1},height:{type:Number,default:32},textAlignment:{type:String,default:"left"},decimalPrecision:{type:Number,default:0},allowNegatives:{type:Boolean,default:!1},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["update:modelValue","iclick","blur"],data(){return{initialValue:"",decimalSeprator:".",ctrl:!1}},computed:{getValue(){return this.modelValue?this.type==="currency"?String(this.modelValue).replace(".",this.decimalSeprator):String(this.modelValue):""},error_message(){return typeof this.error=="string"?this.error:this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},isHighlight(){return(this.initialValue===""||this.initialValue===null)&&(this.modelValue===""||this.modelValue===null)?!1:this.initialValue!==this.modelValue}},created(){this.initialValue=this.modelValue,this.decimalSeprator=this.type==="currency"?e8[this.locale]:"."},methods:{handlerInput(e){const n=e.target.value;this.type==="currency"?this.$emit("update:modelValue",n.replace(this.decimalSeprator,".")):this.$emit("update:modelValue",n)},preventNonNumeric(e){if(this.type==="number"){const n=this.decimalPrecision,t=e.target.value,r=e.key;if(["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(r)||this.allowNegatives&&r==="-")return;if(r==="."&&n===0){e.preventDefault();return}if(r==="."&&t.includes(".")){e.preventDefault();return}if(r==="."||t.includes(".")&&!t.endsWith(".")&&r!=="Backspace"){const i=t.split(".");if(i.length>1&&i[1].length>=n){e.preventDefault();return}}if(isNaN(r)&&![".","Backspace","Tab"].includes(r)){e.preventDefault();return}}if(e.key==="Backspace"||this.ctrl)return!0;if(e.key==="Control"&&(this.ctrl=!0),this.type==="currency"||this.type==="number"){if(!this.getValue.includes(this.decimalSeprator)&&e.key===this.decimalSeprator)return!0;/[\deE+\-]/.test(e.key)||e.preventDefault()}return!0},handlerKeyup(e){e.key==="Control"&&(this.ctrl=!1)}}},n8=["data-test-id"],r8=["for","data-test-id"],i8=["data-test-id"],o8=["id","type","name","disabled","placeholder","value","maxlength","readonly","data-test-id"],a8=["data-test-id"],s8=["data-test-id"];function l8(e,n,t,r,i,o){const a=er("AppIcon");return U(),Y("div",{class:"input","data-test-id":t.dataTestId},[t.label&&t.showLabel?(U(),Y("label",{key:0,class:we({error_color:!!t.error}),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Ne(xe(t.label)+" ",1),t.required?(U(),Y("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,r8)):ge("",!0),t.editMode?(U(),Y("div",{key:1,class:we(["input-wrapper ect-w-full",{errorBorder_color:!!t.error,highlight:o.isHighlight&&t.highlight}]),"data-test-id":`${t.dataTestId}-wrapper`},[t.icon?(U(),ke(a,{key:0,class:"input-wrapper_icon",icon:t.icon,hover:t.ihover,color:t.icolor,size:19,disabled:t.idisabled,custom:t.icustom,tooltip:t.itooltip,"data-test-id":`${t.dataTestId}-icon`,direction:"top-right",onClick:n[0]||(n[0]=s=>e.$emit("iclick"))},null,8,["icon","hover","color","disabled","custom","tooltip","data-test-id"])):ge("",!0),b("input",{id:t.label,class:we(`ectheme-input-box ${t.size}`),type:t.type,style:ze({width:t.icon?"calc(100% - 36px)":"100%",height:`${t.height}px`,textAlign:t.textAlignment}),name:t.name,disabled:t.disabled,placeholder:t.placeholder,value:o.getValue,maxlength:t.max,readonly:t.isReadOnly,"data-test-id":`${t.dataTestId}-input`,onInput:n[1]||(n[1]=(...s)=>o.handlerInput&&o.handlerInput(...s)),onKeydown:n[2]||(n[2]=(...s)=>o.preventNonNumeric&&o.preventNonNumeric(...s)),onKeyup:n[3]||(n[3]=(...s)=>o.handlerKeyup&&o.handlerKeyup(...s)),onBlur:n[4]||(n[4]=s=>e.$emit("blur"))},null,46,o8)],10,i8)):ge("",!0),t.editMode?ge("",!0):(U(),Y("p",{key:2,class:"value","data-test-id":`${t.dataTestId}-value`},xe(o.getValue),9,a8)),o.error_message?(U(),Y("div",{key:3,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,s8)):ge("",!0)],8,n8)}const c8=Le(t8,[["render",l8],["__scopeId","data-v-032ca141"]]),u8={name:"AtomSpinner",props:{dataTestId:{type:String,default:""}}},f8=["data-test-id"];function d8(e,n,t,r,i,o){return U(),Y("div",{class:"spinner","data-test-id":t.dataTestId},null,8,f8)}const h8={name:"CustomDropdown",components:{AppIcon:We,AtomSpinner:Le(u8,[["render",d8],["__scopeId","data-v-771ed032"]])},props:{label:{type:String,default:""},placeholder:{type:String,default:""},options:{type:Array,default:()=>[]},display:{type:Array,default:()=>[]},modelValue:{type:String,default:""},error:{type:[Boolean,String],default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},select:{type:Boolean,default:!1},lookup:{type:Boolean,default:!1},search:{type:Boolean,default:!1},badge:{type:String,default:void 0},highlight:{type:Boolean,default:!1},property:{type:Object,default:()=>({key:"value",value:"label",assigned:"assigned"})},dropdownTheme:{type:String,default:"light"},icon:{type:String,default:""},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["search","focus-in","focus-out","update:modelValue"],data:()=>({inputFocused:!1,value:"",isHover:!1,highlightedIndex:-1,initialValue:"",teleportStyle:{position:"absolute",top:"0px",left:"0px",width:"0px"}}),computed:{isHighlight(){return(this.initialValue===""||this.initialValue==null)&&(this.modelValue===""||this.modelValue==null)?!1:this.initialValue!==this.modelValue},error_message(){return this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},getOptions(){if(this.select&&this.search){const e=this.value.toLowerCase();return this.options.filter(n=>JSON.stringify(n).toLowerCase().includes(e))}else return this.options},getSelected(){let e=null;if(this.modelValue)e=this.options.find(n=>n[this.property.key]===this.modelValue);else if(!this.search){const n=this.options.find(t=>t[this.property.key]==="");n?e=n:this.placeholder?e={[this.property.value]:this.placeholder,[this.property.key]:""}:e={[this.property.value]:"--Select--",[this.property.key]:""}}return e||{[this.property.value]:this.placeholder||"--Select--",[this.property.key]:""}},shouldShowAbove(){if(!this.$refs.triggerElement)return!1;const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top;return t<n&&r>n},dropdownStyle(){if(!this.$refs.triggerElement)return{};const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;return{position:"absolute",top:i?"auto":"100%",bottom:i?"100%":"auto",left:"0",width:"100%",zIndex:1e3}}},created(){this.initialValue=this.modelValue},mounted(){window.addEventListener("resize",this.updateDropdownPosition),window.addEventListener("scroll",this.updateDropdownPosition,!0)},beforeUnmount(){window.removeEventListener("resize",this.updateDropdownPosition),window.removeEventListener("scroll",this.updateDropdownPosition,!0)},methods:{updateDropdownPosition(){if(!this.$refs.triggerElement)return;const e=this.$refs.triggerElement.getBoundingClientRect(),n=200,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;this.teleportStyle={position:"absolute",top:`${i?e.top-n:e.bottom}px`,left:`${e.left}px`,width:`${e.width}px`,zIndex:9999}},subFieldsText(e){if(!this.display||this.display.length<1)return"";const n=[];return this.display.forEach(t=>{const r=this.subField(e,t);r&&n.push(r)}),n.join(" | ")},subField(e,n){return n?n.split(".").reduce((i,o)=>i[o]||"",e):e},lookupSearchHandler:or(function(e){this.value=e,this.search&&!this.select&&this.$emit("search",e)}),handlerFocusIn(){!(this.modelValue&&this.search)&&!this.disabled&&(this.inputFocused=!0,this.updateDropdownPosition(),this.$emit("focus-in"))},updateSelected(e){e&&(this.value="",this.$emit("update:modelValue",e[this.property.key]),this.search&&!this.select&&!this.lookup&&this.$emit("search",""),this.onInputFocusedOut(!0))},clear(){this.disabled||(this.value="",this.$emit("update:modelValue",null),this.search&&!this.select&&!this.lookup&&this.$emit("search",""))},onInputFocusedOut(e=!1){(!this.isHover||e)&&!this.disabled&&(e?(this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")):setTimeout(()=>{this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")},100))},highlightNextOption(){this.highlightedIndex<this.options.length-1&&this.highlightedIndex++},highlightPreviousOption(){this.highlightedIndex>0&&this.highlightedIndex--}}},p8=["data-test-id"],v8=["for","data-test-id"],g8={class:"input-container-box ect-grow ect-w-full"},m8=["data-test-id"],y8=["placeholder","disabled","data-test-id"],x8=["data-test-id"],_8=["title","data-test-id"],b8=["data-test-id"],C8=["data-test-id"],w8=["data-test-id"],E8=["data-test-id"],A8=["data-test-id","onClick"],k8=["data-test-id"],O8={class:"ect-text-font-clr-light ect-flex ect-gap-2 ect-items-center ect-justify-between ect-w-full"},S8=["data-test-id"],I8=["data-test-id"],T8=["data-test-id"],B8=["title","data-test-id"],D8=["data-test-id"];function R8(e,n,t,r,i,o){const a=er("AppIcon"),s=er("AtomSpinner");return U(),Y("div",{ref:"dropdownWrapper",class:we(["customdropdown input-container",{dark:t.dropdownTheme==="dark"}]),"data-test-id":t.dataTestId,onMouseenter:n[7]||(n[7]=u=>e.isHover=!0),onMouseleave:n[8]||(n[8]=u=>e.isHover=!1)},[t.label?(U(),Y("label",{key:0,class:we(["title_label",{error_color:!!t.error}]),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Ne(xe(t.label)+" ",1),t.required?(U(),Y("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,v8)):ge("",!0),b("div",g8,[b("div",{ref:"triggerElement",class:we(["input-wrapper ectheme-input-box ect-w-full",{disabled:t.disabled,"input-error":t.error,highlight:o.isHighlight&&t.highlight,"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-trigger`,tabindex:"0",onFocusin:n[2]||(n[2]=(...u)=>o.handlerFocusIn&&o.handlerFocusIn(...u)),onFocusout:n[3]||(n[3]=u=>o.onInputFocusedOut(!1)),onKeydown:[n[4]||(n[4]=ir(u=>o.updateSelected(t.options[e.highlightedIndex]),["enter"])),n[5]||(n[5]=ir(mt((...u)=>o.highlightPreviousOption&&o.highlightPreviousOption(...u),["prevent"]),["up"])),n[6]||(n[6]=ir(mt((...u)=>o.highlightNextOption&&o.highlightNextOption(...u),["prevent"]),["down"]))]},[!t.modelValue&&t.search?ln((U(),Y("input",{key:0,ref:"searchInput","onUpdate:modelValue":n[0]||(n[0]=u=>e.value=u),type:"text",name:"search",placeholder:t.placeholder,autocomplete:"off",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-input`,onInput:n[1]||(n[1]=mt(u=>o.lookupSearchHandler(u.target.value),["prevent"]))},null,40,y8)),[[li,e.value]]):(U(),Y("div",{key:1,class:we(["selection-name ect-text-text-primary-dark ect-flex ect-justify-between ect-items-center",{"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-selection`},[o.getSelected?(U(),Y(be,{key:0},[b("span",{title:o.getSelected[t.property.value],class:we(["ect-flex ect-items-center ect-gap-2 ect-font-medium",{"ect-text-font-clr-light":!t.modelValue}]),"data-test-id":`${t.dataTestId}-selection-value`},[t.icon?(U(),ke(a,{key:0,class:"ect-mr-0",icon:t.icon,size:14,color:"#5F5F5F","data-test-id":`${t.dataTestId}-selection-icon`},null,8,["icon","data-test-id"])):ge("",!0),Ne(" "+xe(o.getSelected[t.property.value]),1)],10,_8),t.badge&&o.getSelected[t.badge]?(U(),Y("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-selection-badge`},xe(o.getSelected[t.badge]),9,b8)):ge("",!0)],64)):ge("",!0)],10,x8)),t.search?(U(),Y(be,{key:2},[t.loading?(U(),ke(s,{key:0,class:"spinner","data-test-id":`${t.dataTestId}-loading-spinner`},null,8,["data-test-id"])):(U(),Y("div",{key:1,class:"clear-button","data-test-id":`${t.dataTestId}-action-button`},[e.value||t.modelValue?(U(),ke(a,{key:0,disabled:t.disabled,icon:"close",color:"#acacac",size:10,"data-test-id":`${t.dataTestId}-clear-button`,onClick:o.clear},null,8,["disabled","data-test-id","onClick"])):(U(),ke(a,{key:1,icon:"search",size:14,color:"#acacac",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-button`},null,8,["disabled","data-test-id"]))],8,C8))],64)):(U(),ke(a,{key:3,class:"clear-button",color:o.error_message?"#ff6a6a":"#acacac",icon:"arrow_drop_up",size:12,disabled:t.disabled,"data-test-id":`${t.dataTestId}-dropdown-arrow`},null,8,["color","disabled","data-test-id"]))],42,m8),o.error_message?(U(),Y("div",{key:0,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,w8)):ge("",!0),o.getOptions&&e.inputFocused&&!t.disabled&&(t.select||t.lookup)?(U(),Y("div",{key:1,ref:"dropdown",class:we(["dropdown",{"dropdown-above":o.shouldShowAbove}]),style:ze(o.dropdownStyle),"data-test-id":`${t.dataTestId}-dropdown`},[(U(!0),Y(be,null,Me(o.getOptions,(u,f)=>(U(),Y("div",{key:u[t.property.key],class:we(["dropdown-item",{highlighted:f===e.highlightedIndex,"ect-pointer-events-none":u[t.property.assigned]}]),"data-test-id":`${t.dataTestId}-option-${f}`,onClick:c=>o.updateSelected(u)},[b("div",{class:"name ect-items-center","data-test-id":`${t.dataTestId}-option-${f}-name`},[b("span",O8,[b("span",{class:we({"ect-text-zinc-400":u[t.property.assigned]}),"data-test-id":`${t.dataTestId}-option-${f}-value`},xe(u[t.property.value]==null?"Key and Value is Wrong":u[t.property.value]),11,S8),u[t.property.assigned]?(U(),Y("span",{key:0,class:"ect-text-xs ect-leading-4 ect-text-zinc-600","data-test-id":`${t.dataTestId}-option-${f}-assigned`},"Assigned",8,I8)):ge("",!0)]),t.badge?(U(),Y("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-option-${f}-badge`},xe(u[t.badge]),9,T8)):ge("",!0)],8,k8),b("div",{class:"info",title:o.subFieldsText(u),"data-test-id":`${t.dataTestId}-option-${f}-info`},[b("span",null,xe(o.subFieldsText(u)),1)],8,B8)],10,A8))),128)),!o.getOptions.length&&!t.loading&&(e.value||t.select)?(U(),Y("div",{key:0,class:"no-items-found","data-test-id":`${t.dataTestId}-no-options`}," no options found ",8,D8)):ge("",!0)],14,E8)):ge("",!0)])],42,p8)}const R0=Le(h8,[["render",R8],["__scopeId","data-v-5ae4f6dc"]]);var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ds(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function L8(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function r(){return this instanceof r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),t}var L0={exports:{}};/*!
33
+ `+o):r.stack=o}catch{}}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=cr(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&Io.assertOptions(r,{silentJSONParsing:fn.transitional(fn.boolean),forcedJSONParsing:fn.transitional(fn.boolean),clarifyTimeoutError:fn.transitional(fn.boolean)},!1),i!=null&&(de.isFunction(i)?t.paramsSerializer={serialize:i}:Io.assertOptions(i,{encode:fn.function,serialize:fn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Io.assertOptions(t,{baseUrl:fn.spelling("baseURL"),withXsrfToken:fn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&de.merge(o.common,o[t.method]);o&&de.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),t.headers=Jt.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(t)===!1||(u=u&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const f=[];this.interceptors.response.forEach(function(g){f.push(g.fulfilled,g.rejected)});let c,v=0,l;if(!u){const p=[S0.bind(this),void 0];for(p.unshift(...s),p.push(...f),l=p.length,c=Promise.resolve(t);v<l;)c=c.then(p[v++],p[v++]);return c}l=s.length;let h=t;for(;v<l;){const p=s[v++],g=s[v++];try{h=p(h)}catch(d){g.call(this,d);break}}try{c=S0.call(this,h)}catch(p){return Promise.reject(p)}for(v=0,l=f.length;v<l;)c=c.then(f[v++],f[v++]);return c}getUri(n){n=cr(this.defaults,n);const t=m0(n.baseURL,n.url,n.allowAbsoluteUrls);return l0(t,n.params,n.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(n){To.prototype[n]=function(t,r){return this.request(cr(r||{},{method:n,url:t,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(n){function t(r){return function(o,a,s){return this.request(cr(s||{},{method:n,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}To.prototype[n]=t(),To.prototype[n+"Form"]=t(!0)});const Bo=To;class cs{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},n(function(o,a,s){r.reason||(r.reason=new Pr(o,a,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new cs(function(i){n=i}),cancel:n}}}const H9=cs;function V9(e){return function(t){return e.apply(null,t)}}function U9(e){return de.isObject(e)&&e.isAxiosError===!0}const us={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(us).forEach(([e,n])=>{us[n]=e});const z9=us;function B0(e){const n=new Bo(e),t=Xu(Bo.prototype.request,n);return de.extend(t,Bo.prototype,n,{allOwnKeys:!0}),de.extend(t,n,null,{allOwnKeys:!0}),t.create=function(i){return B0(cr(e,i))},t}const Ge=B0(is);Ge.Axios=Bo,Ge.CanceledError=Pr,Ge.CancelToken=H9,Ge.isCancel=h0,Ge.VERSION=I0,Ge.toFormData=wo,Ge.AxiosError=Re,Ge.Cancel=Ge.CanceledError,Ge.all=function(n){return Promise.all(n)},Ge.spread=V9,Ge.isAxiosError=U9,Ge.mergeConfig=cr,Ge.AxiosHeaders=Jt,Ge.formToJSON=e=>f0(de.isHTMLForm(e)?new FormData(e):e),Ge.getAdapter=O0.getAdapter,Ge.HttpStatusCode=z9,Ge.default=Ge;class K9{constructor(n,t,r,i){this.awsURL="https://ec-apigw.blink.expedite1.com",this.headers={"x-api-key":n,"X-Salesforce-Org-Type":t,"X-Salesforce-Org-Id":r,"X-Salesforce-User-Id":i,"Content-Type":"application/json"}}}const D0=wt("comShare",()=>{const e=te(""),n=te(""),t=te(""),r=te(""),i=te(""),o=te(""),a=te(""),s=te("Single"),u=me(()=>s.value==="Single");async function f(c){e.value=c.orgType||"Production",n.value=c.orgId||"",t.value=c.userId||"",r.value=c.accountId||"",i.value=c.opportunityId||"",a.value=c.userLocale||"en_US",s.value=c.pricingSchema||"Single"}return{orgType:e,orgId:n,userId:t,accountId:r,opportunityId:i,userLocale:a,pricingSchema:s,quoteId:o,isSinglePricingSchema:u,setSetupData:f}});function X9(e){return e.offerData.pricingTypes.forEach(n=>{n.appliedOnField==="Catalog Price"?(e.catalogPrice=n,e.salesPrice=n.offerPrice,e.price=n.offerPrice):n.appliedOnField==="MRC"?(e.mrcPrice=n,e.mrc=n.offerPrice):n.appliedOnField==="YRC"&&(e.yrcPrice=n,e.yrc=n.offerPrice)}),e}function W9(e){const n=t=>Math.min(...t.options.map(r=>r.relationshipInfo.primarySortOrder));return e.forEach(t=>{t.itemTypes.forEach(r=>{r.options.sort((i,o)=>i.relationshipInfo.primarySortOrder-o.relationshipInfo.primarySortOrder||i.itemName.localeCompare(o.itemName))}),t.itemTypes.sort((r,i)=>n(r)-n(i)||r.itemTypeName.localeCompare(i.itemTypeName))}),e.sort((t,r)=>{const i=Math.min(...t.itemTypes.map(n)),o=Math.min(...r.itemTypes.map(n));return i-o||t.category.localeCompare(r.category)}),e}const G9=(e,n)=>{const t=(r,i)=>typeof i=="function"?void 0:i;return JSON.stringify(e,t)===JSON.stringify(n,t)};class Q9 extends K9{constructor(n,t,r,i){super(n,t,r,i)}async getAvailableConfiguration(n){return(await Ge.post(`${this.awsURL}/product-pricing/getAvailableConfiguration`,n,{headers:this.headers})).data}async getLineItems({request:n}){const t=await Ge.post(`${this.awsURL}/quoting/getConfiguredLineItems`,n,{headers:this.headers});return console.info("getLineItems:response",t.data),t.data}async maintainQuoteConfiguration({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/maintainConfiguration`,n,{headers:this.headers});return console.info("maintainQuoteConfiguration:response",t.data),t.data}async getProductCrossSells({objectId:n,productItemId:t}){const r=await Ge.get(`${this.awsURL}/pricing/getProductCrossSells?productItemId=${t}&objectId=${n}`,{headers:this.headers});return console.info("getProductCrossSells:response",r.data),r.data}async addLines({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/addLines`,n,{headers:this.headers});return console.info("addLines:response",t.data),t.data}async evaluateConfigurationSelection({request:n}){const t=await Ge.post("https://api-svc.blink.expedite1.com/api/product-pricing/evaluateConfigurationSelection",n,{headers:this.headers});return console.info("evaluateConfigurationSelection:response",t.data),t.data}}const dn=wt("comConfigurator",()=>{const e=te(null),n=Qt(),t=D0(),r=fi(),i=te(null),o=te(null),a=te(null),s=te(null),u=te(null),f=te([]),c=te(null),v=te([]),l=te(null),h=te(new Map),p=te(!1),g=te({configuration:!1,lineItem:!1,productOptionsPricing:!1,bestOfferPrice:!1,lineItemAttributes:!1,save:!1}),d=te(!1),m=me(()=>y.value&&!t.isSinglePricingSchema),y=me(()=>{var P;if(!s.value||!((P=s.value.categoryOptions)!=null&&P.length)>0)return!1;let M=!0,H=!0,V=!0,K=null,J=!1;for(const X of s.value.categoryOptions)for(const se of X.itemTypes)for(const fe of se.options)fe.billingPeriod&&(K&&K!==fe.billingPeriod&&(V=!1),K=fe.billingPeriod,!fe.yrcPrice&&fe.billingPeriod==="Monthly"&&(M=!1),!fe.mrcPrice&&fe.billingPeriod==="Yearly"&&(H=!1),J=!0);return M&&H&&V&&J}),_=me(()=>!G9(s.value,u.value)),x=me(()=>{var H;const M=((H=s.value)==null?void 0:H.categoryOptions)||[];return M.forEach(V=>{V.itemTypes.forEach(K=>{K.selectedOptions=K.options.filter(J=>K.selected.includes(J.itemId)),K.totalPrice=function(){return K.selectedOptions.reduce((J,P)=>J+P.price*P.qty,0)||0},K.oneTimePrice=function(){return K.selectedOptions.filter(J=>!J.billingPeriod).reduce((J,P)=>J+P.price*P.qty,0)||0},K.recurringPrice=function(){return K.selectedOptions.filter(J=>J.billingPeriod).reduce((J,P)=>J+P.price*P.qty,0)||0}}),V.selectedItemTypes=V.itemTypes.filter(K=>K.selected.length>0),V.totalPrice=function(){return V.itemTypes.reduce((K,J)=>K+J.totalPrice(),0)},V.oneTimePrice=function(){return V.itemTypes.reduce((K,J)=>K+J.oneTimePrice(),0)},V.recurringPrice=function(){return V.itemTypes.reduce((K,J)=>K+J.recurringPrice(),0)}}),M.filter(V=>V.itemTypes.filter(K=>K.selected.length>0).length>0)}),C=me(()=>x.value.reduce((M,H)=>M+H.totalPrice(),0)),S=me(()=>{if(!s.value)return{basePrice:0,addOns:0,oneTimePrice:0,recurringPrice:0,total:0};const M=x.value.reduce((K,J)=>K+J.totalPrice(),0);let H=x.value.reduce((K,J)=>K+J.oneTimePrice(),0),V=x.value.reduce((K,J)=>K+J.recurringPrice(),0);return s.value.billingPeriod?V=(V+s.value.price)*s.value.qty:H=(H+s.value.price)*s.value.qty,{basePrice:s.value.price,addOns:M,oneTimePrice:H,recurringPrice:V,total:s.value.price*s.value.qty+M*s.value.qty+H+V}}),A=me(()=>{var H,V,K,J;const M=new Map;return(H=c.value)!=null&&H.productLineItem&&M.set((V=c.value)==null?void 0:V.productLineItem.XX_ORD1__Item__c,(K=c.value)==null?void 0:K.productLineItem),(J=c.value)==null||J.options.forEach(P=>{M.set(P.XX_ORD1__Item__c,P)}),M}),I=me(()=>{var H;const M=new Map;return s.value&&((H=s.value.categoryOptions)==null?void 0:H.length)>0&&s.value.categoryOptions.forEach(V=>{V.itemTypes.forEach(K=>{K.options.forEach(J=>{M.set(J.publishKey,J)})})}),M}),B=me(()=>{if(!s.value)return{};const M=K=>!K||!Array.isArray(K)?[]:K.filter(J=>J.apiName&&J.value!==null&&J.value!==void 0&&J.value!=="").map(J=>({fieldAPIName:J.apiName,value:J.dataType==="BOOLEAN"?J.value?"true":"false":J.dataType==="REFERENCE"?J.referenceRecordId||J.value||"":J.value||""})),H={itemId:s.value.itemId,qliId:s.value.qliId||null,name:s.value.itemName,qty:s.value.qty||1,salesPrice:s.value.price||0,mrc:s.value.mrc||null,yrc:s.value.yrc||null,attributes:M(s.value.attributes)},V=[];return s.value.categoryOptions.forEach(K=>{K.itemTypes.forEach(J=>{J.options.forEach(P=>{J.selected.includes(P.itemId)&&V.push({itemId:P.itemId,qliId:P.qliId||null,name:P.itemName,qty:P.qty||1,salesPrice:P.price||0,mrc:P.mrc||null,yrc:P.yrc||null,attributes:M(P.attributes)})})})}),{[s.value.itemId]:{product:H,options:V}}}),O=(M,H)=>{if(!M||!Array.isArray(M))return[];const V=new Map;return H.forEach(K=>{V.set(K.fieldAPIName,K.value)}),M.map(K=>(K.value=V.get(K.fieldAPIName)||null,K))};function E(M){const H=new Map;M.options.forEach(V=>{H.set(V.itemId,V)}),s.value.itemName=M.product.name,s.value.qty=M.product.qty,s.value.price=M.product.salesPrice,s.value.attributes=O(s.value.attributes,M.product.attributes),s.value.categoryOptions.forEach(V=>{V.itemTypes.forEach(K=>{K.selected=[],K.options.forEach(J=>{H.has(J.itemId)&&(J.itemName=H.get(J.itemId).name,J.qty=H.get(J.itemId).qty,J.price=H.get(J.itemId).salesPrice,J.qliId=H.get(J.itemId).qliId,J.attributes=O(J.attributes,H.get(J.itemId).attributes),K.selected.push(J.itemId))})})}),s.value={...s.value}}function k(){return{get getConfig(){return B.value},setConfig:E}}function R(M){s.value.qliId&&(s.value.qliBillingPeriod==="Monthly"&&!M?s.value.price=s.value.salesPrice||s.value.mrc:s.value.qliBillingPeriod==="Yearly"&&M&&(s.value.price=s.value.salesPrice)),s.value.categoryOptions.forEach(H=>{H.itemTypes.forEach(V=>{V.options.forEach(K=>{K.billingPeriod&&(K.price=(M?K.yrcPrice.offerPrice:K.mrcPrice.offerPrice)||K.price,K.qliId&&(K.qliBillingPeriod==="Monthly"&&!M?K.price=K.salesPrice||K.mrc:K.qliBillingPeriod==="Yearly"&&M&&(K.price=K.salesPrice)))})})})}function F(){s.value=null,u.value=null,f.value=[],c.value=null,l.value=null,h.value=new Map,p.value=!1,g.value.configuration=!1,g.value.lineItem=!1,g.value.productOptionsPricing=!1,g.value.bestOfferPrice=!1,g.value.lineItemAttributes=!1,g.value.save=!1}function q(M,H,V,K){e.value=new Q9(M,H,V,K)}async function Z(M,H,V){console.time("CONFIGURATOR INIT CONFIGURATOR"),F(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","1"),o.value=M,a.value=H,i.value=V||t.quoteId;const K=await ee();console.timeLog("CONFIGURATOR INIT CONFIGURATOR","2"),s.value=ne(K),a.value&&(await N(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","3"),Q(s.value),s.value.categoryOptions.forEach(J=>{J.itemTypes.forEach(P=>{P.options.forEach(X=>{Q(X),(A.value.has(X.itemId)||X.relationshipInfo.relationship==="Kit")&&P.selected.push(X.itemId)})})}),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","4")),u.value=JSON.parse(JSON.stringify(s.value)),console.timeEnd("CONFIGURATOR INIT CONFIGURATOR")}async function ee(){try{const M={accountId:t.accountId,objectId:i.value,itemId:o.value,configScope:"BASIC",fields:[],pricePreference:"Lowest Price"},H=await e.value.getAvailableConfiguration(M);console.info("getAvailableConfiguration:result",H);const V=H.data.productConfiguration;return V.categoryOptions=W9(V.categoryOptions),V}catch(M){return console.info("error",M.message),!1}}function ne(M){h.value.set(a.value,M.attributes),f.value=M.configRules;const H=new Set;return f.value.forEach(V=>{const K=JSON.parse(V.ruleJson);K.optionSelected.forEach(J=>{H.add(J)}),K.affectedOptions.forEach(J=>{H.add(J)})}),console.info("rulesByPublishKey",H),Q(M),M.categoryOptions.forEach(V=>{V.key=V.category.toLowerCase().replace(/\s+/g,"-").replace(/[&]/g,""),V.itemTypes.forEach(K=>{K.selected=[],K.numberOfColumns||(K.numberOfColumns=1),K.numberOfColumns>1&&(K.lightboxAttributes=!0),K.maxNumber||(K.maxNumber=100),K.minNumber||(K.minNumber=0),K.maxQuantity||(K.maxQuantity=1e4),K.minQuantity||(K.minQuantity=1),K.maxNumber===1?(K.isRadio=!0,K.minMessage="Please select 1 option",K.maxMessage="",K.isKit=K.options.some(J=>J.relationshipInfo.relationship==="Kit")):(K.minMessage=`Minimum of ${K.minNumber} selection${K.minNumber!==1?"s":""} required`,K.maxMessage=`Maximum of ${K.maxNumber} selection${K.maxNumber!==1?"s":""} allowed`),K.options.forEach(J=>{V.showImage=V.showImage||!!J.defaultImageURL,J.showAttributesModal=!1,J.calculateRules=H.has("option."+J.publishKey),console.info("option.calculateRules",J.calculateRules),J.qty=K.minQuantity||1,J.getTags=()=>(J.attributes=J.attributes||[],J.attributes.filter(P=>P.value!==null&&P.value!=="").map(P=>({label:P.label,value:P.value}))),Object.defineProperty(J,"isDisabled",{get:function(){return J.relationshipInfo.relationship==="Kit"||(K.isRadio?K.isKit:!K.selected.includes(J.itemId)&&K.maxNumber===K.selected.length)}}),Q(J)})})}),M}function Q(M){M.isAttributes=M.attributes&&M.attributes.length>0;const H=M.catalogItem;if(A.value.has(M.itemId)){const V=A.value.get(M.itemId);M.qliId=V.Id,M.qty=V.XX_ORD1__QTY__c,M.itemName=V.XX_ORD1__Line_Description__c,M.billingPeriod=V.XX_ORD1__Billing_Period__c,M.price=V.XX_ORD1__Sales_Price__c,M.billingPeriod?M.price=V.XX_ORD1__Sales_Price__c||V.XX_ORD1__MRC__c:M.price=V.XX_ORD1__NRC__c||V.XX_ORD1__Sales_Price__c,M.salesPrice=V.XX_ORD1__Sales_Price__c,M.nrc=V.XX_ORD1__NRC__c,M.mrc=V.XX_ORD1__MRC__c,M.qliBillingPeriod=V.XX_ORD1__Billing_Period__c,h.value.set(M.qliId,M.attributes)}else M.itemName=H.XX_ORD1__Line_Description__c||M.itemName,M.price=H.XX_ORD1__Negotiated_Price__c||H.XX_ORD1__NRC_for_New__c,M.nrcPrice=H.XX_ORD1__NRC_for_New__c,X9(M)}async function N(){g.value.lineItem=!0,console.info("getLineItems",i.value,a.value);try{const M={objectId:i.value,filters:{},additionalFields:["Name","XX_ORD1__Line_Description__c","XX_ORD1__SYS_Configuration_Status2__c"],primarySort:{field:"CreatedDate",direction:"DESC"},productPage:{limit:200,offset:0,productLineItemId:a.value}},H=await e.value.getLineItems({request:JSON.stringify(M)});return(H.data.products||[]).forEach(K=>{const J=K.productLineItem;J.Id===a.value?c.value=K:v.value.push(J)}),console.info("lineItem.value",c.value),console.info("configurableLineItems.value",v.value),g.value.lineItem=!1,H}catch(M){return console.info("error",M.message),g.value.lineItem=!1,!1}}async function w(M){console.info("getRecords");try{const H=await window.productManagerController.getRecords({request:JSON.stringify(M)});return console.info("getRecords:result",H),JSON.parse(H.data)}catch(H){return console.info("error",H.message),!1}}async function D(){p.value=!0,g.value.save=!0,console.info("maintainQuoteConfiguration");const M=[],H=[];s.value.categoryOptions.forEach(J=>{J.itemTypes.forEach(P=>{P.options.forEach(X=>{P.selected.includes(X.itemId)?M.push(L(X)):X.qliId&&H.push(X.qliId)})})});const V={objectId:i.value,eCatalogId:t.eCatalogId,isGenesisAI:!0,blinkUser:!1,optionsToRemove:H,grandFatheredOptionsToRemove:[],productLineItem:{...L(s.value),optionLineItems:M}};console.info("maintainQuoteConfiguration:request",V);const K=await e.value.maintainQuoteConfiguration({request:JSON.stringify(V)});if(console.info("maintainQuoteConfiguration:result",K),K!=null&&K.error){const J={title:"Unable to Save Configuration",description:K.error,button:{label:"Back to Configuration",action:()=>{p.value=!1}},cancel:{label:"Quote List",action:()=>{r.push("/quote-item?id="+i.value)}}};n.errorPopup=J}else u.value=JSON.parse(JSON.stringify(s.value)),console.info("maintainQuoteConfiguration:result",K);g.value.save=!1}function L(M){const H={};M.isAttributes&&M.attributes.forEach(K=>{K.apiName.includes(".")||(K.dataType==="BOOLEAN"?H[K.apiName]=K.value?"true":"false":K.dataType==="REFERENCE"?H[K.apiName]=K.referenceRecordId:H[K.apiName]=K.value)});const V={attributes:H,itemId:M.itemId,lineItemId:M.qliId,lineDescription:M.itemName,qty:M.qty,billingPeriod:M.billingPeriod,...M.offer};return M.billingPeriod&&y.value&&!t.isSinglePricingSchema&&(V.billingPeriod=d.value?"Yearly":"Monthly"),!t.isSinglePricingSchema&&!M.billingPeriod?V.nrcPrice=M.price:(V.applyOnField="Catalog Price",V.salesPrice=M.price,V.nrcPrice=M.nrcPrice),V}async function $(){const M={objectId:t.accountId,productItemId:o.value};try{let H=await e.value.getProductCrossSells(M);const{crossSells:V,offerResult:K}=H.data;if(V.length===0)return H;const J=new Map;return K.forEach(P=>{J.set(P.eCatalogItemId,{...P,...P.pricingTypes[0]})}),V.forEach(P=>{P.loading=!1,P.Name=P.XX_ORD1__Line_Description__c||P.XX_ORD1__Item__r.Name,P.Description=P.XX_ORD1__Item__r.XX_ORD1__Product_Description__c,J.has(P.Id)?(P.Price=J.get(P.Id).offerPrice,P.priceFormatted=J.get(P.Id).formattedOfferPrice,P.offer={offerDiscount:J.get(P.Id).offerDiscount,offerId:J.get(P.Id).offerId,offerType:J.get(P.Id).offerType}):(P.Price=P.XX_ORD1__List_Price2__c,P.priceFormatted=P.XX_ORD1__List_Price2__c,P.offer={offerDiscount:0,offerId:null,offerType:null})}),V}catch(H){return console.info("error",H.message),!1}}const G=M=>!M||!Array.isArray(M)?[]:M.filter(H=>H.apiName&&H.value!==null&&H.value!==void 0&&H.value!=="").map(H=>({attrName:H.apiName,attrValue:H.dataType==="BOOLEAN"?H.value:H.value||"",dataType:H.dataType}));async function j(M,H){const V={product:{publishKey:s.value.publishKey,attributes:G(s.value.attributes),lineDescription:s.value.itemName,meta:{XX_ORD1__Sales_Price__c:s.value.price,XX_ORD1__MRC__c:s.value.mrc,XX_ORD1__NRC__c:s.value.nrc,XX_ORD1__YRC__c:s.value.yrc,quantity:s.value.qty}},options:[]};s.value.categoryOptions.forEach(P=>{P.itemTypes.forEach(X=>{X.options.forEach(se=>{X.selected.includes(se.itemId)&&V.options.push({publishKey:se.publishKey,attributes:G(se.attributes),lineDescription:se.itemName,meta:{XX_ORD1__Sales_Price__c:se.price,XX_ORD1__MRC__c:se.mrc,XX_ORD1__NRC__c:se.nrc,XX_ORD1__YRC__c:se.yrc,quantity:se.qty}})})})}),console.info("evaluateConfigSelection:currentConfig.options",V.options);const K={itemId:o.value,currentConfig:V,selected:M?{publishKey:M==null?void 0:M.publishKey,attributes:M.attributes,lineDescription:M.itemName}:{},unselected:H?{publishKey:H==null?void 0:H.publishKey,attributes:H.attributes,lineDescription:H.itemName}:{}};return await e.value.evaluateConfigurationSelection({request:JSON.stringify(K)})}async function W(M){const H={objectId:i.value,lstLIRequest:[{eCatalogItemId:M.Id,quantity:1,offerApplicable:M.offer}]};try{const V=await e.value.addLines({request:JSON.stringify(H)});console.info("addLines:result",V)}catch(V){return console.info("error",V.message),!1}}return{itemId:o,configuration:s,_configurationCopy:u,lineItem:c,savedScreen:p,loading:g,summary:x,addOns:C,summaryPrices:S,optionByItemId:A,attributesByQLIId:h,optionByPublishKey:I,showYearlyPricing:d,isYearlyPricingExist:y,isChangedConfiguration:_,isRecurringPricingSchema:m,configurableLineItems:v,initializeController:q,exposeProperties:k,updateCurrentConfiguration:E,changePricingScheme:R,addLines:W,resetConfigurator:F,getRecords:w,getProductCrossSells:$,initConfigurator:Z,maintainQuoteConfiguration:D,evaluateConfigSelection:j}}),Z9={class:"ect-p-4 ect-flex ect-gap-2 ect-items-center ect-justify-between ect-border-b ect-border-gray-200"},J9={class:"ect-flex ect-items-center ect-gap-3"},Y9={class:"ect-text-xl ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},e4={key:0,class:"ect-flex ect-gap-1.5 ect-items-center"},t4=b("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Saving configuration...",-1),n4={key:1,class:"ect-flex ect-gap-1.5 ect-items-center"},r4=b("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Configuration Saved Successfully",-1),i4={key:1,class:"ect-flex ect-flex-col ect-gap-4 ect-flex-1 ect-overflow-y-auto ect-mb-16"},o4=b("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed ect-p-4 ect-pb-0"},"You may consider these products",-1),a4={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},s4=["data-test-id"],l4={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},c4={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},u4={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},f4={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},d4={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},h4={key:2,class:"ect-flex ect-flex-col ect-gap-4 ect-m-4 ect-flex-1 ect-overflow-y-auto"},p4=b("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},"What do you want to do next?",-1),v4={class:"ect-flex ect-flex-col ect-gap-4"},g4=["data-test-id","onClick"],m4={class:"ect-flex ect-items-center ect-justify-center"},y4={class:"ect-flex ect-flex-col ect-items-center ect-gap-2 ect-w-full"},x4=["data-test-id"],_4=["data-test-id"],b4={key:3,class:"ect-bg-light-bg-x ect-border-t ect-border-gray-200 ect-flex-shrink-0 ect-sticky ect-bottom-0 ect-pb-4"},C4={class:"ect-flex ect-flex-col ect-gap-4"},w4={class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed ect-p-4 ect-pb-0"},E4={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},A4={class:"ect-bg-white ect-border ect-border-gray-300 ect-rounded-md ect-p-3 ect-flex ect-flex-col","data-test-id":"configurator-recommend-card-next-product"},k4={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},O4={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},S4={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},I4={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},T4={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},B4={__name:"ConfiguratorRecommend",setup(e){const n=dn(),t=sr(),r=fi(),i=me(()=>n.configuration),o=te(!0),a=te(""),s=te([{icon:"configuration",title:"Back to current Product Configuration",description:"Returns to the active product configuration page.",link:"/item/overview",action:"backToConfiguration"},{icon:"menu",title:"Back to Quote List Page",description:"Returns to the main quote list page.",link:"/quote-item",action:"backToQuoteList"}]),u=te(null),f=te([]),c=async p=>{p.loading=!0,await n.addLines(p),p.disabled=!0,p.loading=!1},v=p=>{p.action==="backToConfiguration"?n.savedScreen=!1:p.action==="backToQuoteList"?r.push("/quote-item?id="+t.quoteId):p.link&&r.push(p.link)};async function l(){const p=n.configurableLineItems,g=p.filter(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration").length;a.value=`(${p.length-g}/${p.length})`;const d=p.find(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration"&&m.Id!=n.qliId);return u.value=d?{Name:d.XX_ORD1__Line_Description__c,Description:d.XX_ORD1__Product_Description__c,Price:d.XX_ORD1__Sales_Price__c,XX_ORD1__Item__c:d.XX_ORD1__Item__c,Id:d.Id}:null,p}async function h(){n.resetConfigurator(),r.push({path:"/configurator/"+u.value.XX_ORD1__Item__c+"/"+u.value.Id}),n.initConfigurator(u.value.XX_ORD1__Item__c,u.value.Id)}return qn(async()=>{o.value=!0;const p=await l(),g=await n.getProductCrossSells(),d=new Set;p.forEach(m=>{d.add(m.XX_ORD1__Item__c)}),g.forEach(m=>{m.disabled=d.has(m.XX_ORD1__Item__c)}),f.value=g||[],o.value=!1}),(p,g)=>(U(),Y(be,null,[b("div",Z9,[b("div",J9,[he(We,{icon:"arrow",symbol:"",size:12,onClick:g[0]||(g[0]=d=>Fe(n).savedScreen=!1)}),b("h2",Y9,xe(i.value.itemName),1)]),Fe(n).loading.save?(U(),Y("div",e4,[he(ju,{svg:""}),t4])):(U(),Y("div",n4,[he(We,{icon:"check",color:"#136E05",size:14,"data-test-id":"item-tabs-before-button-icon"}),r4]))]),o.value?(U(),ke($u,{key:0,type:"recommendations",rows:4})):f.value.length>0?(U(),Y("div",i4,[o4,b("div",a4,[(U(!0),Y(be,null,Me(f.value,(d,m)=>(U(),Y("div",{key:d.Id||m,class:"ect-bg-white ect-border ect-border-gray-300 ect-rounded-md ect-p-3 ect-flex ect-flex-col","data-test-id":`configurator-recommend-card-${d.Id||m}`},[b("div",l4,[b("h4",c4,xe(d.Name),1),b("p",u4,xe(d.Description),1)]),b("div",f4,[b("div",d4,xe(Fe(Pt)(d.Price)),1),he(Ht,{btype:d.disabled?"secondary":"primary","button-style":d.disabled?"normal":"outlined",size:"medium",class:we({"ect-w-[120px]":d.loading}),loading:d.loading,disabled:d.disabled||d.loading,"data-test-id":`configurator-recommend-button-add-${d.Id||m}`,onClick:y=>c(d)},{default:Ve(()=>[Ne(xe(d.loading?"":d.disabled?"Added to Quote":"Add to Quote"),1)]),_:2},1032,["btype","button-style","class","loading","disabled","data-test-id","onClick"])])],8,s4))),128))])])):(U(),Y("div",h4,[p4,b("div",v4,[(U(!0),Y(be,null,Me(s.value,(d,m)=>(U(),Y("div",{key:d.title||m,class:"ect-bg-white ect-border ect-border-[#DEDEDE] ect-rounded-xl ect-p-4 md:ect-p-5 lg:ect-p-6 ect-flex ect-flex-col ect-items-center ect-gap-4 md:ect-gap-6 lg:ect-gap-8 ect-cursor-pointer ect-transition-all ect-duration-200 hover:ect-shadow-md hover:ect-border-gray-400","data-test-id":`configurator-recommend-redirect-card-${m}`,onClick:y=>v(d)},[b("div",m4,[he(We,{icon:d.icon,size:20,color:"#000000","data-test-id":`configurator-recommend-redirect-icon-${m}`},null,8,["icon","data-test-id"])]),b("div",y4,[b("h4",{class:"ect-text-sm ect-font-semibold ect-text-[#5F5F5F] ect-text-center ect-leading-[1.43]","data-test-id":`configurator-recommend-redirect-title-${m}`},xe(d.title),9,x4),b("p",{class:"ect-text-sm ect-font-normal ect-text-[#828282] ect-text-center ect-leading-[1.71]","data-test-id":`configurator-recommend-redirect-description-${m}`},xe(d.description),9,_4)])],8,g4))),128))])])),u.value?(U(),Y("footer",b4,[b("div",C4,[b("h3",w4," Configuere next product from your quote "+xe(a.value),1),b("div",E4,[b("div",A4,[b("div",k4,[b("h4",O4,xe(u.value.Name),1),b("p",S4,xe(u.value.Description),1)]),b("div",I4,[b("div",T4,xe(Fe(Pt)(u.value.Price)),1),he(Ht,{btype:"primary","button-style":"filled",size:"medium","data-test-id":"configurator-recommend-button-add-next-product",onClick:h},{default:Ve(()=>[Ne(" Configure Now ")]),_:1})])])])])])):ge("",!0)],64))}},D4=["data-test-id"],R4=Le({__name:"AppPill",props:{variant:{type:String,default:"",validator:e=>["success","error",""].includes(e)},dataTestId:{type:String,default:""}},setup(e){return(n,t)=>(U(),Y("span",{class:we(["ect-pill",{"ect-pill-success":e.variant==="success","ect-pill-error":e.variant==="error","ect-pill-default":!e.variant}]),"data-test-id":e.dataTestId},[Je(n.$slots,"default",{},void 0,!0)],10,D4))}},[["__scopeId","data-v-c7f05fa0"]]),L4=["data-test-id"],F4=["data-test-id"],N4=["data-test-id","onClick"],P4=["data-test-id"],M4=Le({__name:"AppTabsV2",props:{showTabs:{type:Boolean,default:!0},modelValue:{type:String,default:""},border:{type:Boolean,default:!1},tabs:{type:Array,required:!0,validator:e=>e.every(n=>typeof n=="object"&&n.title&&n.key&&(n.sections===void 0||Array.isArray(n.sections)))},dataTestId:{type:String,required:!0}},emits:["update:modelValue","tab-change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>{var a;return t.modelValue||((a=t.tabs[0])==null?void 0:a.key)||""}),o=a=>{r("update:modelValue",a),r("tab-change",a)};return(a,s)=>(U(),Y("div",{class:"ect-page-tabs","data-test-id":e.dataTestId},[e.showTabs?(U(),Y("div",{key:0,class:we(["ect-page-tabs-header",[{"ect-tab-border":e.border}]]),"data-test-id":`${e.dataTestId}-header`},[(U(!0),Y(be,null,Me(e.tabs,u=>(U(),Y("button",{key:u.key,class:we(["ect-page-tab-button",`ect-page-tab-button${i.value===u.key?"-active":""} ${u.tabClass||""}`]),"data-test-id":`${e.dataTestId}-tab-${u.key}`,onClick:f=>o(u.key)},[Ne(xe(u.title)+" ",1),u.pill!==void 0&&u.pill!==null?(U(),ke(R4,{key:0,class:"ect-ml-2",variant:u.pillStyle,"data-test-id":`${e.dataTestId}-tab-${u.key}-pill`},{default:Ve(()=>[Ne(xe(u.pill),1)]),_:2},1032,["variant","data-test-id"])):ge("",!0)],10,N4))),128))],10,F4)):ge("",!0),b("div",{class:"ect-page-tab-content","data-test-id":`${e.dataTestId}-content`},null,8,P4)],8,L4))}},[["__scopeId","data-v-f22cb1ed"]]),q4=["data-test-id"],$4=["disabled","data-test-id"],j4=["value","disabled","data-test-id"],H4=["disabled","data-test-id"],Do={__name:"CounterButton",props:{value:{type:Number,required:!0,default:null},min:{type:Number,default:1},max:{type:Number,default:999},empty:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:value","change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.min==null?0:t.min),o=me(()=>t.max==null?999:t.max),a=(x,C,S)=>Math.min(Math.max(x,C),S),s=x=>{if(x==null||x==="")return NaN;const C=Number(x);return Number.isFinite(C)?C:NaN},u=te(null),f=te(t.value??i.value),c=x=>{f.value=a(x,i.value,o.value)};t.value!==null&&c(t.value);const v=me(()=>f.value),l=me(()=>u.value!=null?u.value:String(v.value)),h=me(()=>t.disabled||v.value<=i.value),p=me(()=>t.disabled||v.value>=o.value);function g(x){x!==t.value&&(f.value=x,r("update:value",x),r("change",x))}function d(){if(h.value)return;const x=a(v.value-1,i.value,o.value);u.value=null,g(x)}function m(){if(p.value)return;const x=a(v.value+1,i.value,o.value);u.value=null,g(x)}function y(x){const S=String(x.target.value??"").replace(/\D+/g,"");u.value=S}function _(){const x=s(u.value),C=i.value,S=a(Number.isNaN(x)?C:x,i.value,o.value);u.value=null,g(S)}return(x,C)=>(U(),Y("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":e.dataTestId},[b("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":h.value,"ect-cursor-not-allowed":h.value}]),disabled:h.value,"data-test-id":`${e.dataTestId}-decrement`,onClick:d}," - ",10,$4),b("input",{type:"text",inputmode:"numeric",pattern:"[0-9]*",value:e.empty?"":l.value,disabled:e.disabled,class:"ect-h-7 ect-w-[48px] ect-px-2 ect-border ect-border-gray ect-rounded-md ect-text-center ect-text-sm ect-font-medium ect-text-gray-900 focus:ect-outline-none focus:ect-border-gray-400 ect-bg-white","data-test-id":`${e.dataTestId}-input`,onInput:y,onBlur:_},null,40,j4),b("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":p.value,"ect-cursor-not-allowed":p.value}]),disabled:p.value,"data-test-id":`${e.dataTestId}-increment`,onClick:m}," + ",10,H4)],8,q4))}},V4={class:"ect-flex ect-justify-end ect-items-center ect-gap-2.5 ect-px-6 ect-py-4 ect-bg-white ect-border-t ect-border-gray-300 ect-shadow-[0_-2px_4px_0px_rgba(0,0,0,0.11)]","data-test-id":"configurator-footer"},U4={"data-test-id":"configurator-footer-quantity"},z4={class:"ect-flex ect-justify-end ect-items-center ect-gap-6 ect-px-8 ect-py-0 ect-flex-1","data-test-id":"configurator-footer-prices"},K4=["data-test-id"],X4=["data-test-id"],W4=["data-test-id"],G4=["data-test-id"],Q4={__name:"ConfiguratorFooter",props:{item:{type:Object,required:!0,default:()=>{}},disabled:{type:Boolean,default:!1},btnText:{type:String,default:"Save"}},emits:["update:qty","continue"],setup(e,{emit:n}){const t=dn(),r=e,i=te(r.item),o=me(()=>{const u=t.summaryPrices,f=[];return t.isRecurringPricingSchema?(f.push({label:"One Time Price",value:u.oneTimePrice,highlight:!1}),f.push({label:t.showYearlyPricing?"Yearly Price":"Monthly Price",value:u.recurringPrice,highlight:!1})):(f.push({label:"Base Price",value:u.basePrice,highlight:!1}),f.push({label:"Add Ons",value:u.addOns,highlight:!1}),f.push({label:"Total Price",value:u.total,highlight:!1})),f}),a=n,s=()=>{r.disabled||a("continue")};return(u,f)=>(U(),Y("footer",V4,[b("div",U4,[he(Do,{value:i.value.qty,"onUpdate:value":f[0]||(f[0]=c=>i.value.qty=c),min:1,max:999,disabled:e.disabled,"is-selected":!0,"data-test-id":"configurator-footer-counter-button"},null,8,["value","disabled"])]),b("div",z4,[(U(!0),Y(be,null,Me(o.value,(c,v)=>(U(),Y(be,{key:v},[b("div",{class:"ect-flex ect-flex-col ect-justify-center","data-test-id":`configurator-footer-price-${v}`},[b("span",{class:"ect-text-xs ect-font-normal ect-text-gray-500 ect-text-left","data-test-id":`configurator-footer-price-label-${v}`},xe(c.label),9,X4),b("span",{class:we(["ect-text-left",c.highlight?"ect-text-lg ect-font-bold ect-text-green-700":"ect-text-sm ect-font-medium ect-text-gray-800 "]),"data-test-id":`configurator-footer-price-value-${v}`},xe(Fe(Pt)(c.value)),11,W4)],8,K4),v<o.value.length-1?(U(),Y("div",{key:0,class:"ect-w-0 ect-h-5 ect-border-l ect-border-gray-400","data-test-id":`configurator-footer-divider-${v}`},null,8,G4)):ge("",!0)],64))),128))]),he(Ht,{class:"ect-min-w-[100px]",btype:e.disabled?"secondary":"primary",disabled:e.disabled,"button-style":"primary",size:"medium","data-test-id":"configurator-footer-button-continue",onClick:s},{default:Ve(()=>[Ne(xe(e.btnText),1)]),_:1},8,["btype","disabled"])]))}},Z4={class:"ect-w-full ect-bg-white ect-mb-4","data-test-id":"configurator-type-section"},J4={class:"ect-sticky ect-top-0 ect-z-30 ect-bg-white ect-shadow-sm ect-p-3 ect-px-4 ect-border-b ect-border-gray-200 ect-flex ect-justify-between ect-items-center","data-test-id":"configurator-type-header-sticky"},Y4={class:"ect-flex ect-flex-col"},e6={class:"ect-font-bold ect-text-text-success ect-leading-tight"},t6=["innerHTML"],n6={key:0,class:"ect-flex ect-items-center ect-gap-2 ect-px-2 ect-py-1","data-test-id":"configurator-type-message"},r6={class:"ect-text-xs ect-font-medium ect-text-gray-600 ect-leading-tight ect-min-w-[190px]"},i6={class:"ect-divide-y ect-divide-gray-100 ect-overflow-y-auto"},o6={__name:"ConfiguratorType",props:{title:{type:String,required:!0},description:{type:String,default:""},message:{type:String,default:""}},setup(e){return(n,t)=>(U(),Y("section",Z4,[b("header",J4,[b("div",Y4,[b("h2",e6,xe(e.title),1),e.description?(U(),Y("p",{key:0,class:"ect-mt-1 ect-text-xs ect-text-gray-500 ect-leading-tight",innerHTML:e.description},null,8,t6)):ge("",!0)]),e.message?(U(),Y("div",n6,[he(We,{icon:"info",symbol:"",color:"#198708",size:14,"data-test-id":"configurator-type-message-icon"}),b("span",r6,xe(e.message),1)])):ge("",!0)]),b("div",i6,[Je(n.$slots,"default")])]))}},a6={__name:"ShadowDisplay",props:{content:{type:String,required:!0}},setup(e){const n=e,t=te(null);let r=null;return Nt(()=>{t.value&&!r&&(r=t.value.attachShadow({mode:"open"}),r.innerHTML=n.content)}),Ye(()=>n.content,i=>{r&&(r.innerHTML=i)}),(i,o)=>(U(),Y("div",{ref_key:"host",ref:t},null,512))}},s6=["data-test-id"],l6=["data-test-id"],c6=["data-test-id"],u6=[b("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("g",{id:"Group"},[b("path",{id:"Vector",d:"M7 1.3125V12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"}),b("path",{id:"Vector_2",d:"M1.3125 7H12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)],f6=["data-test-id"],d6=["data-test-id"],h6=["data-test-id"],p6=["data-test-id"],v6=["data-test-id"],g6=["data-test-id","innerHTML"],hn={__name:"Tag",props:{label:{type:String,default:""},value:{type:String,default:""},addButton:{type:Boolean,default:!1},editButton:{type:Boolean,default:!1},dataTestId:{type:String,default:""}},setup(e){const n=e,t=me(()=>{const r=n.value;if(typeof r!="string")return!1;const i=new DOMParser().parseFromString(r,"text/html");return Array.from(i.body.childNodes).some(o=>o.nodeType===1)});return(r,i)=>e.addButton?(U(),Y("div",{key:0,class:"ect-bg-orange-4 ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-orange-secondary","data-test-id":e.dataTestId},[b("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-orange-secondary ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},[b("div",{"data-test-id":`${e.dataTestId}-add-icon`},u6,8,c6),Ne(" "+xe(e.label),1)],8,l6)],8,s6)):e.editButton?(U(),Y("div",{key:1,class:"ect-bg-white ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-success","data-test-id":e.dataTestId},[b("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-success ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},xe(e.label),9,d6)],8,f6)):(U(),Y("div",{key:2,class:"ect-bg-white ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-rounded-md ect-border ect-border-solid ect-border-neutral-200","data-test-id":e.dataTestId},[b("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-label`},xe(e.label),9,p6),e.value?(U(),Y("span",{key:0,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-separator`}," : ",8,v6)):ge("",!0),t.value?(U(),ke(a6,{key:1,content:e.value},null,8,["content"])):e.value?(U(),Y("span",{key:2,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-neutral-700","data-test-id":`${e.dataTestId}-value`,innerHTML:e.value},null,8,g6)):ge("",!0)],8,h6))}},m6=["data-test-id"],y6=["data-test-id"],x6=["data-test-id"],_6=["type","step","min","data-test-id"],fs=Le({__name:"InputEdit",props:{modelValue:{type:[String,Number],required:!0},type:{type:String,default:"string",validator:e=>["string","number","currency"].includes(e)},tag:{type:String,default:"span"},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:modelValue","change"],setup(e,{expose:n,emit:t}){const r=e,i=t,o=te(!1),a=te(!1),s=te(""),u=te(null),f=me(()=>r.type==="currency"?m(r.modelValue):r.type==="number"?y(r.modelValue):r.modelValue),c=me(()=>r.type==="string"?"text":"number"),v=me(()=>r.type==="currency"?"0.01":void 0),l=me(()=>r.type==="currency"?"0":void 0),h=()=>{r.disabled||(r.type==="currency"?s.value=parseFloat(r.modelValue)||"0.00":r.type==="number"?s.value=parseFloat(r.modelValue)||"0":s.value=r.modelValue,o.value=!0,sn(()=>{u.value&&(u.value.focus(),u.value.select())}))},p=()=>{let _=s.value;if(r.type==="number"||r.type==="currency"){const x=parseFloat(s.value);isNaN(x)?_=r.modelValue:_=r.type==="currency"?x.toFixed(2):x.toString()}_!==r.modelValue&&(i("update:modelValue",_),i("change",_)),o.value=!1},g=()=>{s.value=r.modelValue,o.value=!1},d=()=>{o.value&&p()},m=_=>!_||isNaN(_)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(parseFloat(_)),y=_=>!_||isNaN(_)?"0":new Intl.NumberFormat("en-US").format(parseFloat(_));return Ye(()=>r.modelValue,_=>{o.value||(s.value=_)}),n({startEditing:h,saveChanges:p,cancelEditing:g}),(_,x)=>{const C=a1("click-outside");return U(),Y("div",{class:"ect-relative ect-inline-block ect-min-w-[60px] ect-h-[30px]","data-test-id":e.dataTestId,onMouseenter:x[1]||(x[1]=S=>a.value=!0),onMouseleave:x[2]||(x[2]=S=>a.value=!1)},[o.value?ln((U(),Y("div",{key:1,class:"ect-w-full ect-h-full","data-test-id":`${e.dataTestId}-input-wrapper`},[ln(b("input",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":x[0]||(x[0]=S=>s.value=S),type:c.value,step:v.value,min:l.value,class:we(["ect-w-full ect-h-full ect-px-3 ect-bg-white ect-border ect-border-green-500 ect-rounded-sm ect-text-gray-700 ect-text-base ect-font-sans ect-outline-none ect-duration-200",_.$attrs.class]),"data-test-id":`${e.dataTestId}-input`,onKeyup:[ir(p,["enter"]),ir(g,["esc"])],onBlur:p},null,42,_6),[[Ah,s.value]])],8,x6)),[[C,d]]):(U(),Y("div",{key:0,class:we(["ect-flex ect-items-center ect-gap-2 ect-rounded ect-transition-colors ect-duration-200",{"ect-cursor-pointer":!e.disabled}]),"data-test-id":`${e.dataTestId}-display`,onClick:h},[(U(),ke(Wi(e.tag),ao(_.$attrs,{class:"ect-m-0 ect-text-inherit","data-test-id":`${e.dataTestId}-text`}),{default:Ve(()=>[Ne(xe(f.value)+" ",1),he(We,{class:we(a.value&&!e.disabled?"ect-visible":"ect-invisible"),icon:"edit",size:"12",color:"#828282","data-test-id":`${e.dataTestId}-edit-icon`},null,8,["class","data-test-id"])]),_:1},16,["data-test-id"]))],10,y6))],40,m6)}}},[["__scopeId","data-v-5cd60070"]]),b6=["data-test-id","data-publish-key"],C6={key:0,class:"ect-text-xs ect-text-gray-500 ect-text-white ect-font-medium ect-leading-tight ect-absolute ect-top-[-.7rem] ect-left-[-1rem] ect-bg-text-success ect-rounded-xl ect-px-2 ect-py-1"},w6={key:1,class:"ect-flex ect-items-start ect-gap-4 ect-p-3 ect-px-4"},E6={key:0,class:"ect-w-16 ect-h-16 ect-flex ect-items-center ect-justify-center ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0"},A6=["src","alt"],k6={class:"ect-flex-1 ect-min-w-0"},O6={class:"ect-flex ect-gap-4 ect-items-center ect-justify-between"},S6={class:"ect-flex ect-flex-row ect-gap-3"},I6=b("div",{class:"ect-w-px ect-h-auto ect-bg-gray-200 ect-mx-2"},null,-1),T6={class:"ect-flex ect-flex-col ect-max-w-[125px]"},B6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},D6=["innerHTML"],R6={key:0,class:"ect-flex ect-flex-wrap ect-gap-2.5 ect-mt-2"},L6=["data-test-id"],F6=["data-test-id"],N6={key:1,class:"ect-inline-block ect-mb-2"},P6={key:2,class:"ect-flex ect-flex-col ect-gap-3 ect-p-3 ect-h-full ect-justify-between"},M6={class:"ect-flex ect-items-start ect-gap-2"},q6={key:0,class:"ect-w-16 ect-h-16 ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0 ect-overflow-hidden"},$6=["src","alt"],j6={class:"ect-flex-1 ect-min-w-0"},H6={class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},V6=["innerHTML"],U6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},z6={key:0,class:"ect-flex ect-flex-wrap ect-gap-1.5"},K6=["data-test-id"],X6=["data-test-id"],W6={key:1,class:"ect-inline-block ect-mb-2"},G6={class:"ect-flex ect-justify-between ect-items-center"},Q6={class:"ect-flex ect-flex-col"},Z6=b("p",{class:"ect-text-xs ect-text-gray-500 ect-font-medium ect-leading-tight"},"Price",-1),J6={key:3,"data-test-id":"configurator-item-slot-details",class:"ect-bg-white ect-rounded-md"},Y6={__name:"ConfiguratorItem",props:{item:{type:Object,required:!0},name:{type:String,required:!0},description:{type:String,default:""},imageUrl:{type:String,default:""},price:{type:Number,required:!0},quantity:{type:Number,default:1},selected:{type:Boolean,default:!1},tags:{type:Array,default:()=>[]},attributes:{type:Array,default:()=>[]},size:{type:Number,default:1},minQuantity:{type:Number,default:null},maxQuantity:{type:Number,default:null},showImage:{type:Boolean,default:!1},option:{type:Object,default:null},isAttributes:{type:Boolean,default:!1},showAttributes:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:quantity","update:name","edit-attributes"],setup(e,{emit:n}){const t=e,r=n,i=te(null),o=te(0),a=te(t.item),s=me(()=>a.value.relationshipInfo.relationship==="Kit"?"ect-bg-green-3 ect-border-gray-200 ect-border-success":t.disabled?"ect-bg-light-bg-x ect-border-gray-200":t.selected?"ect-bg-green-3 ect-border-gray-200 ect-border-success":"ect-bg-white ect-border-gray-200 hover:ect-border-success"),u=me({get:()=>t.quantity,set:p=>r("update:quantity",p)}),f=me({get:()=>t.name,set:p=>r("update:name",p)}),c=p=>{r("update:quantity",p)},v=me(()=>{if(o.value===0)return t.tags;const g=Math.floor(o.value/120);return t.tags.slice(0,Math.max(1,g))}),l=me(()=>Math.max(0,t.tags.length-v.value.length)),h=()=>{if(i.value){const p=i.value,g=80,d=120,m=32,y=64;o.value=p.offsetWidth-g-d-m-y}};return Nt(()=>{sn(()=>{h()})}),Ye(()=>t.tags,()=>{sn(()=>{h()})},{deep:!0}),Nt(()=>{window.addEventListener("resize",h)}),(p,g)=>(U(),Y("div",{ref_key:"containerRef",ref:i,class:we(["ect-w-full ect-rounded-md ect-border-1 ect-transition-colors ect-relative",s.value]),"data-test-id":`configurator-item-${e.item.itemId}`,"data-publish-key":e.item.publishKey},[e.item.relationshipInfo.relationship==="Kit"?(U(),Y("div",C6," KIT ")):ge("",!0),e.size===1?(U(),Y("div",w6,[e.showImage?(U(),Y("div",E6,[e.imageUrl?(U(),Y("img",{key:0,src:e.imageUrl,alt:f.value,class:"ect-w-full ect-h-full ect-object-cover"},null,8,A6)):(U(),ke(We,{key:1,disabled:"",icon:"image",symbol:"",size:20,color:"#ACACAC"}))])):ge("",!0),b("div",k6,[b("div",O6,[he(fs,{modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=d=>f.value=d),tag:"h3","data-test-id":"itemId"+e.item.itemId,class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},null,8,["modelValue","data-test-id"]),b("div",S6,[b("div",{onClick:g[2]||(g[2]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[1]||(g[1]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),I6,b("div",T6,[he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[3]||(g[3]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])]),b("div",B6,[Je(p.$slots,"selection-control")])])]),b("p",{class:"ect-mt-2 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,D6),e.isAttributes&&e.showAttributes&&e.selected?(U(),Y("div",R6,[a.value.getTags().length>0?(U(),Y(be,{key:0},[(U(!0),Y(be,null,Me(v.value,(d,m)=>(U(),Y("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(U(),Y("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[4]||(g[4]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,L6)):ge("",!0),e.selected?(U(),Y("button",{key:1,"data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[5]||(g[5]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,F6)):ge("",!0)],64)):(U(),Y("span",N6,[b("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[6]||(g[6]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0)])])):(U(),Y("div",P6,[b("div",M6,[e.showImage?(U(),Y("div",q6,[e.imageUrl?(U(),Y("img",{key:0,src:e.imageUrl,alt:e.name,class:"ect-w-full ect-h-full ect-object-cover"},null,8,$6)):ge("",!0)])):ge("",!0),b("div",j6,[b("h3",H6,xe(e.name),1),b("p",{class:"ect-mt-1 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,V6)]),b("div",U6,[Je(p.$slots,"selection-control")])]),e.isAttributes&&e.showAttributes&&e.selected?(U(),Y("div",z6,[a.value.getTags().length>0?(U(),Y(be,{key:0},[(U(!0),Y(be,null,Me(v.value,(d,m)=>(U(),Y("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(U(),Y("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[7]||(g[7]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,K6)):ge("",!0),e.selected?(U(),Y("button",{key:1,class:"ect-ml-auto","data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[8]||(g[8]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,X6)):ge("",!0)],64)):(U(),Y("span",W6,[b("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[9]||(g[9]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0),b("div",G6,[b("div",{onClick:g[11]||(g[11]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[10]||(g[10]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),b("div",Q6,[Z6,he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[12]||(g[12]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-w-[125px] ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])])])])),e.selected&&e.isAttributes?(U(),Y("div",J6,[Je(p.$slots,"default")])):ge("",!0)],10,b6))}},e8={"af-ZA":",","sq-AL":",","ar-DZ":",","ar-BH":"٫","ar-EG":"٫","ar-IQ":"٫","ar-JO":"٫","ar-KW":"٫","ar-LB":"٫","ar-LY":",","ar-MA":",","ar-OM":"٫","ar-QA":"٫","ar-SA":"٫","ar-SD":"٫","ar-SY":"٫","ar-TN":",","ar-AE":"٫","ar-YE":"٫","hy-AM":",","az-AZ":",","bn-BD":".","bn-IN":".","eu-ES":",","be-BY":",","bs-BA":",","bg-BG":",","my-MM":".","ca-ES":",","ca-ES-EURO":",","zh-CN":".","zh-CN-PINYIN":".","zh-CN-STROKE":".","zh-HK":".","zh-HK-STROKE":".","zh-MO":".","zh-SG":".","zh-TW":".","zh-TW-STROKE":".","hr-HR":",","cs-CZ":",","da-DK":",","nl-AW":",","nl-BE":",","nl-NL":",","nl-SR":",","dz-BT":".","en-AG":".","en-AU":".","en-BS":".","en-BB":".","en-BZ":".","en-BM":".","en-BW":".","en-CM":".","en-CA":".","en-DE":",","en-KY":".","en-ER":".","en-FK":".","en-FJ":".","en-GM":".","en-GH":".","en-GI":".","en-GY":".","en-HK":".","en-IN":".","en-ID":".","en-IE":".","en-IE-EURO":".","en-JM":".","en-KE":".","en-LR":".","en-MG":".","en-MW":".","en-MY":".","en-MU":".","en-NA":".","en-NZ":".","en-NG":".","en-PK":".","en-PG":".","en-PH":".","en-RW":".","en-WS":".","en-SC":".","en-SL":".","en-SG":".","en-SX":".","en-SB":".","en-ZA":",","en-SH":".","en-SZ":".","en-TZ":".","en-TO":".","en-TT":".","en-UG":".","en-GB":".","en-US":".","en-VU":".","et-EE":",","fi-FI":",","fi-FI-EURO":",","fr-BE":",","fr-CA":",","fr-KM":",","fr-FR":",","fr-FR-EURO":",","fr-GN":",","fr-HT":",","fr-LU":",","fr-MR":",","fr-MC":",","fr-CH":",","fr-WF":",","ka-GE":",","de-AT":",","de-AT-EURO":",","de-BE":",","de-DE":",","de-DE-EURO":",","de-LU":",","de-LU-EURO":",","de-CH":".","el-GR":",","gu-IN":".","iw-IL":".","hi-IN":".","hu-HU":",","is-IS":",","in-ID":",","ga-IE":".","it-IT":",","it-CH":".","ja-JP":".","kn-IN":".","kk-KZ":",","km-KH":",","ko-KP":".","ko-KR":".","ky-KG":",","lo-LA":",","lv-LV":",","lt-LT":",","lu-CD":",","lb-LU":",","mk-MK":",","ms-BN":",","ms-MY":".","ml-IN":".","mt-MT":".","mi-NZ":".","mr-IN":".","ne-NP":".","no-NO":",","ps-AF":"٫","fa-IR":"٫","pl-PL":",","pt-AO":",","pt-BR":",","pt-CV":",","pt-MZ":",","pt-PT":",","pt-ST":",","ro-MD":",","ro-RO":",","rm-CH":".","rn-BI":",","ru-KZ":",","ru-RU":",","sr-BA":",","sr-RS":",","sh-BA":",","sh-ME":",","sh-ME-USD":",","sh-CS":",","sk-SK":",","sl-SI":",","so-DJ":".","so-SO":".","es-AR":",","es-BO":",","es-CL":",","es-CO":",","es-CR":",","es-CU":".","es-DO":".","es-EC":",","es-SV":".","es-GT":".","es-HN":".","es-MX":".","es-NI":".","es-PA":".","es-PY":",","es-PE":".","es-PR":".","es-ES":",","es-ES-EURO":",","es-US":".","es-UY":",","es-VE":",","sw-KE":".","sv-SE":",","tl-PH":".","tg-TJ":",","ta-IN":".","ta-LK":".","te-IN":".","th-TH":".","ti-ET":".","tr-TR":",","uk-UA":",","ur-PK":".","uz-LATN-UZ":",","vi-VN":",","cy-GB":".","xh-ZA":".","yo-BJ":".","zu-ZA":"."},t8={name:"CustomInput",components:{AppIcon:We},props:{editMode:{type:Boolean,default:!0},type:{type:String,default:"text"},max:{type:Number,default:500},label:{type:String,default:""},name:{type:String,default:""},showLabel:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},isReadOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},highlight:{type:Boolean,default:!1},placeholder:{type:String,default:""},error:{type:[Boolean,String],default:!1},cssClass:{type:Object,default:()=>({})},tooltip:{type:String,default:null},locale:{type:String,default:"en-US"},icon:{type:String,default:null},itooltip:{type:String,default:null},icolor:{type:String,default:"#7d7d7d"},ihover:{type:String,default:"#57c046"},icustom:{type:Boolean,default:!1},idisabled:{type:Boolean,default:!1},height:{type:Number,default:32},textAlignment:{type:String,default:"left"},decimalPrecision:{type:Number,default:0},allowNegatives:{type:Boolean,default:!1},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["update:modelValue","iclick","blur"],data(){return{initialValue:"",decimalSeprator:".",ctrl:!1}},computed:{getValue(){return this.modelValue?this.type==="currency"?String(this.modelValue).replace(".",this.decimalSeprator):String(this.modelValue):""},error_message(){return typeof this.error=="string"?this.error:this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},isHighlight(){return(this.initialValue===""||this.initialValue===null)&&(this.modelValue===""||this.modelValue===null)?!1:this.initialValue!==this.modelValue}},created(){this.initialValue=this.modelValue,this.decimalSeprator=this.type==="currency"?e8[this.locale]:"."},methods:{handlerInput(e){const n=e.target.value;this.type==="currency"?this.$emit("update:modelValue",n.replace(this.decimalSeprator,".")):this.$emit("update:modelValue",n)},preventNonNumeric(e){if(this.type==="number"){const n=this.decimalPrecision,t=e.target.value,r=e.key;if(["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(r)||this.allowNegatives&&r==="-")return;if(r==="."&&n===0){e.preventDefault();return}if(r==="."&&t.includes(".")){e.preventDefault();return}if(r==="."||t.includes(".")&&!t.endsWith(".")&&r!=="Backspace"){const i=t.split(".");if(i.length>1&&i[1].length>=n){e.preventDefault();return}}if(isNaN(r)&&![".","Backspace","Tab"].includes(r)){e.preventDefault();return}}if(e.key==="Backspace"||this.ctrl)return!0;if(e.key==="Control"&&(this.ctrl=!0),this.type==="currency"||this.type==="number"){if(!this.getValue.includes(this.decimalSeprator)&&e.key===this.decimalSeprator)return!0;/[\deE+\-]/.test(e.key)||e.preventDefault()}return!0},handlerKeyup(e){e.key==="Control"&&(this.ctrl=!1)}}},n8=["data-test-id"],r8=["for","data-test-id"],i8=["data-test-id"],o8=["id","type","name","disabled","placeholder","value","maxlength","readonly","data-test-id"],a8=["data-test-id"],s8=["data-test-id"];function l8(e,n,t,r,i,o){const a=er("AppIcon");return U(),Y("div",{class:"input","data-test-id":t.dataTestId},[t.label&&t.showLabel?(U(),Y("label",{key:0,class:we({error_color:!!t.error}),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Ne(xe(t.label)+" ",1),t.required?(U(),Y("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,r8)):ge("",!0),t.editMode?(U(),Y("div",{key:1,class:we(["input-wrapper ect-w-full",{errorBorder_color:!!t.error,highlight:o.isHighlight&&t.highlight}]),"data-test-id":`${t.dataTestId}-wrapper`},[t.icon?(U(),ke(a,{key:0,class:"input-wrapper_icon",icon:t.icon,hover:t.ihover,color:t.icolor,size:19,disabled:t.idisabled,custom:t.icustom,tooltip:t.itooltip,"data-test-id":`${t.dataTestId}-icon`,direction:"top-right",onClick:n[0]||(n[0]=s=>e.$emit("iclick"))},null,8,["icon","hover","color","disabled","custom","tooltip","data-test-id"])):ge("",!0),b("input",{id:t.label,class:we(`ectheme-input-box ${t.size}`),type:t.type,style:ze({width:t.icon?"calc(100% - 36px)":"100%",height:`${t.height}px`,textAlign:t.textAlignment}),name:t.name,disabled:t.disabled,placeholder:t.placeholder,value:o.getValue,maxlength:t.max,readonly:t.isReadOnly,"data-test-id":`${t.dataTestId}-input`,onInput:n[1]||(n[1]=(...s)=>o.handlerInput&&o.handlerInput(...s)),onKeydown:n[2]||(n[2]=(...s)=>o.preventNonNumeric&&o.preventNonNumeric(...s)),onKeyup:n[3]||(n[3]=(...s)=>o.handlerKeyup&&o.handlerKeyup(...s)),onBlur:n[4]||(n[4]=s=>e.$emit("blur"))},null,46,o8)],10,i8)):ge("",!0),t.editMode?ge("",!0):(U(),Y("p",{key:2,class:"value","data-test-id":`${t.dataTestId}-value`},xe(o.getValue),9,a8)),o.error_message?(U(),Y("div",{key:3,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,s8)):ge("",!0)],8,n8)}const c8=Le(t8,[["render",l8],["__scopeId","data-v-032ca141"]]),u8={name:"AtomSpinner",props:{dataTestId:{type:String,default:""}}},f8=["data-test-id"];function d8(e,n,t,r,i,o){return U(),Y("div",{class:"spinner","data-test-id":t.dataTestId},null,8,f8)}const h8={name:"CustomDropdown",components:{AppIcon:We,AtomSpinner:Le(u8,[["render",d8],["__scopeId","data-v-771ed032"]])},props:{label:{type:String,default:""},placeholder:{type:String,default:""},options:{type:Array,default:()=>[]},display:{type:Array,default:()=>[]},modelValue:{type:String,default:""},error:{type:[Boolean,String],default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},select:{type:Boolean,default:!1},lookup:{type:Boolean,default:!1},search:{type:Boolean,default:!1},badge:{type:String,default:void 0},highlight:{type:Boolean,default:!1},property:{type:Object,default:()=>({key:"value",value:"label",assigned:"assigned"})},dropdownTheme:{type:String,default:"light"},icon:{type:String,default:""},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["search","focus-in","focus-out","update:modelValue"],data:()=>({inputFocused:!1,value:"",isHover:!1,highlightedIndex:-1,initialValue:"",teleportStyle:{position:"absolute",top:"0px",left:"0px",width:"0px"}}),computed:{isHighlight(){return(this.initialValue===""||this.initialValue==null)&&(this.modelValue===""||this.modelValue==null)?!1:this.initialValue!==this.modelValue},error_message(){return this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},getOptions(){if(this.select&&this.search){const e=this.value.toLowerCase();return this.options.filter(n=>JSON.stringify(n).toLowerCase().includes(e))}else return this.options},getSelected(){let e=null;if(this.modelValue)e=this.options.find(n=>n[this.property.key]===this.modelValue);else if(!this.search){const n=this.options.find(t=>t[this.property.key]==="");n?e=n:this.placeholder?e={[this.property.value]:this.placeholder,[this.property.key]:""}:e={[this.property.value]:"--Select--",[this.property.key]:""}}return e||{[this.property.value]:this.placeholder||"--Select--",[this.property.key]:""}},shouldShowAbove(){if(!this.$refs.triggerElement)return!1;const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top;return t<n&&r>n},dropdownStyle(){if(!this.$refs.triggerElement)return{};const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;return{position:"absolute",top:i?"auto":"100%",bottom:i?"100%":"auto",left:"0",width:"100%",zIndex:1e3}}},created(){this.initialValue=this.modelValue},mounted(){window.addEventListener("resize",this.updateDropdownPosition),window.addEventListener("scroll",this.updateDropdownPosition,!0)},beforeUnmount(){window.removeEventListener("resize",this.updateDropdownPosition),window.removeEventListener("scroll",this.updateDropdownPosition,!0)},methods:{updateDropdownPosition(){if(!this.$refs.triggerElement)return;const e=this.$refs.triggerElement.getBoundingClientRect(),n=200,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;this.teleportStyle={position:"absolute",top:`${i?e.top-n:e.bottom}px`,left:`${e.left}px`,width:`${e.width}px`,zIndex:9999}},subFieldsText(e){if(!this.display||this.display.length<1)return"";const n=[];return this.display.forEach(t=>{const r=this.subField(e,t);r&&n.push(r)}),n.join(" | ")},subField(e,n){return n?n.split(".").reduce((i,o)=>i[o]||"",e):e},lookupSearchHandler:or(function(e){this.value=e,this.search&&!this.select&&this.$emit("search",e)}),handlerFocusIn(){!(this.modelValue&&this.search)&&!this.disabled&&(this.inputFocused=!0,this.updateDropdownPosition(),this.$emit("focus-in"))},updateSelected(e){e&&(this.value="",this.$emit("update:modelValue",e[this.property.key]),this.search&&!this.select&&!this.lookup&&this.$emit("search",""),this.onInputFocusedOut(!0))},clear(){this.disabled||(this.value="",this.$emit("update:modelValue",null),this.search&&!this.select&&!this.lookup&&this.$emit("search",""))},onInputFocusedOut(e=!1){(!this.isHover||e)&&!this.disabled&&(e?(this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")):setTimeout(()=>{this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")},100))},highlightNextOption(){this.highlightedIndex<this.options.length-1&&this.highlightedIndex++},highlightPreviousOption(){this.highlightedIndex>0&&this.highlightedIndex--}}},p8=["data-test-id"],v8=["for","data-test-id"],g8={class:"input-container-box ect-grow ect-w-full"},m8=["data-test-id"],y8=["placeholder","disabled","data-test-id"],x8=["data-test-id"],_8=["title","data-test-id"],b8=["data-test-id"],C8=["data-test-id"],w8=["data-test-id"],E8=["data-test-id"],A8=["data-test-id","onClick"],k8=["data-test-id"],O8={class:"ect-text-font-clr-light ect-flex ect-gap-2 ect-items-center ect-justify-between ect-w-full"},S8=["data-test-id"],I8=["data-test-id"],T8=["data-test-id"],B8=["title","data-test-id"],D8=["data-test-id"];function R8(e,n,t,r,i,o){const a=er("AppIcon"),s=er("AtomSpinner");return U(),Y("div",{ref:"dropdownWrapper",class:we(["customdropdown input-container",{dark:t.dropdownTheme==="dark"}]),"data-test-id":t.dataTestId,onMouseenter:n[7]||(n[7]=u=>e.isHover=!0),onMouseleave:n[8]||(n[8]=u=>e.isHover=!1)},[t.label?(U(),Y("label",{key:0,class:we(["title_label",{error_color:!!t.error}]),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Ne(xe(t.label)+" ",1),t.required?(U(),Y("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,v8)):ge("",!0),b("div",g8,[b("div",{ref:"triggerElement",class:we(["input-wrapper ectheme-input-box ect-w-full",{disabled:t.disabled,"input-error":t.error,highlight:o.isHighlight&&t.highlight,"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-trigger`,tabindex:"0",onFocusin:n[2]||(n[2]=(...u)=>o.handlerFocusIn&&o.handlerFocusIn(...u)),onFocusout:n[3]||(n[3]=u=>o.onInputFocusedOut(!1)),onKeydown:[n[4]||(n[4]=ir(u=>o.updateSelected(t.options[e.highlightedIndex]),["enter"])),n[5]||(n[5]=ir(mt((...u)=>o.highlightPreviousOption&&o.highlightPreviousOption(...u),["prevent"]),["up"])),n[6]||(n[6]=ir(mt((...u)=>o.highlightNextOption&&o.highlightNextOption(...u),["prevent"]),["down"]))]},[!t.modelValue&&t.search?ln((U(),Y("input",{key:0,ref:"searchInput","onUpdate:modelValue":n[0]||(n[0]=u=>e.value=u),type:"text",name:"search",placeholder:t.placeholder,autocomplete:"off",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-input`,onInput:n[1]||(n[1]=mt(u=>o.lookupSearchHandler(u.target.value),["prevent"]))},null,40,y8)),[[li,e.value]]):(U(),Y("div",{key:1,class:we(["selection-name ect-text-text-primary-dark ect-flex ect-justify-between ect-items-center",{"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-selection`},[o.getSelected?(U(),Y(be,{key:0},[b("span",{title:o.getSelected[t.property.value],class:we(["ect-flex ect-items-center ect-gap-2 ect-font-medium",{"ect-text-font-clr-light":!t.modelValue}]),"data-test-id":`${t.dataTestId}-selection-value`},[t.icon?(U(),ke(a,{key:0,class:"ect-mr-0",icon:t.icon,size:14,color:"#5F5F5F","data-test-id":`${t.dataTestId}-selection-icon`},null,8,["icon","data-test-id"])):ge("",!0),Ne(" "+xe(o.getSelected[t.property.value]),1)],10,_8),t.badge&&o.getSelected[t.badge]?(U(),Y("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-selection-badge`},xe(o.getSelected[t.badge]),9,b8)):ge("",!0)],64)):ge("",!0)],10,x8)),t.search?(U(),Y(be,{key:2},[t.loading?(U(),ke(s,{key:0,class:"spinner","data-test-id":`${t.dataTestId}-loading-spinner`},null,8,["data-test-id"])):(U(),Y("div",{key:1,class:"clear-button","data-test-id":`${t.dataTestId}-action-button`},[e.value||t.modelValue?(U(),ke(a,{key:0,disabled:t.disabled,icon:"close",color:"#acacac",size:10,"data-test-id":`${t.dataTestId}-clear-button`,onClick:o.clear},null,8,["disabled","data-test-id","onClick"])):(U(),ke(a,{key:1,icon:"search",size:14,color:"#acacac",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-button`},null,8,["disabled","data-test-id"]))],8,C8))],64)):(U(),ke(a,{key:3,class:"clear-button",color:o.error_message?"#ff6a6a":"#acacac",icon:"arrow_drop_up",size:12,disabled:t.disabled,"data-test-id":`${t.dataTestId}-dropdown-arrow`},null,8,["color","disabled","data-test-id"]))],42,m8),o.error_message?(U(),Y("div",{key:0,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,w8)):ge("",!0),o.getOptions&&e.inputFocused&&!t.disabled&&(t.select||t.lookup)?(U(),Y("div",{key:1,ref:"dropdown",class:we(["dropdown",{"dropdown-above":o.shouldShowAbove}]),style:ze(o.dropdownStyle),"data-test-id":`${t.dataTestId}-dropdown`},[(U(!0),Y(be,null,Me(o.getOptions,(u,f)=>(U(),Y("div",{key:u[t.property.key],class:we(["dropdown-item",{highlighted:f===e.highlightedIndex,"ect-pointer-events-none":u[t.property.assigned]}]),"data-test-id":`${t.dataTestId}-option-${f}`,onClick:c=>o.updateSelected(u)},[b("div",{class:"name ect-items-center","data-test-id":`${t.dataTestId}-option-${f}-name`},[b("span",O8,[b("span",{class:we({"ect-text-zinc-400":u[t.property.assigned]}),"data-test-id":`${t.dataTestId}-option-${f}-value`},xe(u[t.property.value]==null?"Key and Value is Wrong":u[t.property.value]),11,S8),u[t.property.assigned]?(U(),Y("span",{key:0,class:"ect-text-xs ect-leading-4 ect-text-zinc-600","data-test-id":`${t.dataTestId}-option-${f}-assigned`},"Assigned",8,I8)):ge("",!0)]),t.badge?(U(),Y("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-option-${f}-badge`},xe(u[t.badge]),9,T8)):ge("",!0)],8,k8),b("div",{class:"info",title:o.subFieldsText(u),"data-test-id":`${t.dataTestId}-option-${f}-info`},[b("span",null,xe(o.subFieldsText(u)),1)],8,B8)],10,A8))),128)),!o.getOptions.length&&!t.loading&&(e.value||t.select)?(U(),Y("div",{key:0,class:"no-items-found","data-test-id":`${t.dataTestId}-no-options`}," no options found ",8,D8)):ge("",!0)],14,E8)):ge("",!0)])],42,p8)}const R0=Le(h8,[["render",R8],["__scopeId","data-v-5ae4f6dc"]]);var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ds(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function L8(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function r(){return this instanceof r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),t}var L0={exports:{}};/*!
34
34
  * Quill Editor v1.3.7
35
35
  * https://quilljs.com/
36
36
  * Copyright (c) 2014, Jason Chen
@@ -50,27 +50,27 @@
50
50
  `)||this.appendChild(v.default.create("text",`
51
51
  `)),s(B.prototype.__proto__||Object.getPrototypeOf(B.prototype),"optimize",this).call(this,E);var k=this.next;k!=null&&k.prev===this&&k.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===k.statics.formats(k.domNode)&&(k.optimize(E),k.moveChildren(this),k.remove())}},{key:"replace",value:function(E){s(B.prototype.__proto__||Object.getPrototypeOf(B.prototype),"replace",this).call(this,E),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(k){var R=v.default.find(k);R==null?k.parentNode.removeChild(k):R instanceof v.default.Embed?R.remove():R.unwrap()})}}],[{key:"create",value:function(E){var k=s(B.__proto__||Object.getPrototypeOf(B),"create",this).call(this,E);return k.setAttribute("spellcheck",!1),k}},{key:"formats",value:function(){return!0}}]),B}(h.default);A.blotName="code-block",A.tagName="PRE",A.TAB=" ",r.Code=S,r.default=A},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},a=function(){function Q(N,w){var D=[],L=!0,$=!1,G=void 0;try{for(var j=N[Symbol.iterator](),W;!(L=(W=j.next()).done)&&(D.push(W.value),!(w&&D.length===w));L=!0);}catch(M){$=!0,G=M}finally{try{!L&&j.return&&j.return()}finally{if($)throw G}}return D}return function(N,w){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return Q(N,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function Q(N,w){for(var D=0;D<w.length;D++){var L=w[D];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(N,L.key,L)}}return function(N,w,D){return w&&Q(N.prototype,w),D&&Q(N,D),N}}(),u=i(2),f=k(u),c=i(20),v=k(c),l=i(0),h=k(l),p=i(13),g=k(p),d=i(24),m=k(d),y=i(4),_=k(y),x=i(16),C=k(x),S=i(21),A=k(S),I=i(11),B=k(I),O=i(3),E=k(O);function k(Q){return Q&&Q.__esModule?Q:{default:Q}}function R(Q,N,w){return N in Q?Object.defineProperty(Q,N,{value:w,enumerable:!0,configurable:!0,writable:!0}):Q[N]=w,Q}function F(Q,N){if(!(Q instanceof N))throw new TypeError("Cannot call a class as a function")}var q=/^[ -~]*$/,Z=function(){function Q(N){F(this,Q),this.scroll=N,this.delta=this.getDelta()}return s(Q,[{key:"applyDelta",value:function(w){var D=this,L=!1;this.scroll.update();var $=this.scroll.length();return this.scroll.batchStart(),w=ne(w),w.reduce(function(G,j){var W=j.retain||j.delete||j.insert.length||1,M=j.attributes||{};if(j.insert!=null){if(typeof j.insert=="string"){var H=j.insert;H.endsWith(`
52
52
  `)&&L&&(L=!1,H=H.slice(0,-1)),G>=$&&!H.endsWith(`
53
- `)&&(L=!0),D.scroll.insertAt(G,H);var V=D.scroll.line(G),K=a(V,2),J=K[0],P=K[1],X=(0,E.default)({},(0,y.bubbleFormats)(J));if(J instanceof _.default){var se=J.descendant(h.default.Leaf,P),fe=a(se,1),ce=fe[0];X=(0,E.default)(X,(0,y.bubbleFormats)(ce))}M=v.default.attributes.diff(X,M)||{}}else if(o(j.insert)==="object"){var ie=Object.keys(j.insert)[0];if(ie==null)return G;D.scroll.insertAt(G,ie,j.insert[ie])}$+=W}return Object.keys(M).forEach(function(oe){D.scroll.formatAt(G,W,oe,M[oe])}),G+W},0),w.reduce(function(G,j){return typeof j.delete=="number"?(D.scroll.deleteAt(G,j.delete),G):G+(j.retain||j.insert.length||1)},0),this.scroll.batchEnd(),this.update(w)}},{key:"deleteText",value:function(w,D){return this.scroll.deleteAt(w,D),this.update(new f.default().retain(w).delete(D))}},{key:"formatLine",value:function(w,D){var L=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys($).forEach(function(G){if(!(L.scroll.whitelist!=null&&!L.scroll.whitelist[G])){var j=L.scroll.lines(w,Math.max(D,1)),W=D;j.forEach(function(M){var H=M.length();if(!(M instanceof g.default))M.format(G,$[G]);else{var V=w-M.offset(L.scroll),K=M.newlineIndex(V+W)-V+1;M.formatAt(V,K,G,$[G])}W-=H})}}),this.scroll.optimize(),this.update(new f.default().retain(w).retain(D,(0,A.default)($)))}},{key:"formatText",value:function(w,D){var L=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys($).forEach(function(G){L.scroll.formatAt(w,D,G,$[G])}),this.update(new f.default().retain(w).retain(D,(0,A.default)($)))}},{key:"getContents",value:function(w,D){return this.delta.slice(w,w+D)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(w,D){return w.concat(D.delta())},new f.default)}},{key:"getFormat",value:function(w){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L=[],$=[];D===0?this.scroll.path(w).forEach(function(j){var W=a(j,1),M=W[0];M instanceof _.default?L.push(M):M instanceof h.default.Leaf&&$.push(M)}):(L=this.scroll.lines(w,D),$=this.scroll.descendants(h.default.Leaf,w,D));var G=[L,$].map(function(j){if(j.length===0)return{};for(var W=(0,y.bubbleFormats)(j.shift());Object.keys(W).length>0;){var M=j.shift();if(M==null)return W;W=ee((0,y.bubbleFormats)(M),W)}return W});return E.default.apply(E.default,G)}},{key:"getText",value:function(w,D){return this.getContents(w,D).filter(function(L){return typeof L.insert=="string"}).map(function(L){return L.insert}).join("")}},{key:"insertEmbed",value:function(w,D,L){return this.scroll.insertAt(w,D,L),this.update(new f.default().retain(w).insert(R({},D,L)))}},{key:"insertText",value:function(w,D){var L=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return D=D.replace(/\r\n/g,`
53
+ `)&&(L=!0),D.scroll.insertAt(G,H);var V=D.scroll.line(G),K=a(V,2),J=K[0],P=K[1],X=(0,E.default)({},(0,y.bubbleFormats)(J));if(J instanceof _.default){var se=J.descendant(h.default.Leaf,P),fe=a(se,1),ue=fe[0];X=(0,E.default)(X,(0,y.bubbleFormats)(ue))}M=v.default.attributes.diff(X,M)||{}}else if(o(j.insert)==="object"){var ie=Object.keys(j.insert)[0];if(ie==null)return G;D.scroll.insertAt(G,ie,j.insert[ie])}$+=W}return Object.keys(M).forEach(function(oe){D.scroll.formatAt(G,W,oe,M[oe])}),G+W},0),w.reduce(function(G,j){return typeof j.delete=="number"?(D.scroll.deleteAt(G,j.delete),G):G+(j.retain||j.insert.length||1)},0),this.scroll.batchEnd(),this.update(w)}},{key:"deleteText",value:function(w,D){return this.scroll.deleteAt(w,D),this.update(new f.default().retain(w).delete(D))}},{key:"formatLine",value:function(w,D){var L=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys($).forEach(function(G){if(!(L.scroll.whitelist!=null&&!L.scroll.whitelist[G])){var j=L.scroll.lines(w,Math.max(D,1)),W=D;j.forEach(function(M){var H=M.length();if(!(M instanceof g.default))M.format(G,$[G]);else{var V=w-M.offset(L.scroll),K=M.newlineIndex(V+W)-V+1;M.formatAt(V,K,G,$[G])}W-=H})}}),this.scroll.optimize(),this.update(new f.default().retain(w).retain(D,(0,A.default)($)))}},{key:"formatText",value:function(w,D){var L=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys($).forEach(function(G){L.scroll.formatAt(w,D,G,$[G])}),this.update(new f.default().retain(w).retain(D,(0,A.default)($)))}},{key:"getContents",value:function(w,D){return this.delta.slice(w,w+D)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(w,D){return w.concat(D.delta())},new f.default)}},{key:"getFormat",value:function(w){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L=[],$=[];D===0?this.scroll.path(w).forEach(function(j){var W=a(j,1),M=W[0];M instanceof _.default?L.push(M):M instanceof h.default.Leaf&&$.push(M)}):(L=this.scroll.lines(w,D),$=this.scroll.descendants(h.default.Leaf,w,D));var G=[L,$].map(function(j){if(j.length===0)return{};for(var W=(0,y.bubbleFormats)(j.shift());Object.keys(W).length>0;){var M=j.shift();if(M==null)return W;W=ee((0,y.bubbleFormats)(M),W)}return W});return E.default.apply(E.default,G)}},{key:"getText",value:function(w,D){return this.getContents(w,D).filter(function(L){return typeof L.insert=="string"}).map(function(L){return L.insert}).join("")}},{key:"insertEmbed",value:function(w,D,L){return this.scroll.insertAt(w,D,L),this.update(new f.default().retain(w).insert(R({},D,L)))}},{key:"insertText",value:function(w,D){var L=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return D=D.replace(/\r\n/g,`
54
54
  `).replace(/\r/g,`
55
55
  `),this.scroll.insertAt(w,D),Object.keys($).forEach(function(G){L.scroll.formatAt(w,D.length,G,$[G])}),this.update(new f.default().retain(w).insert(D,(0,A.default)($)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var w=this.scroll.children.head;return w.statics.blotName!==_.default.blotName||w.children.length>1?!1:w.children.head instanceof C.default}},{key:"removeFormat",value:function(w,D){var L=this.getText(w,D),$=this.scroll.line(w+D),G=a($,2),j=G[0],W=G[1],M=0,H=new f.default;j!=null&&(j instanceof g.default?M=j.newlineIndex(W)-W+1:M=j.length()-W,H=j.delta().slice(W,W+M-1).insert(`
56
56
  `));var V=this.getContents(w,D+M),K=V.diff(new f.default().insert(L).concat(H)),J=new f.default().retain(w).concat(K);return this.applyDelta(J)}},{key:"update",value:function(w){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,$=this.delta;if(D.length===1&&D[0].type==="characterData"&&D[0].target.data.match(q)&&h.default.find(D[0].target)){var G=h.default.find(D[0].target),j=(0,y.bubbleFormats)(G),W=G.offset(this.scroll),M=D[0].oldValue.replace(m.default.CONTENTS,""),H=new f.default().insert(M),V=new f.default().insert(G.value()),K=new f.default().retain(W).concat(H.diff(V,L));w=K.reduce(function(J,P){return P.insert?J.insert(P.insert,j):J.push(P)},new f.default),this.delta=$.compose(w)}else this.delta=this.getDelta(),(!w||!(0,B.default)($.compose(w),this.delta))&&(w=$.diff(this.delta,L));return w}}]),Q}();function ee(Q,N){return Object.keys(N).reduce(function(w,D){return Q[D]==null||(N[D]===Q[D]?w[D]=N[D]:Array.isArray(N[D])?N[D].indexOf(Q[D])<0&&(w[D]=N[D].concat([Q[D]])):w[D]=[N[D],Q[D]]),w},{})}function ne(Q){return Q.reduce(function(N,w){if(w.insert===1){var D=(0,A.default)(w.attributes);return delete D.image,N.insert({image:w.attributes.image},D)}if(w.attributes!=null&&(w.attributes.list===!0||w.attributes.bullet===!0)&&(w=(0,A.default)(w),w.attributes.list?w.attributes.list="ordered":(w.attributes.list="bullet",delete w.attributes.bullet)),typeof w.insert=="string"){var L=w.insert.replace(/\r\n/g,`
57
57
  `).replace(/\r/g,`
58
58
  `);return N.insert(L,w.attributes)}return N.push(w)},new f.default)}r.default=Z},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var o=function(){function I(B,O){var E=[],k=!0,R=!1,F=void 0;try{for(var q=B[Symbol.iterator](),Z;!(k=(Z=q.next()).done)&&(E.push(Z.value),!(O&&E.length===O));k=!0);}catch(ee){R=!0,F=ee}finally{try{!k&&q.return&&q.return()}finally{if(R)throw F}}return E}return function(B,O){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return I(B,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function I(B,O){for(var E=0;E<O.length;E++){var k=O[E];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(B,k.key,k)}}return function(B,O,E){return O&&I(B.prototype,O),E&&I(B,E),B}}(),s=i(0),u=m(s),f=i(21),c=m(f),v=i(11),l=m(v),h=i(8),p=m(h),g=i(10),d=m(g);function m(I){return I&&I.__esModule?I:{default:I}}function y(I){if(Array.isArray(I)){for(var B=0,O=Array(I.length);B<I.length;B++)O[B]=I[B];return O}else return Array.from(I)}function _(I,B){if(!(I instanceof B))throw new TypeError("Cannot call a class as a function")}var x=(0,d.default)("quill:selection"),C=function I(B){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;_(this,I),this.index=B,this.length=O},S=function(){function I(B,O){var E=this;_(this,I),this.emitter=O,this.scroll=B,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=u.default.create("cursor",this),this.lastRange=this.savedRange=new C(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){E.mouseDown||setTimeout(E.update.bind(E,p.default.sources.USER),1)}),this.emitter.on(p.default.events.EDITOR_CHANGE,function(k,R){k===p.default.events.TEXT_CHANGE&&R.length()>0&&E.update(p.default.sources.SILENT)}),this.emitter.on(p.default.events.SCROLL_BEFORE_UPDATE,function(){if(E.hasFocus()){var k=E.getNativeRange();k!=null&&k.start.node!==E.cursor.textNode&&E.emitter.once(p.default.events.SCROLL_UPDATE,function(){try{E.setNativeRange(k.start.node,k.start.offset,k.end.node,k.end.offset)}catch{}})}}),this.emitter.on(p.default.events.SCROLL_OPTIMIZE,function(k,R){if(R.range){var F=R.range,q=F.startNode,Z=F.startOffset,ee=F.endNode,ne=F.endOffset;E.setNativeRange(q,Z,ee,ne)}}),this.update(p.default.sources.SILENT)}return a(I,[{key:"handleComposition",value:function(){var O=this;this.root.addEventListener("compositionstart",function(){O.composing=!0}),this.root.addEventListener("compositionend",function(){if(O.composing=!1,O.cursor.parent){var E=O.cursor.restore();if(!E)return;setTimeout(function(){O.setNativeRange(E.startNode,E.startOffset,E.endNode,E.endOffset)},1)}})}},{key:"handleDragging",value:function(){var O=this;this.emitter.listenDOM("mousedown",document.body,function(){O.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){O.mouseDown=!1,O.update(p.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(O,E){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[O])){this.scroll.update();var k=this.getNativeRange();if(!(k==null||!k.native.collapsed||u.default.query(O,u.default.Scope.BLOCK))){if(k.start.node!==this.cursor.textNode){var R=u.default.find(k.start.node,!1);if(R==null)return;if(R instanceof u.default.Leaf){var F=R.split(k.start.offset);R.parent.insertBefore(this.cursor,F)}else R.insertBefore(this.cursor,k.start.node);this.cursor.attach()}this.cursor.format(O,E),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(O){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,k=this.scroll.length();O=Math.min(O,k-1),E=Math.min(O+E,k-1)-O;var R=void 0,F=this.scroll.leaf(O),q=o(F,2),Z=q[0],ee=q[1];if(Z==null)return null;var ne=Z.position(ee,!0),Q=o(ne,2);R=Q[0],ee=Q[1];var N=document.createRange();if(E>0){N.setStart(R,ee);var w=this.scroll.leaf(O+E),D=o(w,2);if(Z=D[0],ee=D[1],Z==null)return null;var L=Z.position(ee,!0),$=o(L,2);return R=$[0],ee=$[1],N.setEnd(R,ee),N.getBoundingClientRect()}else{var G="left",j=void 0;return R instanceof Text?(ee<R.data.length?(N.setStart(R,ee),N.setEnd(R,ee+1)):(N.setStart(R,ee-1),N.setEnd(R,ee),G="right"),j=N.getBoundingClientRect()):(j=Z.domNode.getBoundingClientRect(),ee>0&&(G="right")),{bottom:j.top+j.height,height:j.height,left:j[G],right:j[G],top:j.top,width:0}}}},{key:"getNativeRange",value:function(){var O=document.getSelection();if(O==null||O.rangeCount<=0)return null;var E=O.getRangeAt(0);if(E==null)return null;var k=this.normalizeNative(E);return x.info("getNativeRange",k),k}},{key:"getRange",value:function(){var O=this.getNativeRange();if(O==null)return[null,null];var E=this.normalizedToRange(O);return[E,O]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(O){var E=this,k=[[O.start.node,O.start.offset]];O.native.collapsed||k.push([O.end.node,O.end.offset]);var R=k.map(function(Z){var ee=o(Z,2),ne=ee[0],Q=ee[1],N=u.default.find(ne,!0),w=N.offset(E.scroll);return Q===0?w:N instanceof u.default.Container?w+N.length():w+N.index(ne,Q)}),F=Math.min(Math.max.apply(Math,y(R)),this.scroll.length()-1),q=Math.min.apply(Math,[F].concat(y(R)));return new C(q,F-q)}},{key:"normalizeNative",value:function(O){if(!A(this.root,O.startContainer)||!O.collapsed&&!A(this.root,O.endContainer))return null;var E={start:{node:O.startContainer,offset:O.startOffset},end:{node:O.endContainer,offset:O.endOffset},native:O};return[E.start,E.end].forEach(function(k){for(var R=k.node,F=k.offset;!(R instanceof Text)&&R.childNodes.length>0;)if(R.childNodes.length>F)R=R.childNodes[F],F=0;else if(R.childNodes.length===F)R=R.lastChild,F=R instanceof Text?R.data.length:R.childNodes.length+1;else break;k.node=R,k.offset=F}),E}},{key:"rangeToNative",value:function(O){var E=this,k=O.collapsed?[O.index]:[O.index,O.index+O.length],R=[],F=this.scroll.length();return k.forEach(function(q,Z){q=Math.min(F-1,q);var ee=void 0,ne=E.scroll.leaf(q),Q=o(ne,2),N=Q[0],w=Q[1],D=N.position(w,Z!==0),L=o(D,2);ee=L[0],w=L[1],R.push(ee,w)}),R.length<2&&(R=R.concat(R)),R}},{key:"scrollIntoView",value:function(O){var E=this.lastRange;if(E!=null){var k=this.getBounds(E.index,E.length);if(k!=null){var R=this.scroll.length()-1,F=this.scroll.line(Math.min(E.index,R)),q=o(F,1),Z=q[0],ee=Z;if(E.length>0){var ne=this.scroll.line(Math.min(E.index+E.length,R)),Q=o(ne,1);ee=Q[0]}if(!(Z==null||ee==null)){var N=O.getBoundingClientRect();k.top<N.top?O.scrollTop-=N.top-k.top:k.bottom>N.bottom&&(O.scrollTop+=k.bottom-N.bottom)}}}}},{key:"setNativeRange",value:function(O,E){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:O,R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:E,F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(x.info("setNativeRange",O,E,k,R),!(O!=null&&(this.root.parentNode==null||O.parentNode==null||k.parentNode==null))){var q=document.getSelection();if(q!=null)if(O!=null){this.hasFocus()||this.root.focus();var Z=(this.getNativeRange()||{}).native;if(Z==null||F||O!==Z.startContainer||E!==Z.startOffset||k!==Z.endContainer||R!==Z.endOffset){O.tagName=="BR"&&(E=[].indexOf.call(O.parentNode.childNodes,O),O=O.parentNode),k.tagName=="BR"&&(R=[].indexOf.call(k.parentNode.childNodes,k),k=k.parentNode);var ee=document.createRange();ee.setStart(O,E),ee.setEnd(k,R),q.removeAllRanges(),q.addRange(ee)}}else q.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(O){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.default.sources.API;if(typeof E=="string"&&(k=E,E=!1),x.info("setRange",O),O!=null){var R=this.rangeToNative(O);this.setNativeRange.apply(this,y(R).concat([E]))}else this.setNativeRange(null);this.update(k)}},{key:"update",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.default.sources.USER,E=this.lastRange,k=this.getRange(),R=o(k,2),F=R[0],q=R[1];if(this.lastRange=F,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,l.default)(E,this.lastRange)){var Z;!this.composing&&q!=null&&q.native.collapsed&&q.start.node!==this.cursor.textNode&&this.cursor.restore();var ee=[p.default.events.SELECTION_CHANGE,(0,c.default)(this.lastRange),(0,c.default)(E),O];if((Z=this.emitter).emit.apply(Z,[p.default.events.EDITOR_CHANGE].concat(ee)),O!==p.default.sources.SILENT){var ne;(ne=this.emitter).emit.apply(ne,ee)}}}}]),I}();function A(I,B){try{B.parentNode}catch{return!1}return B instanceof Text&&(B=B.parentNode),I.contains(B)}r.Range=C,r.default=S},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function p(g,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,d,m){return d&&p(g.prototype,d),m&&p(g,m),g}}(),a=function p(g,d,m){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,d);if(y===void 0){var _=Object.getPrototypeOf(g);return _===null?void 0:p(_,d,m)}else{if("value"in y)return y.value;var x=y.get;return x===void 0?void 0:x.call(m)}},s=i(0),u=f(s);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function v(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function l(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h=function(p){l(g,p);function g(){return c(this,g),v(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return o(g,[{key:"insertInto",value:function(m,y){m.children.length===0?a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"insertInto",this).call(this,m,y):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),g}(u.default.Embed);h.blotName="break",h.tagName="BR",r.default=h},function(t,r,i){var o=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,h){l.__proto__=h}||function(l,h){for(var p in h)h.hasOwnProperty(p)&&(l[p]=h[p])};return function(l,h){v(l,h);function p(){this.constructor=l}l.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(44),s=i(30),u=i(1),f=function(v){o(l,v);function l(h){var p=v.call(this,h)||this;return p.build(),p}return l.prototype.appendChild=function(h){this.insertBefore(h)},l.prototype.attach=function(){v.prototype.attach.call(this),this.children.forEach(function(h){h.attach()})},l.prototype.build=function(){var h=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(p){try{var g=c(p);h.insertBefore(g,h.children.head||void 0)}catch(d){if(d instanceof u.ParchmentError)return;throw d}})},l.prototype.deleteAt=function(h,p){if(h===0&&p===this.length())return this.remove();this.children.forEachAt(h,p,function(g,d,m){g.deleteAt(d,m)})},l.prototype.descendant=function(h,p){var g=this.children.find(p),d=g[0],m=g[1];return h.blotName==null&&h(d)||h.blotName!=null&&d instanceof h?[d,m]:d instanceof l?d.descendant(h,m):[null,-1]},l.prototype.descendants=function(h,p,g){p===void 0&&(p=0),g===void 0&&(g=Number.MAX_VALUE);var d=[],m=g;return this.children.forEachAt(p,g,function(y,_,x){(h.blotName==null&&h(y)||h.blotName!=null&&y instanceof h)&&d.push(y),y instanceof l&&(d=d.concat(y.descendants(h,_,m))),m-=x}),d},l.prototype.detach=function(){this.children.forEach(function(h){h.detach()}),v.prototype.detach.call(this)},l.prototype.formatAt=function(h,p,g,d){this.children.forEachAt(h,p,function(m,y,_){m.formatAt(y,_,g,d)})},l.prototype.insertAt=function(h,p,g){var d=this.children.find(h),m=d[0],y=d[1];if(m)m.insertAt(y,p,g);else{var _=g==null?u.create("text",p):u.create(p,g);this.appendChild(_)}},l.prototype.insertBefore=function(h,p){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(g){return h instanceof g}))throw new u.ParchmentError("Cannot insert "+h.statics.blotName+" into "+this.statics.blotName);h.insertInto(this,p)},l.prototype.length=function(){return this.children.reduce(function(h,p){return h+p.length()},0)},l.prototype.moveChildren=function(h,p){this.children.forEach(function(g){h.insertBefore(g,p)})},l.prototype.optimize=function(h){if(v.prototype.optimize.call(this,h),this.children.length===0)if(this.statics.defaultChild!=null){var p=u.create(this.statics.defaultChild);this.appendChild(p),p.optimize(h)}else this.remove()},l.prototype.path=function(h,p){p===void 0&&(p=!1);var g=this.children.find(h,p),d=g[0],m=g[1],y=[[this,h]];return d instanceof l?y.concat(d.path(m,p)):(d!=null&&y.push([d,m]),y)},l.prototype.removeChild=function(h){this.children.remove(h)},l.prototype.replace=function(h){h instanceof l&&h.moveChildren(this),v.prototype.replace.call(this,h)},l.prototype.split=function(h,p){if(p===void 0&&(p=!1),!p){if(h===0)return this;if(h===this.length())return this.next}var g=this.clone();return this.parent.insertBefore(g,this.next),this.children.forEachAt(h,this.length(),function(d,m,y){d=d.split(m,p),g.appendChild(d)}),g},l.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},l.prototype.update=function(h,p){var g=this,d=[],m=[];h.forEach(function(y){y.target===g.domNode&&y.type==="childList"&&(d.push.apply(d,y.addedNodes),m.push.apply(m,y.removedNodes))}),m.forEach(function(y){if(!(y.parentNode!=null&&y.tagName!=="IFRAME"&&document.body.compareDocumentPosition(y)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var _=u.find(y);_!=null&&(_.domNode.parentNode==null||_.domNode.parentNode===g.domNode)&&_.detach()}}),d.filter(function(y){return y.parentNode==g.domNode}).sort(function(y,_){return y===_?0:y.compareDocumentPosition(_)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(y){var _=null;y.nextSibling!=null&&(_=u.find(y.nextSibling));var x=c(y);(x.next!=_||x.next==null)&&(x.parent!=null&&x.parent.removeChild(g),g.insertBefore(x,_||void 0))})},l}(s.default);function c(v){var l=u.find(v);if(l==null)try{l=u.create(v)}catch{l=u.create(u.Scope.INLINE),[].slice.call(v.childNodes).forEach(function(p){l.domNode.appendChild(p)}),v.parentNode&&v.parentNode.replaceChild(l.domNode,v),l.attach()}return l}r.default=f},function(t,r,i){var o=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,h){l.__proto__=h}||function(l,h){for(var p in h)h.hasOwnProperty(p)&&(l[p]=h[p])};return function(l,h){v(l,h);function p(){this.constructor=l}l.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(12),s=i(31),u=i(17),f=i(1),c=function(v){o(l,v);function l(h){var p=v.call(this,h)||this;return p.attributes=new s.default(p.domNode),p}return l.formats=function(h){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return h.tagName.toLowerCase()},l.prototype.format=function(h,p){var g=f.query(h);g instanceof a.default?this.attributes.attribute(g,p):p&&g!=null&&(h!==this.statics.blotName||this.formats()[h]!==p)&&this.replaceWith(h,p)},l.prototype.formats=function(){var h=this.attributes.values(),p=this.statics.formats(this.domNode);return p!=null&&(h[this.statics.blotName]=p),h},l.prototype.replaceWith=function(h,p){var g=v.prototype.replaceWith.call(this,h,p);return this.attributes.copy(g),g},l.prototype.update=function(h,p){var g=this;v.prototype.update.call(this,h,p),h.some(function(d){return d.target===g.domNode&&d.type==="attributes"})&&this.attributes.build()},l.prototype.wrap=function(h,p){var g=v.prototype.wrap.call(this,h,p);return g instanceof l&&g.statics.scope===this.statics.scope&&this.attributes.move(g),g},l}(u.default);r.default=c},function(t,r,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var l in v)v.hasOwnProperty(l)&&(c[l]=v[l])};return function(c,v){f(c,v);function l(){this.constructor=c}c.prototype=v===null?Object.create(v):(l.prototype=v.prototype,new l)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(30),s=i(1),u=function(f){o(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.value=function(v){return!0},c.prototype.index=function(v,l){return this.domNode===v||this.domNode.compareDocumentPosition(v)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(l,1):-1},c.prototype.position=function(v,l){var h=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return v>0&&(h+=1),[this.parent.domNode,h]},c.prototype.value=function(){var v;return v={},v[this.statics.blotName]=this.statics.value(this.domNode)||!0,v},c.scope=s.Scope.INLINE_BLOT,c}(a.default);r.default=u},function(t,r,i){var o=i(11),a=i(3),s={attributes:{compose:function(f,c,v){typeof f!="object"&&(f={}),typeof c!="object"&&(c={});var l=a(!0,{},c);v||(l=Object.keys(l).reduce(function(p,g){return l[g]!=null&&(p[g]=l[g]),p},{}));for(var h in f)f[h]!==void 0&&c[h]===void 0&&(l[h]=f[h]);return Object.keys(l).length>0?l:void 0},diff:function(f,c){typeof f!="object"&&(f={}),typeof c!="object"&&(c={});var v=Object.keys(f).concat(Object.keys(c)).reduce(function(l,h){return o(f[h],c[h])||(l[h]=c[h]===void 0?null:c[h]),l},{});return Object.keys(v).length>0?v:void 0},transform:function(f,c,v){if(typeof f!="object")return c;if(typeof c=="object"){if(!v)return c;var l=Object.keys(c).reduce(function(h,p){return f[p]===void 0&&(h[p]=c[p]),h},{});return Object.keys(l).length>0?l:void 0}}},iterator:function(f){return new u(f)},length:function(f){return typeof f.delete=="number"?f.delete:typeof f.retain=="number"?f.retain:typeof f.insert=="string"?f.insert.length:1}};function u(f){this.ops=f,this.index=0,this.offset=0}u.prototype.hasNext=function(){return this.peekLength()<1/0},u.prototype.next=function(f){f||(f=1/0);var c=this.ops[this.index];if(c){var v=this.offset,l=s.length(c);if(f>=l-v?(f=l-v,this.index+=1,this.offset=0):this.offset+=f,typeof c.delete=="number")return{delete:f};var h={};return c.attributes&&(h.attributes=c.attributes),typeof c.retain=="number"?h.retain=f:typeof c.insert=="string"?h.insert=c.insert.substr(v,f):h.insert=c.insert,h}else return{retain:1/0}},u.prototype.peek=function(){return this.ops[this.index]},u.prototype.peekLength=function(){return this.ops[this.index]?s.length(this.ops[this.index])-this.offset:1/0},u.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},u.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var f=this.offset,c=this.index,v=this.next(),l=this.ops.slice(this.index);return this.offset=f,this.index=c,[v].concat(l)}else return[]},t.exports=s},function(t,r){var i=function(){function o(g,d){return d!=null&&g instanceof d}var a;try{a=Map}catch{a=function(){}}var s;try{s=Set}catch{s=function(){}}var u;try{u=Promise}catch{u=function(){}}function f(g,d,m,y,_){typeof d=="object"&&(m=d.depth,y=d.prototype,_=d.includeNonEnumerable,d=d.circular);var x=[],C=[],S=typeof Buffer<"u";typeof d>"u"&&(d=!0),typeof m>"u"&&(m=1/0);function A(I,B){if(I===null)return null;if(B===0)return I;var O,E;if(typeof I!="object")return I;if(o(I,a))O=new a;else if(o(I,s))O=new s;else if(o(I,u))O=new u(function(N,w){I.then(function(D){N(A(D,B-1))},function(D){w(A(D,B-1))})});else if(f.__isArray(I))O=[];else if(f.__isRegExp(I))O=new RegExp(I.source,p(I)),I.lastIndex&&(O.lastIndex=I.lastIndex);else if(f.__isDate(I))O=new Date(I.getTime());else{if(S&&Buffer.isBuffer(I))return Buffer.allocUnsafe?O=Buffer.allocUnsafe(I.length):O=new Buffer(I.length),I.copy(O),O;o(I,Error)?O=Object.create(I):typeof y>"u"?(E=Object.getPrototypeOf(I),O=Object.create(E)):(O=Object.create(y),E=y)}if(d){var k=x.indexOf(I);if(k!=-1)return C[k];x.push(I),C.push(O)}o(I,a)&&I.forEach(function(N,w){var D=A(w,B-1),L=A(N,B-1);O.set(D,L)}),o(I,s)&&I.forEach(function(N){var w=A(N,B-1);O.add(w)});for(var R in I){var F;E&&(F=Object.getOwnPropertyDescriptor(E,R)),!(F&&F.set==null)&&(O[R]=A(I[R],B-1))}if(Object.getOwnPropertySymbols)for(var q=Object.getOwnPropertySymbols(I),R=0;R<q.length;R++){var Z=q[R],ee=Object.getOwnPropertyDescriptor(I,Z);ee&&!ee.enumerable&&!_||(O[Z]=A(I[Z],B-1),ee.enumerable||Object.defineProperty(O,Z,{enumerable:!1}))}if(_)for(var ne=Object.getOwnPropertyNames(I),R=0;R<ne.length;R++){var Q=ne[R],ee=Object.getOwnPropertyDescriptor(I,Q);ee&&ee.enumerable||(O[Q]=A(I[Q],B-1),Object.defineProperty(O,Q,{enumerable:!1}))}return O}return A(g,m)}f.clonePrototype=function(d){if(d===null)return null;var m=function(){};return m.prototype=d,new m};function c(g){return Object.prototype.toString.call(g)}f.__objToStr=c;function v(g){return typeof g=="object"&&c(g)==="[object Date]"}f.__isDate=v;function l(g){return typeof g=="object"&&c(g)==="[object Array]"}f.__isArray=l;function h(g){return typeof g=="object"&&c(g)==="[object RegExp]"}f.__isRegExp=h;function p(g){var d="";return g.global&&(d+="g"),g.ignoreCase&&(d+="i"),g.multiline&&(d+="m"),d}return f.__getRegExpFlags=p,f}();typeof t=="object"&&t.exports&&(t.exports=i)},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function O(E,k){var R=[],F=!0,q=!1,Z=void 0;try{for(var ee=E[Symbol.iterator](),ne;!(F=(ne=ee.next()).done)&&(R.push(ne.value),!(k&&R.length===k));F=!0);}catch(Q){q=!0,Z=Q}finally{try{!F&&ee.return&&ee.return()}finally{if(q)throw Z}}return R}return function(E,k){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return O(E,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function O(E,k){for(var R=0;R<k.length;R++){var F=k[R];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(E,F.key,F)}}return function(E,k,R){return k&&O(E.prototype,k),R&&O(E,R),E}}(),s=function O(E,k,R){E===null&&(E=Function.prototype);var F=Object.getOwnPropertyDescriptor(E,k);if(F===void 0){var q=Object.getPrototypeOf(E);return q===null?void 0:O(q,k,R)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(R)}},u=i(0),f=x(u),c=i(8),v=x(c),l=i(4),h=x(l),p=i(16),g=x(p),d=i(13),m=x(d),y=i(25),_=x(y);function x(O){return O&&O.__esModule?O:{default:O}}function C(O,E){if(!(O instanceof E))throw new TypeError("Cannot call a class as a function")}function S(O,E){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:O}function A(O,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);O.prototype=Object.create(E&&E.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(O,E):O.__proto__=E)}function I(O){return O instanceof h.default||O instanceof l.BlockEmbed}var B=function(O){A(E,O);function E(k,R){C(this,E);var F=S(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,k));return F.emitter=R.emitter,Array.isArray(R.whitelist)&&(F.whitelist=R.whitelist.reduce(function(q,Z){return q[Z]=!0,q},{})),F.domNode.addEventListener("DOMNodeInserted",function(){}),F.optimize(),F.enable(),F}return a(E,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(R,F){var q=this.line(R),Z=o(q,2),ee=Z[0],ne=Z[1],Q=this.line(R+F),N=o(Q,1),w=N[0];if(s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"deleteAt",this).call(this,R,F),w!=null&&ee!==w&&ne>0){if(ee instanceof l.BlockEmbed||w instanceof l.BlockEmbed){this.optimize();return}if(ee instanceof m.default){var D=ee.newlineIndex(ee.length(),!0);if(D>-1&&(ee=ee.split(D+1),ee===w)){this.optimize();return}}else if(w instanceof m.default){var L=w.newlineIndex(0);L>-1&&w.split(L+1)}var $=w.children.head instanceof g.default?null:w.children.head;ee.moveChildren(w,$),ee.remove()}this.optimize()}},{key:"enable",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",R)}},{key:"formatAt",value:function(R,F,q,Z){this.whitelist!=null&&!this.whitelist[q]||(s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"formatAt",this).call(this,R,F,q,Z),this.optimize())}},{key:"insertAt",value:function(R,F,q){if(!(q!=null&&this.whitelist!=null&&!this.whitelist[F])){if(R>=this.length())if(q==null||f.default.query(F,f.default.Scope.BLOCK)==null){var Z=f.default.create(this.statics.defaultChild);this.appendChild(Z),q==null&&F.endsWith(`
59
- `)&&(F=F.slice(0,-1)),Z.insertAt(0,F,q)}else{var ee=f.default.create(F,q);this.appendChild(ee)}else s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertAt",this).call(this,R,F,q);this.optimize()}}},{key:"insertBefore",value:function(R,F){if(R.statics.scope===f.default.Scope.INLINE_BLOT){var q=f.default.create(this.statics.defaultChild);q.appendChild(R),R=q}s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertBefore",this).call(this,R,F)}},{key:"leaf",value:function(R){return this.path(R).pop()||[null,-1]}},{key:"line",value:function(R){return R===this.length()?this.line(R-1):this.descendant(I,R)}},{key:"lines",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,q=function Z(ee,ne,Q){var N=[],w=Q;return ee.children.forEachAt(ne,Q,function(D,L,$){I(D)?N.push(D):D instanceof f.default.Container&&(N=N.concat(Z(D,L,w))),w-=$}),N};return q(this,R,F)}},{key:"optimize",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,R,F),R.length>0&&this.emitter.emit(v.default.events.SCROLL_OPTIMIZE,R,F))}},{key:"path",value:function(R){return s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"path",this).call(this,R).slice(1)}},{key:"update",value:function(R){if(this.batch!==!0){var F=v.default.sources.USER;typeof R=="string"&&(F=R),Array.isArray(R)||(R=this.observer.takeRecords()),R.length>0&&this.emitter.emit(v.default.events.SCROLL_BEFORE_UPDATE,F,R),s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"update",this).call(this,R.concat([])),R.length>0&&this.emitter.emit(v.default.events.SCROLL_UPDATE,F,R)}}}]),E}(f.default.Scroll);B.blotName="scroll",B.className="ql-editor",B.tagName="DIV",B.defaultChild="block",B.allowedChildren=[h.default,l.BlockEmbed,_.default],r.default=B},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},a=function(){function j(W,M){var H=[],V=!0,K=!1,J=void 0;try{for(var P=W[Symbol.iterator](),X;!(V=(X=P.next()).done)&&(H.push(X.value),!(M&&H.length===M));V=!0);}catch(se){K=!0,J=se}finally{try{!V&&P.return&&P.return()}finally{if(K)throw J}}return H}return function(W,M){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return j(W,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function j(W,M){for(var H=0;H<M.length;H++){var V=M[H];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(W,V.key,V)}}return function(W,M,H){return M&&j(W.prototype,M),H&&j(W,H),W}}(),u=i(21),f=O(u),c=i(11),v=O(c),l=i(3),h=O(l),p=i(2),g=O(p),d=i(20),m=O(d),y=i(0),_=O(y),x=i(5),C=O(x),S=i(10),A=O(S),I=i(9),B=O(I);function O(j){return j&&j.__esModule?j:{default:j}}function E(j,W,M){return W in j?Object.defineProperty(j,W,{value:M,enumerable:!0,configurable:!0,writable:!0}):j[W]=M,j}function k(j,W){if(!(j instanceof W))throw new TypeError("Cannot call a class as a function")}function R(j,W){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W&&(typeof W=="object"||typeof W=="function")?W:j}function F(j,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof W);j.prototype=Object.create(W&&W.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),W&&(Object.setPrototypeOf?Object.setPrototypeOf(j,W):j.__proto__=W)}var q=(0,A.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",ee=function(j){F(W,j),s(W,null,[{key:"match",value:function(H,V){return V=G(V),["altKey","ctrlKey","metaKey","shiftKey"].some(function(K){return!!V[K]!==H[K]&&V[K]!==null})?!1:V.key===(H.which||H.keyCode)}}]);function W(M,H){k(this,W);var V=R(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,M,H));return V.bindings={},Object.keys(V.options.bindings).forEach(function(K){K==="list autofill"&&M.scroll.whitelist!=null&&!M.scroll.whitelist.list||V.options.bindings[K]&&V.addBinding(V.options.bindings[K])}),V.addBinding({key:W.keys.ENTER,shiftKey:null},D),V.addBinding({key:W.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(V.addBinding({key:W.keys.BACKSPACE},{collapsed:!0},Q),V.addBinding({key:W.keys.DELETE},{collapsed:!0},N)):(V.addBinding({key:W.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},Q),V.addBinding({key:W.keys.DELETE},{collapsed:!0,suffix:/^.?$/},N)),V.addBinding({key:W.keys.BACKSPACE},{collapsed:!1},w),V.addBinding({key:W.keys.DELETE},{collapsed:!1},w),V.addBinding({key:W.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},Q),V.listen(),V}return s(W,[{key:"addBinding",value:function(H){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},J=G(H);if(J==null||J.key==null)return q.warn("Attempted to add invalid keyboard binding",J);typeof V=="function"&&(V={handler:V}),typeof K=="function"&&(K={handler:K}),J=(0,h.default)(J,V,K),this.bindings[J.key]=this.bindings[J.key]||[],this.bindings[J.key].push(J)}},{key:"listen",value:function(){var H=this;this.quill.root.addEventListener("keydown",function(V){if(!V.defaultPrevented){var K=V.which||V.keyCode,J=(H.bindings[K]||[]).filter(function(Te){return W.match(V,Te)});if(J.length!==0){var P=H.quill.getSelection();if(!(P==null||!H.quill.hasFocus())){var X=H.quill.getLine(P.index),se=a(X,2),fe=se[0],ce=se[1],ie=H.quill.getLeaf(P.index),oe=a(ie,2),le=oe[0],ue=oe[1],ae=P.length===0?[le,ue]:H.quill.getLeaf(P.index+P.length),ve=a(ae,2),ye=ve[0],_e=ve[1],Ce=le instanceof _.default.Text?le.value().slice(0,ue):"",Ae=ye instanceof _.default.Text?ye.value().slice(_e):"",Ee={collapsed:P.length===0,empty:P.length===0&&fe.length()<=1,format:H.quill.getFormat(P),offset:ce,prefix:Ce,suffix:Ae},$e=J.some(function(Te){if(Te.collapsed!=null&&Te.collapsed!==Ee.collapsed||Te.empty!=null&&Te.empty!==Ee.empty||Te.offset!=null&&Te.offset!==Ee.offset)return!1;if(Array.isArray(Te.format)){if(Te.format.every(function(Ke){return Ee.format[Ke]==null}))return!1}else if(o(Te.format)==="object"&&!Object.keys(Te.format).every(function(Ke){return Te.format[Ke]===!0?Ee.format[Ke]!=null:Te.format[Ke]===!1?Ee.format[Ke]==null:(0,v.default)(Te.format[Ke],Ee.format[Ke])}))return!1;return Te.prefix!=null&&!Te.prefix.test(Ee.prefix)||Te.suffix!=null&&!Te.suffix.test(Ee.suffix)?!1:Te.handler.call(H,P,Ee)!==!0});$e&&V.preventDefault()}}}})}}]),W}(B.default);ee.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},ee.DEFAULTS={bindings:{bold:$("bold"),italic:$("italic"),underline:$("underline"),indent:{key:ee.keys.TAB,format:["blockquote","indent","list"],handler:function(W,M){if(M.collapsed&&M.offset!==0)return!0;this.quill.format("indent","+1",C.default.sources.USER)}},outdent:{key:ee.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(W,M){if(M.collapsed&&M.offset!==0)return!0;this.quill.format("indent","-1",C.default.sources.USER)}},"outdent backspace":{key:ee.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(W,M){M.format.indent!=null?this.quill.format("indent","-1",C.default.sources.USER):M.format.list!=null&&this.quill.format("list",!1,C.default.sources.USER)}},"indent code-block":L(!0),"outdent code-block":L(!1),"remove tab":{key:ee.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(W){this.quill.deleteText(W.index-1,1,C.default.sources.USER)}},tab:{key:ee.keys.TAB,handler:function(W){this.quill.history.cutoff();var M=new g.default().retain(W.index).delete(W.length).insert(" ");this.quill.updateContents(M,C.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index+1,C.default.sources.SILENT)}},"list empty enter":{key:ee.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(W,M){this.quill.format("list",!1,C.default.sources.USER),M.format.indent&&this.quill.format("indent",!1,C.default.sources.USER)}},"checklist enter":{key:ee.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(W){var M=this.quill.getLine(W.index),H=a(M,2),V=H[0],K=H[1],J=(0,h.default)({},V.formats(),{list:"checked"}),P=new g.default().retain(W.index).insert(`
59
+ `)&&(F=F.slice(0,-1)),Z.insertAt(0,F,q)}else{var ee=f.default.create(F,q);this.appendChild(ee)}else s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertAt",this).call(this,R,F,q);this.optimize()}}},{key:"insertBefore",value:function(R,F){if(R.statics.scope===f.default.Scope.INLINE_BLOT){var q=f.default.create(this.statics.defaultChild);q.appendChild(R),R=q}s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertBefore",this).call(this,R,F)}},{key:"leaf",value:function(R){return this.path(R).pop()||[null,-1]}},{key:"line",value:function(R){return R===this.length()?this.line(R-1):this.descendant(I,R)}},{key:"lines",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,q=function Z(ee,ne,Q){var N=[],w=Q;return ee.children.forEachAt(ne,Q,function(D,L,$){I(D)?N.push(D):D instanceof f.default.Container&&(N=N.concat(Z(D,L,w))),w-=$}),N};return q(this,R,F)}},{key:"optimize",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,R,F),R.length>0&&this.emitter.emit(v.default.events.SCROLL_OPTIMIZE,R,F))}},{key:"path",value:function(R){return s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"path",this).call(this,R).slice(1)}},{key:"update",value:function(R){if(this.batch!==!0){var F=v.default.sources.USER;typeof R=="string"&&(F=R),Array.isArray(R)||(R=this.observer.takeRecords()),R.length>0&&this.emitter.emit(v.default.events.SCROLL_BEFORE_UPDATE,F,R),s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"update",this).call(this,R.concat([])),R.length>0&&this.emitter.emit(v.default.events.SCROLL_UPDATE,F,R)}}}]),E}(f.default.Scroll);B.blotName="scroll",B.className="ql-editor",B.tagName="DIV",B.defaultChild="block",B.allowedChildren=[h.default,l.BlockEmbed,_.default],r.default=B},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},a=function(){function j(W,M){var H=[],V=!0,K=!1,J=void 0;try{for(var P=W[Symbol.iterator](),X;!(V=(X=P.next()).done)&&(H.push(X.value),!(M&&H.length===M));V=!0);}catch(se){K=!0,J=se}finally{try{!V&&P.return&&P.return()}finally{if(K)throw J}}return H}return function(W,M){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return j(W,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function j(W,M){for(var H=0;H<M.length;H++){var V=M[H];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(W,V.key,V)}}return function(W,M,H){return M&&j(W.prototype,M),H&&j(W,H),W}}(),u=i(21),f=O(u),c=i(11),v=O(c),l=i(3),h=O(l),p=i(2),g=O(p),d=i(20),m=O(d),y=i(0),_=O(y),x=i(5),C=O(x),S=i(10),A=O(S),I=i(9),B=O(I);function O(j){return j&&j.__esModule?j:{default:j}}function E(j,W,M){return W in j?Object.defineProperty(j,W,{value:M,enumerable:!0,configurable:!0,writable:!0}):j[W]=M,j}function k(j,W){if(!(j instanceof W))throw new TypeError("Cannot call a class as a function")}function R(j,W){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W&&(typeof W=="object"||typeof W=="function")?W:j}function F(j,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof W);j.prototype=Object.create(W&&W.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),W&&(Object.setPrototypeOf?Object.setPrototypeOf(j,W):j.__proto__=W)}var q=(0,A.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",ee=function(j){F(W,j),s(W,null,[{key:"match",value:function(H,V){return V=G(V),["altKey","ctrlKey","metaKey","shiftKey"].some(function(K){return!!V[K]!==H[K]&&V[K]!==null})?!1:V.key===(H.which||H.keyCode)}}]);function W(M,H){k(this,W);var V=R(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,M,H));return V.bindings={},Object.keys(V.options.bindings).forEach(function(K){K==="list autofill"&&M.scroll.whitelist!=null&&!M.scroll.whitelist.list||V.options.bindings[K]&&V.addBinding(V.options.bindings[K])}),V.addBinding({key:W.keys.ENTER,shiftKey:null},D),V.addBinding({key:W.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(V.addBinding({key:W.keys.BACKSPACE},{collapsed:!0},Q),V.addBinding({key:W.keys.DELETE},{collapsed:!0},N)):(V.addBinding({key:W.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},Q),V.addBinding({key:W.keys.DELETE},{collapsed:!0,suffix:/^.?$/},N)),V.addBinding({key:W.keys.BACKSPACE},{collapsed:!1},w),V.addBinding({key:W.keys.DELETE},{collapsed:!1},w),V.addBinding({key:W.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},Q),V.listen(),V}return s(W,[{key:"addBinding",value:function(H){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},J=G(H);if(J==null||J.key==null)return q.warn("Attempted to add invalid keyboard binding",J);typeof V=="function"&&(V={handler:V}),typeof K=="function"&&(K={handler:K}),J=(0,h.default)(J,V,K),this.bindings[J.key]=this.bindings[J.key]||[],this.bindings[J.key].push(J)}},{key:"listen",value:function(){var H=this;this.quill.root.addEventListener("keydown",function(V){if(!V.defaultPrevented){var K=V.which||V.keyCode,J=(H.bindings[K]||[]).filter(function(Te){return W.match(V,Te)});if(J.length!==0){var P=H.quill.getSelection();if(!(P==null||!H.quill.hasFocus())){var X=H.quill.getLine(P.index),se=a(X,2),fe=se[0],ue=se[1],ie=H.quill.getLeaf(P.index),oe=a(ie,2),le=oe[0],ce=oe[1],ae=P.length===0?[le,ce]:H.quill.getLeaf(P.index+P.length),ve=a(ae,2),ye=ve[0],_e=ve[1],Ce=le instanceof _.default.Text?le.value().slice(0,ce):"",Ae=ye instanceof _.default.Text?ye.value().slice(_e):"",Ee={collapsed:P.length===0,empty:P.length===0&&fe.length()<=1,format:H.quill.getFormat(P),offset:ue,prefix:Ce,suffix:Ae},$e=J.some(function(Te){if(Te.collapsed!=null&&Te.collapsed!==Ee.collapsed||Te.empty!=null&&Te.empty!==Ee.empty||Te.offset!=null&&Te.offset!==Ee.offset)return!1;if(Array.isArray(Te.format)){if(Te.format.every(function(Ke){return Ee.format[Ke]==null}))return!1}else if(o(Te.format)==="object"&&!Object.keys(Te.format).every(function(Ke){return Te.format[Ke]===!0?Ee.format[Ke]!=null:Te.format[Ke]===!1?Ee.format[Ke]==null:(0,v.default)(Te.format[Ke],Ee.format[Ke])}))return!1;return Te.prefix!=null&&!Te.prefix.test(Ee.prefix)||Te.suffix!=null&&!Te.suffix.test(Ee.suffix)?!1:Te.handler.call(H,P,Ee)!==!0});$e&&V.preventDefault()}}}})}}]),W}(B.default);ee.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},ee.DEFAULTS={bindings:{bold:$("bold"),italic:$("italic"),underline:$("underline"),indent:{key:ee.keys.TAB,format:["blockquote","indent","list"],handler:function(W,M){if(M.collapsed&&M.offset!==0)return!0;this.quill.format("indent","+1",C.default.sources.USER)}},outdent:{key:ee.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(W,M){if(M.collapsed&&M.offset!==0)return!0;this.quill.format("indent","-1",C.default.sources.USER)}},"outdent backspace":{key:ee.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(W,M){M.format.indent!=null?this.quill.format("indent","-1",C.default.sources.USER):M.format.list!=null&&this.quill.format("list",!1,C.default.sources.USER)}},"indent code-block":L(!0),"outdent code-block":L(!1),"remove tab":{key:ee.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(W){this.quill.deleteText(W.index-1,1,C.default.sources.USER)}},tab:{key:ee.keys.TAB,handler:function(W){this.quill.history.cutoff();var M=new g.default().retain(W.index).delete(W.length).insert(" ");this.quill.updateContents(M,C.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index+1,C.default.sources.SILENT)}},"list empty enter":{key:ee.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(W,M){this.quill.format("list",!1,C.default.sources.USER),M.format.indent&&this.quill.format("indent",!1,C.default.sources.USER)}},"checklist enter":{key:ee.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(W){var M=this.quill.getLine(W.index),H=a(M,2),V=H[0],K=H[1],J=(0,h.default)({},V.formats(),{list:"checked"}),P=new g.default().retain(W.index).insert(`
60
60
  `,J).retain(V.length()-K-1).retain(1,{list:"unchecked"});this.quill.updateContents(P,C.default.sources.USER),this.quill.setSelection(W.index+1,C.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:ee.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(W,M){var H=this.quill.getLine(W.index),V=a(H,2),K=V[0],J=V[1],P=new g.default().retain(W.index).insert(`
61
- `,M.format).retain(K.length()-J-1).retain(1,{header:null});this.quill.updateContents(P,C.default.sources.USER),this.quill.setSelection(W.index+1,C.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(W,M){var H=M.prefix.length,V=this.quill.getLine(W.index),K=a(V,2),J=K[0],P=K[1];if(P>H)return!0;var X=void 0;switch(M.prefix.trim()){case"[]":case"[ ]":X="unchecked";break;case"[x]":X="checked";break;case"-":case"*":X="bullet";break;default:X="ordered"}this.quill.insertText(W.index," ",C.default.sources.USER),this.quill.history.cutoff();var se=new g.default().retain(W.index-P).delete(H+1).retain(J.length()-2-P).retain(1,{list:X});this.quill.updateContents(se,C.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index-H,C.default.sources.SILENT)}},"code exit":{key:ee.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(W){var M=this.quill.getLine(W.index),H=a(M,2),V=H[0],K=H[1],J=new g.default().retain(W.index+V.length()-K-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(J,C.default.sources.USER)}},"embed left":ne(ee.keys.LEFT,!1),"embed left shift":ne(ee.keys.LEFT,!0),"embed right":ne(ee.keys.RIGHT,!1),"embed right shift":ne(ee.keys.RIGHT,!0)}};function ne(j,W){var M,H=j===ee.keys.LEFT?"prefix":"suffix";return M={key:j,shiftKey:W,altKey:null},E(M,H,/^$/),E(M,"handler",function(K){var J=K.index;j===ee.keys.RIGHT&&(J+=K.length+1);var P=this.quill.getLeaf(J),X=a(P,1),se=X[0];return se instanceof _.default.Embed?(j===ee.keys.LEFT?W?this.quill.setSelection(K.index-1,K.length+1,C.default.sources.USER):this.quill.setSelection(K.index-1,C.default.sources.USER):W?this.quill.setSelection(K.index,K.length+1,C.default.sources.USER):this.quill.setSelection(K.index+K.length+1,C.default.sources.USER),!1):!0}),M}function Q(j,W){if(!(j.index===0||this.quill.getLength()<=1)){var M=this.quill.getLine(j.index),H=a(M,1),V=H[0],K={};if(W.offset===0){var J=this.quill.getLine(j.index-1),P=a(J,1),X=P[0];if(X!=null&&X.length()>1){var se=V.formats(),fe=this.quill.getFormat(j.index-1,1);K=m.default.attributes.diff(se,fe)||{}}}var ce=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(W.prefix)?2:1;this.quill.deleteText(j.index-ce,ce,C.default.sources.USER),Object.keys(K).length>0&&this.quill.formatLine(j.index-ce,ce,K,C.default.sources.USER),this.quill.focus()}}function N(j,W){var M=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(W.suffix)?2:1;if(!(j.index>=this.quill.getLength()-M)){var H={},V=0,K=this.quill.getLine(j.index),J=a(K,1),P=J[0];if(W.offset>=P.length()-1){var X=this.quill.getLine(j.index+1),se=a(X,1),fe=se[0];if(fe){var ce=P.formats(),ie=this.quill.getFormat(j.index,1);H=m.default.attributes.diff(ce,ie)||{},V=fe.length()}}this.quill.deleteText(j.index,M,C.default.sources.USER),Object.keys(H).length>0&&this.quill.formatLine(j.index+V-1,M,H,C.default.sources.USER)}}function w(j){var W=this.quill.getLines(j),M={};if(W.length>1){var H=W[0].formats(),V=W[W.length-1].formats();M=m.default.attributes.diff(V,H)||{}}this.quill.deleteText(j,C.default.sources.USER),Object.keys(M).length>0&&this.quill.formatLine(j.index,1,M,C.default.sources.USER),this.quill.setSelection(j.index,C.default.sources.SILENT),this.quill.focus()}function D(j,W){var M=this;j.length>0&&this.quill.scroll.deleteAt(j.index,j.length);var H=Object.keys(W.format).reduce(function(V,K){return _.default.query(K,_.default.Scope.BLOCK)&&!Array.isArray(W.format[K])&&(V[K]=W.format[K]),V},{});this.quill.insertText(j.index,`
62
- `,H,C.default.sources.USER),this.quill.setSelection(j.index+1,C.default.sources.SILENT),this.quill.focus(),Object.keys(W.format).forEach(function(V){H[V]==null&&(Array.isArray(W.format[V])||V!=="link"&&M.quill.format(V,W.format[V],C.default.sources.USER))})}function L(j){return{key:ee.keys.TAB,shiftKey:!j,format:{"code-block":!0},handler:function(M){var H=_.default.query("code-block"),V=M.index,K=M.length,J=this.quill.scroll.descendant(H,V),P=a(J,2),X=P[0],se=P[1];if(X!=null){var fe=this.quill.getIndex(X),ce=X.newlineIndex(se,!0)+1,ie=X.newlineIndex(fe+se+K),oe=X.domNode.textContent.slice(ce,ie).split(`
63
- `);se=0,oe.forEach(function(le,ue){j?(X.insertAt(ce+se,H.TAB),se+=H.TAB.length,ue===0?V+=H.TAB.length:K+=H.TAB.length):le.startsWith(H.TAB)&&(X.deleteAt(ce+se,H.TAB.length),se-=H.TAB.length,ue===0?V-=H.TAB.length:K-=H.TAB.length),se+=le.length+1}),this.quill.update(C.default.sources.USER),this.quill.setSelection(V,K,C.default.sources.SILENT)}}}}function $(j){return{key:j[0].toUpperCase(),shortKey:!0,handler:function(M,H){this.quill.format(j,!H.format[j],C.default.sources.USER)}}}function G(j){if(typeof j=="string"||typeof j=="number")return G({key:j});if((typeof j>"u"?"undefined":o(j))==="object"&&(j=(0,f.default)(j,!1)),typeof j.key=="string")if(ee.keys[j.key.toUpperCase()]!=null)j.key=ee.keys[j.key.toUpperCase()];else if(j.key.length===1)j.key=j.key.toUpperCase().charCodeAt(0);else return null;return j.shortKey&&(j[Z]=j.shortKey,delete j.shortKey),j}r.default=ee,r.SHORTKEY=Z},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function m(y,_){var x=[],C=!0,S=!1,A=void 0;try{for(var I=y[Symbol.iterator](),B;!(C=(B=I.next()).done)&&(x.push(B.value),!(_&&x.length===_));C=!0);}catch(O){S=!0,A=O}finally{try{!C&&I.return&&I.return()}finally{if(S)throw A}}return x}return function(y,_){if(Array.isArray(y))return y;if(Symbol.iterator in Object(y))return m(y,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function m(y,_,x){y===null&&(y=Function.prototype);var C=Object.getOwnPropertyDescriptor(y,_);if(C===void 0){var S=Object.getPrototypeOf(y);return S===null?void 0:m(S,_,x)}else{if("value"in C)return C.value;var A=C.get;return A===void 0?void 0:A.call(x)}},s=function(){function m(y,_){for(var x=0;x<_.length;x++){var C=_[x];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(y,C.key,C)}}return function(y,_,x){return _&&m(y.prototype,_),x&&m(y,x),y}}(),u=i(0),f=l(u),c=i(7),v=l(c);function l(m){return m&&m.__esModule?m:{default:m}}function h(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function p(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function g(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var d=function(m){g(y,m),s(y,null,[{key:"value",value:function(){}}]);function y(_,x){h(this,y);var C=p(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,_));return C.selection=x,C.textNode=document.createTextNode(y.CONTENTS),C.domNode.appendChild(C.textNode),C._length=0,C}return s(y,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(x,C){if(this._length!==0)return a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,x,C);for(var S=this,A=0;S!=null&&S.statics.scope!==f.default.Scope.BLOCK_BLOT;)A+=S.offset(S.parent),S=S.parent;S!=null&&(this._length=y.CONTENTS.length,S.optimize(),S.formatAt(A,y.CONTENTS.length,x,C),this._length=0)}},{key:"index",value:function(x,C){return x===this.textNode?0:a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"index",this).call(this,x,C)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var x=this.textNode,C=this.selection.getNativeRange(),S=void 0,A=void 0,I=void 0;if(C!=null&&C.start.node===x&&C.end.node===x){var B=[x,C.start.offset,C.end.offset];S=B[0],A=B[1],I=B[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==y.CONTENTS){var O=this.textNode.data.split(y.CONTENTS).join("");this.next instanceof v.default?(S=this.next.domNode,this.next.insertAt(0,O),this.textNode.data=y.CONTENTS):(this.textNode.data=O,this.parent.insertBefore(f.default.create(this.textNode),this),this.textNode=document.createTextNode(y.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),A!=null){var E=[A,I].map(function(R){return Math.max(0,Math.min(S.data.length,R-1))}),k=o(E,2);return A=k[0],I=k[1],{startNode:S,startOffset:A,endNode:S,endOffset:I}}}}},{key:"update",value:function(x,C){var S=this;if(x.some(function(I){return I.type==="characterData"&&I.target===S.textNode})){var A=this.restore();A&&(C.range=A)}}},{key:"value",value:function(){return""}}]),y}(f.default.Embed);d.blotName="cursor",d.className="ql-cursor",d.tagName="span",d.CONTENTS="\uFEFF",r.default=d},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(0),a=f(o),s=i(4),u=f(s);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function v(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function l(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h=function(p){l(g,p);function g(){return c(this,g),v(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g}(a.default.Container);h.allowedChildren=[u.default,s.BlockEmbed,h],r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var o=function(){function d(m,y){for(var _=0;_<y.length;_++){var x=y[_];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,y,_){return y&&d(m.prototype,y),_&&d(m,_),m}}(),a=function d(m,y,_){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,y);if(x===void 0){var C=Object.getPrototypeOf(m);return C===null?void 0:d(C,y,_)}else{if("value"in x)return x.value;var S=x.get;return S===void 0?void 0:S.call(_)}},s=i(0),u=f(s);function f(d){return d&&d.__esModule?d:{default:d}}function c(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}function v(d,m){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:d}function l(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(d,m):d.__proto__=m)}var h=function(d){l(m,d);function m(){return c(this,m),v(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"value",value:function(_){var x=a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,_);return x.startsWith("rgb(")?(x=x.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+x.split(",").map(function(C){return("00"+parseInt(C).toString(16)).slice(-2)}).join("")):x}}]),m}(u.default.Attributor.Style),p=new u.default.Attributor.Class("color","ql-color",{scope:u.default.Scope.INLINE}),g=new h("color","color",{scope:u.default.Scope.INLINE});r.ColorAttributor=h,r.ColorClass=p,r.ColorStyle=g},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var o=function(){function g(d,m){for(var y=0;y<m.length;y++){var _=m[y];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(d,_.key,_)}}return function(d,m,y){return m&&g(d.prototype,m),y&&g(d,y),d}}(),a=function g(d,m,y){d===null&&(d=Function.prototype);var _=Object.getOwnPropertyDescriptor(d,m);if(_===void 0){var x=Object.getPrototypeOf(d);return x===null?void 0:g(x,m,y)}else{if("value"in _)return _.value;var C=_.get;return C===void 0?void 0:C.call(y)}},s=i(6),u=f(s);function f(g){return g&&g.__esModule?g:{default:g}}function c(g,d){if(!(g instanceof d))throw new TypeError("Cannot call a class as a function")}function v(g,d){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:g}function l(g,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);g.prototype=Object.create(d&&d.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(g,d):g.__proto__=d)}var h=function(g){l(d,g);function d(){return c(this,d),v(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return o(d,[{key:"format",value:function(y,_){if(y!==this.statics.blotName||!_)return a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"format",this).call(this,y,_);_=this.constructor.sanitize(_),this.domNode.setAttribute("href",_)}}],[{key:"create",value:function(y){var _=a(d.__proto__||Object.getPrototypeOf(d),"create",this).call(this,y);return y=this.sanitize(y),_.setAttribute("href",y),_.setAttribute("rel","noopener noreferrer"),_.setAttribute("target","_blank"),_}},{key:"formats",value:function(y){return y.getAttribute("href")}},{key:"sanitize",value:function(y){return p(y,this.PROTOCOL_WHITELIST)?y:this.SANITIZED_URL}}]),d}(u.default);h.blotName="link",h.tagName="A",h.SANITIZED_URL="about:blank",h.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function p(g,d){var m=document.createElement("a");m.href=g;var y=m.href.slice(0,m.href.indexOf(":"));return d.indexOf(y)>-1}r.default=h,r.sanitize=p},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},a=function(){function d(m,y){for(var _=0;_<y.length;_++){var x=y[_];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,y,_){return y&&d(m.prototype,y),_&&d(m,_),m}}(),s=i(23),u=v(s),f=i(107),c=v(f);function v(d){return d&&d.__esModule?d:{default:d}}function l(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}var h=0;function p(d,m){d.setAttribute(m,d.getAttribute(m)!=="true")}var g=function(){function d(m){var y=this;l(this,d),this.select=m,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){y.togglePicker()}),this.label.addEventListener("keydown",function(_){switch(_.keyCode){case u.default.keys.ENTER:y.togglePicker();break;case u.default.keys.ESCAPE:y.escape(),_.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return a(d,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),p(this.label,"aria-expanded"),p(this.options,"aria-hidden")}},{key:"buildItem",value:function(y){var _=this,x=document.createElement("span");return x.tabIndex="0",x.setAttribute("role","button"),x.classList.add("ql-picker-item"),y.hasAttribute("value")&&x.setAttribute("data-value",y.getAttribute("value")),y.textContent&&x.setAttribute("data-label",y.textContent),x.addEventListener("click",function(){_.selectItem(x,!0)}),x.addEventListener("keydown",function(C){switch(C.keyCode){case u.default.keys.ENTER:_.selectItem(x,!0),C.preventDefault();break;case u.default.keys.ESCAPE:_.escape(),C.preventDefault();break}}),x}},{key:"buildLabel",value:function(){var y=document.createElement("span");return y.classList.add("ql-picker-label"),y.innerHTML=c.default,y.tabIndex="0",y.setAttribute("role","button"),y.setAttribute("aria-expanded","false"),this.container.appendChild(y),y}},{key:"buildOptions",value:function(){var y=this,_=document.createElement("span");_.classList.add("ql-picker-options"),_.setAttribute("aria-hidden","true"),_.tabIndex="-1",_.id="ql-picker-options-"+h,h+=1,this.label.setAttribute("aria-controls",_.id),this.options=_,[].slice.call(this.select.options).forEach(function(x){var C=y.buildItem(x);_.appendChild(C),x.selected===!0&&y.selectItem(C)}),this.container.appendChild(_)}},{key:"buildPicker",value:function(){var y=this;[].slice.call(this.select.attributes).forEach(function(_){y.container.setAttribute(_.name,_.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var y=this;this.close(),setTimeout(function(){return y.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(y){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=this.container.querySelector(".ql-selected");if(y!==x&&(x!=null&&x.classList.remove("ql-selected"),y!=null&&(y.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(y.parentNode.children,y),y.hasAttribute("data-value")?this.label.setAttribute("data-value",y.getAttribute("data-value")):this.label.removeAttribute("data-value"),y.hasAttribute("data-label")?this.label.setAttribute("data-label",y.getAttribute("data-label")):this.label.removeAttribute("data-label"),_))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":o(Event))==="object"){var C=document.createEvent("Event");C.initEvent("change",!0,!0),this.select.dispatchEvent(C)}this.close()}}},{key:"update",value:function(){var y=void 0;if(this.select.selectedIndex>-1){var _=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];y=this.select.options[this.select.selectedIndex],this.selectItem(_)}else this.selectItem(null);var x=y!=null&&y!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",x)}}]),d}();r.default=g},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(0),a=q(o),s=i(5),u=q(s),f=i(4),c=q(f),v=i(16),l=q(v),h=i(25),p=q(h),g=i(24),d=q(g),m=i(35),y=q(m),_=i(6),x=q(_),C=i(22),S=q(C),A=i(7),I=q(A),B=i(55),O=q(B),E=i(42),k=q(E),R=i(23),F=q(R);function q(Z){return Z&&Z.__esModule?Z:{default:Z}}u.default.register({"blots/block":c.default,"blots/block/embed":f.BlockEmbed,"blots/break":l.default,"blots/container":p.default,"blots/cursor":d.default,"blots/embed":y.default,"blots/inline":x.default,"blots/scroll":S.default,"blots/text":I.default,"modules/clipboard":O.default,"modules/history":k.default,"modules/keyboard":F.default}),a.default.register(c.default,l.default,d.default,x.default,S.default,I.default),r.default=u.default},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(1),a=function(){function s(u){this.domNode=u,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(s.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),s.create=function(u){if(this.tagName==null)throw new o.ParchmentError("Blot definition missing tagName");var f;return Array.isArray(this.tagName)?(typeof u=="string"&&(u=u.toUpperCase(),parseInt(u).toString()===u&&(u=parseInt(u))),typeof u=="number"?f=document.createElement(this.tagName[u-1]):this.tagName.indexOf(u)>-1?f=document.createElement(u):f=document.createElement(this.tagName[0])):f=document.createElement(this.tagName),this.className&&f.classList.add(this.className),f},s.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},s.prototype.clone=function(){var u=this.domNode.cloneNode(!1);return o.create(u)},s.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},s.prototype.deleteAt=function(u,f){var c=this.isolate(u,f);c.remove()},s.prototype.formatAt=function(u,f,c,v){var l=this.isolate(u,f);if(o.query(c,o.Scope.BLOT)!=null&&v)l.wrap(c,v);else if(o.query(c,o.Scope.ATTRIBUTE)!=null){var h=o.create(this.statics.scope);l.wrap(h),h.format(c,v)}},s.prototype.insertAt=function(u,f,c){var v=c==null?o.create("text",f):o.create(f,c),l=this.split(u);this.parent.insertBefore(v,l)},s.prototype.insertInto=function(u,f){f===void 0&&(f=null),this.parent!=null&&this.parent.children.remove(this);var c=null;u.children.insertBefore(this,f),f!=null&&(c=f.domNode),(this.domNode.parentNode!=u.domNode||this.domNode.nextSibling!=c)&&u.domNode.insertBefore(this.domNode,c),this.parent=u,this.attach()},s.prototype.isolate=function(u,f){var c=this.split(u);return c.split(f),c},s.prototype.length=function(){return 1},s.prototype.offset=function(u){return u===void 0&&(u=this.parent),this.parent==null||this==u?0:this.parent.children.offset(this)+this.parent.offset(u)},s.prototype.optimize=function(u){this.domNode[o.DATA_KEY]!=null&&delete this.domNode[o.DATA_KEY].mutations},s.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},s.prototype.replace=function(u){u.parent!=null&&(u.parent.insertBefore(this,u.next),u.remove())},s.prototype.replaceWith=function(u,f){var c=typeof u=="string"?o.create(u,f):u;return c.replace(this),c},s.prototype.split=function(u,f){return u===0?this:this.next},s.prototype.update=function(u,f){},s.prototype.wrap=function(u,f){var c=typeof u=="string"?o.create(u,f):u;return this.parent!=null&&this.parent.insertBefore(c,this.next),c.appendChild(this),c},s.blotName="abstract",s}();r.default=a},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(12),a=i(32),s=i(33),u=i(1),f=function(){function c(v){this.attributes={},this.domNode=v,this.build()}return c.prototype.attribute=function(v,l){l?v.add(this.domNode,l)&&(v.value(this.domNode)!=null?this.attributes[v.attrName]=v:delete this.attributes[v.attrName]):(v.remove(this.domNode),delete this.attributes[v.attrName])},c.prototype.build=function(){var v=this;this.attributes={};var l=o.default.keys(this.domNode),h=a.default.keys(this.domNode),p=s.default.keys(this.domNode);l.concat(h).concat(p).forEach(function(g){var d=u.query(g,u.Scope.ATTRIBUTE);d instanceof o.default&&(v.attributes[d.attrName]=d)})},c.prototype.copy=function(v){var l=this;Object.keys(this.attributes).forEach(function(h){var p=l.attributes[h].value(l.domNode);v.format(h,p)})},c.prototype.move=function(v){var l=this;this.copy(v),Object.keys(this.attributes).forEach(function(h){l.attributes[h].remove(l.domNode)}),this.attributes={}},c.prototype.values=function(){var v=this;return Object.keys(this.attributes).reduce(function(l,h){return l[h]=v.attributes[h].value(v.domNode),l},{})},c}();r.default=f},function(t,r,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var l in v)v.hasOwnProperty(l)&&(c[l]=v[l])};return function(c,v){f(c,v);function l(){this.constructor=c}c.prototype=v===null?Object.create(v):(l.prototype=v.prototype,new l)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(12);function s(f,c){var v=f.getAttribute("class")||"";return v.split(/\s+/).filter(function(l){return l.indexOf(c+"-")===0})}var u=function(f){o(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.keys=function(v){return(v.getAttribute("class")||"").split(/\s+/).map(function(l){return l.split("-").slice(0,-1).join("-")})},c.prototype.add=function(v,l){return this.canAdd(v,l)?(this.remove(v),v.classList.add(this.keyName+"-"+l),!0):!1},c.prototype.remove=function(v){var l=s(v,this.keyName);l.forEach(function(h){v.classList.remove(h)}),v.classList.length===0&&v.removeAttribute("class")},c.prototype.value=function(v){var l=s(v,this.keyName)[0]||"",h=l.slice(this.keyName.length+1);return this.canAdd(v,h)?h:""},c}(a.default);r.default=u},function(t,r,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var l in v)v.hasOwnProperty(l)&&(c[l]=v[l])};return function(c,v){f(c,v);function l(){this.constructor=c}c.prototype=v===null?Object.create(v):(l.prototype=v.prototype,new l)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(12);function s(f){var c=f.split("-"),v=c.slice(1).map(function(l){return l[0].toUpperCase()+l.slice(1)}).join("");return c[0]+v}var u=function(f){o(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.keys=function(v){return(v.getAttribute("style")||"").split(";").map(function(l){var h=l.split(":");return h[0].trim()})},c.prototype.add=function(v,l){return this.canAdd(v,l)?(v.style[s(this.keyName)]=l,!0):!1},c.prototype.remove=function(v){v.style[s(this.keyName)]="",v.getAttribute("style")||v.removeAttribute("style")},c.prototype.value=function(v){var l=v.style[s(this.keyName)];return this.canAdd(v,l)?l:""},c}(a.default);r.default=u},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function u(f,c){for(var v=0;v<c.length;v++){var l=c[v];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,l.key,l)}}return function(f,c,v){return c&&u(f.prototype,c),v&&u(f,v),f}}();function a(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var s=function(){function u(f,c){a(this,u),this.quill=f,this.options=c,this.modules={}}return o(u,[{key:"init",value:function(){var c=this;Object.keys(this.options.modules).forEach(function(v){c.modules[v]==null&&c.addModule(v)})}},{key:"addModule",value:function(c){var v=this.quill.constructor.import("modules/"+c);return this.modules[c]=new v(this.quill,this.options.modules[c]||{}),this.modules[c]}}]),u}();s.DEFAULTS={modules:{}},s.themes={default:s},r.default=s},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function m(y,_){for(var x=0;x<_.length;x++){var C=_[x];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(y,C.key,C)}}return function(y,_,x){return _&&m(y.prototype,_),x&&m(y,x),y}}(),a=function m(y,_,x){y===null&&(y=Function.prototype);var C=Object.getOwnPropertyDescriptor(y,_);if(C===void 0){var S=Object.getPrototypeOf(y);return S===null?void 0:m(S,_,x)}else{if("value"in C)return C.value;var A=C.get;return A===void 0?void 0:A.call(x)}},s=i(0),u=v(s),f=i(7),c=v(f);function v(m){return m&&m.__esModule?m:{default:m}}function l(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function h(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function p(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var g="\uFEFF",d=function(m){p(y,m);function y(_){l(this,y);var x=h(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,_));return x.contentNode=document.createElement("span"),x.contentNode.setAttribute("contenteditable",!1),[].slice.call(x.domNode.childNodes).forEach(function(C){x.contentNode.appendChild(C)}),x.leftGuard=document.createTextNode(g),x.rightGuard=document.createTextNode(g),x.domNode.appendChild(x.leftGuard),x.domNode.appendChild(x.contentNode),x.domNode.appendChild(x.rightGuard),x}return o(y,[{key:"index",value:function(x,C){return x===this.leftGuard?0:x===this.rightGuard?1:a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"index",this).call(this,x,C)}},{key:"restore",value:function(x){var C=void 0,S=void 0,A=x.data.split(g).join("");if(x===this.leftGuard)if(this.prev instanceof c.default){var I=this.prev.length();this.prev.insertAt(I,A),C={startNode:this.prev.domNode,startOffset:I+A.length}}else S=document.createTextNode(A),this.parent.insertBefore(u.default.create(S),this),C={startNode:S,startOffset:A.length};else x===this.rightGuard&&(this.next instanceof c.default?(this.next.insertAt(0,A),C={startNode:this.next.domNode,startOffset:A.length}):(S=document.createTextNode(A),this.parent.insertBefore(u.default.create(S),this.next),C={startNode:S,startOffset:A.length}));return x.data=g,C}},{key:"update",value:function(x,C){var S=this;x.forEach(function(A){if(A.type==="characterData"&&(A.target===S.leftGuard||A.target===S.rightGuard)){var I=S.restore(A.target);I&&(C.range=I)}})}}]),y}(u.default.Embed);r.default=d},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var o=i(0),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}var u={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},f=new a.default.Attributor.Attribute("align","align",u),c=new a.default.Attributor.Class("align","ql-align",u),v=new a.default.Attributor.Style("align","text-align",u);r.AlignAttribute=f,r.AlignClass=c,r.AlignStyle=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var o=i(0),a=u(o),s=i(26);function u(v){return v&&v.__esModule?v:{default:v}}var f=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),c=new s.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});r.BackgroundClass=f,r.BackgroundStyle=c},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var o=i(0),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}var u={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},f=new a.default.Attributor.Attribute("direction","dir",u),c=new a.default.Attributor.Class("direction","ql-direction",u),v=new a.default.Attributor.Style("direction","direction",u);r.DirectionAttribute=f,r.DirectionClass=c,r.DirectionStyle=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var o=function(){function m(y,_){for(var x=0;x<_.length;x++){var C=_[x];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(y,C.key,C)}}return function(y,_,x){return _&&m(y.prototype,_),x&&m(y,x),y}}(),a=function m(y,_,x){y===null&&(y=Function.prototype);var C=Object.getOwnPropertyDescriptor(y,_);if(C===void 0){var S=Object.getPrototypeOf(y);return S===null?void 0:m(S,_,x)}else{if("value"in C)return C.value;var A=C.get;return A===void 0?void 0:A.call(x)}},s=i(0),u=f(s);function f(m){return m&&m.__esModule?m:{default:m}}function c(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function v(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function l(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var h={scope:u.default.Scope.INLINE,whitelist:["serif","monospace"]},p=new u.default.Attributor.Class("font","ql-font",h),g=function(m){l(y,m);function y(){return c(this,y),v(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,[{key:"value",value:function(x){return a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"value",this).call(this,x).replace(/["']/g,"")}}]),y}(u.default.Attributor.Style),d=new g("font","font-family",h);r.FontStyle=d,r.FontClass=p},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var o=i(0),a=s(o);function s(c){return c&&c.__esModule?c:{default:c}}var u=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),f=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=u,r.SizeStyle=f},function(t,r,i){t.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var o=function(){function _(x,C){for(var S=0;S<C.length;S++){var A=C[S];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,C,S){return C&&_(x.prototype,C),S&&_(x,S),x}}(),a=i(0),s=l(a),u=i(5),f=l(u),c=i(9),v=l(c);function l(_){return _&&_.__esModule?_:{default:_}}function h(_,x){if(!(_ instanceof x))throw new TypeError("Cannot call a class as a function")}function p(_,x){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:_}function g(_,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);_.prototype=Object.create(x&&x.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(_,x):_.__proto__=x)}var d=function(_){g(x,_);function x(C,S){h(this,x);var A=p(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,C,S));return A.lastRecorded=0,A.ignoreChange=!1,A.clear(),A.quill.on(f.default.events.EDITOR_CHANGE,function(I,B,O,E){I!==f.default.events.TEXT_CHANGE||A.ignoreChange||(!A.options.userOnly||E===f.default.sources.USER?A.record(B,O):A.transform(B))}),A.quill.keyboard.addBinding({key:"Z",shortKey:!0},A.undo.bind(A)),A.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},A.redo.bind(A)),/Win/i.test(navigator.platform)&&A.quill.keyboard.addBinding({key:"Y",shortKey:!0},A.redo.bind(A)),A}return o(x,[{key:"change",value:function(S,A){if(this.stack[S].length!==0){var I=this.stack[S].pop();this.stack[A].push(I),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(I[S],f.default.sources.USER),this.ignoreChange=!1;var B=y(I[S]);this.quill.setSelection(B)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(S,A){if(S.ops.length!==0){this.stack.redo=[];var I=this.quill.getContents().diff(A),B=Date.now();if(this.lastRecorded+this.options.delay>B&&this.stack.undo.length>0){var O=this.stack.undo.pop();I=I.compose(O.undo),S=O.redo.compose(S)}else this.lastRecorded=B;this.stack.undo.push({redo:S,undo:I}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(S){this.stack.undo.forEach(function(A){A.undo=S.transform(A.undo,!0),A.redo=S.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=S.transform(A.undo,!0),A.redo=S.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),x}(v.default);d.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(_){var x=_.ops[_.ops.length-1];return x==null?!1:x.insert!=null?typeof x.insert=="string"&&x.insert.endsWith(`
64
- `):x.attributes!=null?Object.keys(x.attributes).some(function(C){return s.default.query(C,s.default.Scope.BLOCK)!=null}):!1}function y(_){var x=_.reduce(function(S,A){return S+=A.delete||0,S},0),C=_.length()-x;return m(_)&&(C-=1),C}r.default=d,r.getLastChangeIndex=y},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var o=function(){function D(L,$){for(var G=0;G<$.length;G++){var j=$[G];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(L,j.key,j)}}return function(L,$,G){return $&&D(L.prototype,$),G&&D(L,G),L}}(),a=function D(L,$,G){L===null&&(L=Function.prototype);var j=Object.getOwnPropertyDescriptor(L,$);if(j===void 0){var W=Object.getPrototypeOf(L);return W===null?void 0:D(W,$,G)}else{if("value"in j)return j.value;var M=j.get;return M===void 0?void 0:M.call(G)}},s=i(3),u=B(s),f=i(2),c=B(f),v=i(8),l=B(v),h=i(23),p=B(h),g=i(34),d=B(g),m=i(59),y=B(m),_=i(60),x=B(_),C=i(28),S=B(C),A=i(61),I=B(A);function B(D){return D&&D.__esModule?D:{default:D}}function O(D,L){if(!(D instanceof L))throw new TypeError("Cannot call a class as a function")}function E(D,L){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:D}function k(D,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);D.prototype=Object.create(L&&L.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(D,L):D.__proto__=L)}var R=[!1,"center","right","justify"],F=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],q=[!1,"serif","monospace"],Z=["1","2","3",!1],ee=["small",!1,"large","huge"],ne=function(D){k(L,D);function L($,G){O(this,L);var j=E(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,$,G)),W=function M(H){if(!document.body.contains($.root))return document.body.removeEventListener("click",M);j.tooltip!=null&&!j.tooltip.root.contains(H.target)&&document.activeElement!==j.tooltip.textbox&&!j.quill.hasFocus()&&j.tooltip.hide(),j.pickers!=null&&j.pickers.forEach(function(V){V.container.contains(H.target)||V.close()})};return $.emitter.listenDOM("click",document.body,W),j}return o(L,[{key:"addModule",value:function(G){var j=a(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"addModule",this).call(this,G);return G==="toolbar"&&this.extendToolbar(j),j}},{key:"buildButtons",value:function(G,j){G.forEach(function(W){var M=W.getAttribute("class")||"";M.split(/\s+/).forEach(function(H){if(H.startsWith("ql-")&&(H=H.slice(3),j[H]!=null))if(H==="direction")W.innerHTML=j[H][""]+j[H].rtl;else if(typeof j[H]=="string")W.innerHTML=j[H];else{var V=W.value||"";V!=null&&j[H][V]&&(W.innerHTML=j[H][V])}})})}},{key:"buildPickers",value:function(G,j){var W=this;this.pickers=G.map(function(H){if(H.classList.contains("ql-align"))return H.querySelector("option")==null&&w(H,R),new x.default(H,j.align);if(H.classList.contains("ql-background")||H.classList.contains("ql-color")){var V=H.classList.contains("ql-background")?"background":"color";return H.querySelector("option")==null&&w(H,F,V==="background"?"#ffffff":"#000000"),new y.default(H,j[V])}else return H.querySelector("option")==null&&(H.classList.contains("ql-font")?w(H,q):H.classList.contains("ql-header")?w(H,Z):H.classList.contains("ql-size")&&w(H,ee)),new S.default(H)});var M=function(){W.pickers.forEach(function(V){V.update()})};this.quill.on(l.default.events.EDITOR_CHANGE,M)}}]),L}(d.default);ne.DEFAULTS=(0,u.default)(!0,{},d.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var L=this,$=this.container.querySelector("input.ql-image[type=file]");$==null&&($=document.createElement("input"),$.setAttribute("type","file"),$.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),$.classList.add("ql-image"),$.addEventListener("change",function(){if($.files!=null&&$.files[0]!=null){var G=new FileReader;G.onload=function(j){var W=L.quill.getSelection(!0);L.quill.updateContents(new c.default().retain(W.index).delete(W.length).insert({image:j.target.result}),l.default.sources.USER),L.quill.setSelection(W.index+1,l.default.sources.SILENT),$.value=""},G.readAsDataURL($.files[0])}}),this.container.appendChild($)),$.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var Q=function(D){k(L,D);function L($,G){O(this,L);var j=E(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,$,G));return j.textbox=j.root.querySelector('input[type="text"]'),j.listen(),j}return o(L,[{key:"listen",value:function(){var G=this;this.textbox.addEventListener("keydown",function(j){p.default.match(j,"enter")?(G.save(),j.preventDefault()):p.default.match(j,"escape")&&(G.cancel(),j.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),j!=null?this.textbox.value=j:G!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+G)||""),this.root.setAttribute("data-mode",G)}},{key:"restoreFocus",value:function(){var G=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=G}},{key:"save",value:function(){var G=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var j=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",G,l.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",G,l.default.sources.USER)),this.quill.root.scrollTop=j;break}case"video":G=N(G);case"formula":{if(!G)break;var W=this.quill.getSelection(!0);if(W!=null){var M=W.index+W.length;this.quill.insertEmbed(M,this.root.getAttribute("data-mode"),G,l.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(M+1," ",l.default.sources.USER),this.quill.setSelection(M+2,l.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),L}(I.default);function N(D){var L=D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return L?(L[1]||"https")+"://www.youtube.com/embed/"+L[2]+"?showinfo=0":(L=D.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(L[1]||"https")+"://player.vimeo.com/video/"+L[2]+"/":D}function w(D,L){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;L.forEach(function(G){var j=document.createElement("option");G===$?j.setAttribute("selected","selected"):j.setAttribute("value",G),D.appendChild(j)})}r.BaseTooltip=Q,r.default=ne},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];this.insertBefore(s[0],null),s.length>1&&this.append.apply(this,s.slice(1))},a.prototype.contains=function(s){for(var u,f=this.iterator();u=f();)if(u===s)return!0;return!1},a.prototype.insertBefore=function(s,u){s&&(s.next=u,u!=null?(s.prev=u.prev,u.prev!=null&&(u.prev.next=s),u.prev=s,u===this.head&&(this.head=s)):this.tail!=null?(this.tail.next=s,s.prev=this.tail,this.tail=s):(s.prev=null,this.head=this.tail=s),this.length+=1)},a.prototype.offset=function(s){for(var u=0,f=this.head;f!=null;){if(f===s)return u;u+=f.length(),f=f.next}return-1},a.prototype.remove=function(s){this.contains(s)&&(s.prev!=null&&(s.prev.next=s.next),s.next!=null&&(s.next.prev=s.prev),s===this.head&&(this.head=s.next),s===this.tail&&(this.tail=s.prev),this.length-=1)},a.prototype.iterator=function(s){return s===void 0&&(s=this.head),function(){var u=s;return s!=null&&(s=s.next),u}},a.prototype.find=function(s,u){u===void 0&&(u=!1);for(var f,c=this.iterator();f=c();){var v=f.length();if(s<v||u&&s===v&&(f.next==null||f.next.length()!==0))return[f,s];s-=v}return[null,0]},a.prototype.forEach=function(s){for(var u,f=this.iterator();u=f();)s(u)},a.prototype.forEachAt=function(s,u,f){if(!(u<=0))for(var c=this.find(s),v=c[0],l=c[1],h,p=s-l,g=this.iterator(v);(h=g())&&p<s+u;){var d=h.length();s>p?f(h,s-p,Math.min(u,p+d-s)):f(h,0,Math.min(d,s+u-p)),p+=d}},a.prototype.map=function(s){return this.reduce(function(u,f){return u.push(s(f)),u},[])},a.prototype.reduce=function(s,u){for(var f,c=this.iterator();f=c();)u=s(u,f);return u},a}();r.default=o},function(t,r,i){var o=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,h){l.__proto__=h}||function(l,h){for(var p in h)h.hasOwnProperty(p)&&(l[p]=h[p])};return function(l,h){v(l,h);function p(){this.constructor=l}l.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(17),s=i(1),u={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},f=100,c=function(v){o(l,v);function l(h){var p=v.call(this,h)||this;return p.scroll=p,p.observer=new MutationObserver(function(g){p.update(g)}),p.observer.observe(p.domNode,u),p.attach(),p}return l.prototype.detach=function(){v.prototype.detach.call(this),this.observer.disconnect()},l.prototype.deleteAt=function(h,p){this.update(),h===0&&p===this.length()?this.children.forEach(function(g){g.remove()}):v.prototype.deleteAt.call(this,h,p)},l.prototype.formatAt=function(h,p,g,d){this.update(),v.prototype.formatAt.call(this,h,p,g,d)},l.prototype.insertAt=function(h,p,g){this.update(),v.prototype.insertAt.call(this,h,p,g)},l.prototype.optimize=function(h,p){var g=this;h===void 0&&(h=[]),p===void 0&&(p={}),v.prototype.optimize.call(this,p);for(var d=[].slice.call(this.observer.takeRecords());d.length>0;)h.push(d.pop());for(var m=function(C,S){S===void 0&&(S=!0),!(C==null||C===g)&&C.domNode.parentNode!=null&&(C.domNode[s.DATA_KEY].mutations==null&&(C.domNode[s.DATA_KEY].mutations=[]),S&&m(C.parent))},y=function(C){C.domNode[s.DATA_KEY]==null||C.domNode[s.DATA_KEY].mutations==null||(C instanceof a.default&&C.children.forEach(y),C.optimize(p))},_=h,x=0;_.length>0;x+=1){if(x>=f)throw new Error("[Parchment] Maximum optimize iterations reached");for(_.forEach(function(C){var S=s.find(C.target,!0);S!=null&&(S.domNode===C.target&&(C.type==="childList"?(m(s.find(C.previousSibling,!1)),[].forEach.call(C.addedNodes,function(A){var I=s.find(A,!1);m(I,!1),I instanceof a.default&&I.children.forEach(function(B){m(B,!1)})})):C.type==="attributes"&&m(S.prev)),m(S))}),this.children.forEach(y),_=[].slice.call(this.observer.takeRecords()),d=_.slice();d.length>0;)h.push(d.pop())}},l.prototype.update=function(h,p){var g=this;p===void 0&&(p={}),h=h||this.observer.takeRecords(),h.map(function(d){var m=s.find(d.target,!0);return m==null?null:m.domNode[s.DATA_KEY].mutations==null?(m.domNode[s.DATA_KEY].mutations=[d],m):(m.domNode[s.DATA_KEY].mutations.push(d),null)}).forEach(function(d){d==null||d===g||d.domNode[s.DATA_KEY]==null||d.update(d.domNode[s.DATA_KEY].mutations||[],p)}),this.domNode[s.DATA_KEY].mutations!=null&&v.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,p),this.optimize(h,p)},l.blotName="scroll",l.defaultChild="block",l.scope=s.Scope.BLOCK_BLOT,l.tagName="DIV",l}(a.default);r.default=c},function(t,r,i){var o=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,l){v.__proto__=l}||function(v,l){for(var h in l)l.hasOwnProperty(h)&&(v[h]=l[h])};return function(v,l){c(v,l);function h(){this.constructor=v}v.prototype=l===null?Object.create(l):(h.prototype=l.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(18),s=i(1);function u(c,v){if(Object.keys(c).length!==Object.keys(v).length)return!1;for(var l in c)if(c[l]!==v[l])return!1;return!0}var f=function(c){o(v,c);function v(){return c!==null&&c.apply(this,arguments)||this}return v.formats=function(l){if(l.tagName!==v.tagName)return c.formats.call(this,l)},v.prototype.format=function(l,h){var p=this;l===this.statics.blotName&&!h?(this.children.forEach(function(g){g instanceof a.default||(g=g.wrap(v.blotName,!0)),p.attributes.copy(g)}),this.unwrap()):c.prototype.format.call(this,l,h)},v.prototype.formatAt=function(l,h,p,g){if(this.formats()[p]!=null||s.query(p,s.Scope.ATTRIBUTE)){var d=this.isolate(l,h);d.format(p,g)}else c.prototype.formatAt.call(this,l,h,p,g)},v.prototype.optimize=function(l){c.prototype.optimize.call(this,l);var h=this.formats();if(Object.keys(h).length===0)return this.unwrap();var p=this.next;p instanceof v&&p.prev===this&&u(h,p.formats())&&(p.moveChildren(this),p.remove())},v.blotName="inline",v.scope=s.Scope.INLINE_BLOT,v.tagName="SPAN",v}(a.default);r.default=f},function(t,r,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var l in v)v.hasOwnProperty(l)&&(c[l]=v[l])};return function(c,v){f(c,v);function l(){this.constructor=c}c.prototype=v===null?Object.create(v):(l.prototype=v.prototype,new l)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(18),s=i(1),u=function(f){o(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.formats=function(v){var l=s.query(c.blotName).tagName;if(v.tagName!==l)return f.formats.call(this,v)},c.prototype.format=function(v,l){s.query(v,s.Scope.BLOCK)!=null&&(v===this.statics.blotName&&!l?this.replaceWith(c.blotName):f.prototype.format.call(this,v,l))},c.prototype.formatAt=function(v,l,h,p){s.query(h,s.Scope.BLOCK)!=null?this.format(h,p):f.prototype.formatAt.call(this,v,l,h,p)},c.prototype.insertAt=function(v,l,h){if(h==null||s.query(l,s.Scope.INLINE)!=null)f.prototype.insertAt.call(this,v,l,h);else{var p=this.split(v),g=s.create(l,h);p.parent.insertBefore(g,p)}},c.prototype.update=function(v,l){navigator.userAgent.match(/Trident/)?this.build():f.prototype.update.call(this,v,l)},c.blotName="block",c.scope=s.Scope.BLOCK_BLOT,c.tagName="P",c}(a.default);r.default=u},function(t,r,i){var o=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,c){f.__proto__=c}||function(f,c){for(var v in c)c.hasOwnProperty(v)&&(f[v]=c[v])};return function(f,c){u(f,c);function v(){this.constructor=f}f.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(19),s=function(u){o(f,u);function f(){return u!==null&&u.apply(this,arguments)||this}return f.formats=function(c){},f.prototype.format=function(c,v){u.prototype.formatAt.call(this,0,this.length(),c,v)},f.prototype.formatAt=function(c,v,l,h){c===0&&v===this.length()?this.format(l,h):u.prototype.formatAt.call(this,c,v,l,h)},f.prototype.formats=function(){return this.statics.formats(this.domNode)},f}(a.default);r.default=s},function(t,r,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var l in v)v.hasOwnProperty(l)&&(c[l]=v[l])};return function(c,v){f(c,v);function l(){this.constructor=c}c.prototype=v===null?Object.create(v):(l.prototype=v.prototype,new l)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(19),s=i(1),u=function(f){o(c,f);function c(v){var l=f.call(this,v)||this;return l.text=l.statics.value(l.domNode),l}return c.create=function(v){return document.createTextNode(v)},c.value=function(v){var l=v.data;return l.normalize&&(l=l.normalize()),l},c.prototype.deleteAt=function(v,l){this.domNode.data=this.text=this.text.slice(0,v)+this.text.slice(v+l)},c.prototype.index=function(v,l){return this.domNode===v?l:-1},c.prototype.insertAt=function(v,l,h){h==null?(this.text=this.text.slice(0,v)+l+this.text.slice(v),this.domNode.data=this.text):f.prototype.insertAt.call(this,v,l,h)},c.prototype.length=function(){return this.text.length},c.prototype.optimize=function(v){f.prototype.optimize.call(this,v),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof c&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},c.prototype.position=function(v,l){return[this.domNode,v]},c.prototype.split=function(v,l){if(l===void 0&&(l=!1),!l){if(v===0)return this;if(v===this.length())return this.next}var h=s.create(this.domNode.splitText(v));return this.parent.insertBefore(h,this.next),this.text=this.statics.value(this.domNode),h},c.prototype.update=function(v,l){var h=this;v.some(function(p){return p.type==="characterData"&&p.target===h.domNode})&&(this.text=this.statics.value(this.domNode))},c.prototype.value=function(){return this.text},c.blotName="text",c.scope=s.Scope.INLINE_BLOT,c}(a.default);r.default=u},function(t,r,i){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(s,u){return arguments.length>1&&!this.contains(s)==!u?u:a.call(this,s)}}String.prototype.startsWith||(String.prototype.startsWith=function(s,u){return u=u||0,this.substr(u,s.length)===s}),String.prototype.endsWith||(String.prototype.endsWith=function(s,u){var f=this.toString();(typeof u!="number"||!isFinite(u)||Math.floor(u)!==u||u>f.length)&&(u=f.length),u-=s.length;var c=f.indexOf(s,u);return c!==-1&&c===u}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(u){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof u!="function")throw new TypeError("predicate must be a function");for(var f=Object(this),c=f.length>>>0,v=arguments[1],l,h=0;h<c;h++)if(l=f[h],u.call(v,l,h,f))return l}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,r){var i=-1,o=1,a=0;function s(x,C,S){if(x==C)return x?[[a,x]]:[];(S<0||x.length<S)&&(S=null);var A=v(x,C),I=x.substring(0,A);x=x.substring(A),C=C.substring(A),A=l(x,C);var B=x.substring(x.length-A);x=x.substring(0,x.length-A),C=C.substring(0,C.length-A);var O=u(x,C);return I&&O.unshift([a,I]),B&&O.push([a,B]),p(O),S!=null&&(O=m(O,S)),O=y(O),O}function u(x,C){var S;if(!x)return[[o,C]];if(!C)return[[i,x]];var A=x.length>C.length?x:C,I=x.length>C.length?C:x,B=A.indexOf(I);if(B!=-1)return S=[[o,A.substring(0,B)],[a,I],[o,A.substring(B+I.length)]],x.length>C.length&&(S[0][0]=S[2][0]=i),S;if(I.length==1)return[[i,x],[o,C]];var O=h(x,C);if(O){var E=O[0],k=O[1],R=O[2],F=O[3],q=O[4],Z=s(E,R),ee=s(k,F);return Z.concat([[a,q]],ee)}return f(x,C)}function f(x,C){for(var S=x.length,A=C.length,I=Math.ceil((S+A)/2),B=I,O=2*I,E=new Array(O),k=new Array(O),R=0;R<O;R++)E[R]=-1,k[R]=-1;E[B+1]=0,k[B+1]=0;for(var F=S-A,q=F%2!=0,Z=0,ee=0,ne=0,Q=0,N=0;N<I;N++){for(var w=-N+Z;w<=N-ee;w+=2){var D=B+w,L;w==-N||w!=N&&E[D-1]<E[D+1]?L=E[D+1]:L=E[D-1]+1;for(var $=L-w;L<S&&$<A&&x.charAt(L)==C.charAt($);)L++,$++;if(E[D]=L,L>S)ee+=2;else if($>A)Z+=2;else if(q){var G=B+F-w;if(G>=0&&G<O&&k[G]!=-1){var j=S-k[G];if(L>=j)return c(x,C,L,$)}}}for(var W=-N+ne;W<=N-Q;W+=2){var G=B+W,j;W==-N||W!=N&&k[G-1]<k[G+1]?j=k[G+1]:j=k[G-1]+1;for(var M=j-W;j<S&&M<A&&x.charAt(S-j-1)==C.charAt(A-M-1);)j++,M++;if(k[G]=j,j>S)Q+=2;else if(M>A)ne+=2;else if(!q){var D=B+F-W;if(D>=0&&D<O&&E[D]!=-1){var L=E[D],$=B+L-D;if(j=S-j,L>=j)return c(x,C,L,$)}}}}return[[i,x],[o,C]]}function c(x,C,S,A){var I=x.substring(0,S),B=C.substring(0,A),O=x.substring(S),E=C.substring(A),k=s(I,B),R=s(O,E);return k.concat(R)}function v(x,C){if(!x||!C||x.charAt(0)!=C.charAt(0))return 0;for(var S=0,A=Math.min(x.length,C.length),I=A,B=0;S<I;)x.substring(B,I)==C.substring(B,I)?(S=I,B=S):A=I,I=Math.floor((A-S)/2+S);return I}function l(x,C){if(!x||!C||x.charAt(x.length-1)!=C.charAt(C.length-1))return 0;for(var S=0,A=Math.min(x.length,C.length),I=A,B=0;S<I;)x.substring(x.length-I,x.length-B)==C.substring(C.length-I,C.length-B)?(S=I,B=S):A=I,I=Math.floor((A-S)/2+S);return I}function h(x,C){var S=x.length>C.length?x:C,A=x.length>C.length?C:x;if(S.length<4||A.length*2<S.length)return null;function I(ee,ne,Q){for(var N=ee.substring(Q,Q+Math.floor(ee.length/4)),w=-1,D="",L,$,G,j;(w=ne.indexOf(N,w+1))!=-1;){var W=v(ee.substring(Q),ne.substring(w)),M=l(ee.substring(0,Q),ne.substring(0,w));D.length<M+W&&(D=ne.substring(w-M,w)+ne.substring(w,w+W),L=ee.substring(0,Q-M),$=ee.substring(Q+W),G=ne.substring(0,w-M),j=ne.substring(w+W))}return D.length*2>=ee.length?[L,$,G,j,D]:null}var B=I(S,A,Math.ceil(S.length/4)),O=I(S,A,Math.ceil(S.length/2)),E;if(!B&&!O)return null;O?B?E=B[4].length>O[4].length?B:O:E=O:E=B;var k,R,F,q;x.length>C.length?(k=E[0],R=E[1],F=E[2],q=E[3]):(F=E[0],q=E[1],k=E[2],R=E[3]);var Z=E[4];return[k,R,F,q,Z]}function p(x){x.push([a,""]);for(var C=0,S=0,A=0,I="",B="",O;C<x.length;)switch(x[C][0]){case o:A++,B+=x[C][1],C++;break;case i:S++,I+=x[C][1],C++;break;case a:S+A>1?(S!==0&&A!==0&&(O=v(B,I),O!==0&&(C-S-A>0&&x[C-S-A-1][0]==a?x[C-S-A-1][1]+=B.substring(0,O):(x.splice(0,0,[a,B.substring(0,O)]),C++),B=B.substring(O),I=I.substring(O)),O=l(B,I),O!==0&&(x[C][1]=B.substring(B.length-O)+x[C][1],B=B.substring(0,B.length-O),I=I.substring(0,I.length-O))),S===0?x.splice(C-A,S+A,[o,B]):A===0?x.splice(C-S,S+A,[i,I]):x.splice(C-S-A,S+A,[i,I],[o,B]),C=C-S-A+(S?1:0)+(A?1:0)+1):C!==0&&x[C-1][0]==a?(x[C-1][1]+=x[C][1],x.splice(C,1)):C++,A=0,S=0,I="",B="";break}x[x.length-1][1]===""&&x.pop();var E=!1;for(C=1;C<x.length-1;)x[C-1][0]==a&&x[C+1][0]==a&&(x[C][1].substring(x[C][1].length-x[C-1][1].length)==x[C-1][1]?(x[C][1]=x[C-1][1]+x[C][1].substring(0,x[C][1].length-x[C-1][1].length),x[C+1][1]=x[C-1][1]+x[C+1][1],x.splice(C-1,1),E=!0):x[C][1].substring(0,x[C+1][1].length)==x[C+1][1]&&(x[C-1][1]+=x[C+1][1],x[C][1]=x[C][1].substring(x[C+1][1].length)+x[C+1][1],x.splice(C+1,1),E=!0)),C++;E&&p(x)}var g=s;g.INSERT=o,g.DELETE=i,g.EQUAL=a,t.exports=g;function d(x,C){if(C===0)return[a,x];for(var S=0,A=0;A<x.length;A++){var I=x[A];if(I[0]===i||I[0]===a){var B=S+I[1].length;if(C===B)return[A+1,x];if(C<B){x=x.slice();var O=C-S,E=[I[0],I[1].slice(0,O)],k=[I[0],I[1].slice(O)];return x.splice(A,1,E,k),[A+1,x]}else S=B}}throw new Error("cursor_pos is out of bounds!")}function m(x,C){var S=d(x,C),A=S[1],I=S[0],B=A[I],O=A[I+1];if(B==null)return x;if(B[0]!==a)return x;if(O!=null&&B[1]+O[1]===O[1]+B[1])return A.splice(I,2,O,B),_(A,I,2);if(O!=null&&O[1].indexOf(B[1])===0){A.splice(I,2,[O[0],B[1]],[0,B[1]]);var E=O[1].slice(B[1].length);return E.length>0&&A.splice(I+2,0,[O[0],E]),_(A,I,3)}else return x}function y(x){for(var C=!1,S=function(O){return O.charCodeAt(0)>=56320&&O.charCodeAt(0)<=57343},A=function(O){return O.charCodeAt(O.length-1)>=55296&&O.charCodeAt(O.length-1)<=56319},I=2;I<x.length;I+=1)x[I-2][0]===a&&A(x[I-2][1])&&x[I-1][0]===i&&S(x[I-1][1])&&x[I][0]===o&&S(x[I][1])&&(C=!0,x[I-1][1]=x[I-2][1].slice(-1)+x[I-1][1],x[I][1]=x[I-2][1].slice(-1)+x[I][1],x[I-2][1]=x[I-2][1].slice(0,-1));if(!C)return x;for(var B=[],I=0;I<x.length;I+=1)x[I][1].length>0&&B.push(x[I]);return B}function _(x,C,S){for(var A=C+S-1;A>=0&&A>=C-1;A--)if(A+1<x.length){var I=x[A],B=x[A+1];I[0]===B[1]&&x.splice(A,2,[I[0],I[1]+B[1]])}return x}},function(t,r){r=t.exports=typeof Object.keys=="function"?Object.keys:i,r.shim=i;function i(o){var a=[];for(var s in o)a.push(s);return a}},function(t,r){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";r=t.exports=i?o:a,r.supported=o;function o(s){return Object.prototype.toString.call(s)=="[object Arguments]"}r.unsupported=a;function a(s){return s&&typeof s=="object"&&typeof s.length=="number"&&Object.prototype.hasOwnProperty.call(s,"callee")&&!Object.prototype.propertyIsEnumerable.call(s,"callee")||!1}},function(t,r){var i=Object.prototype.hasOwnProperty,o="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(o=!1));function s(f,c,v){this.fn=f,this.context=c,this.once=v||!1}function u(){this._events=new a,this._eventsCount=0}u.prototype.eventNames=function(){var c=[],v,l;if(this._eventsCount===0)return c;for(l in v=this._events)i.call(v,l)&&c.push(o?l.slice(1):l);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(v)):c},u.prototype.listeners=function(c,v){var l=o?o+c:c,h=this._events[l];if(v)return!!h;if(!h)return[];if(h.fn)return[h.fn];for(var p=0,g=h.length,d=new Array(g);p<g;p++)d[p]=h[p].fn;return d},u.prototype.emit=function(c,v,l,h,p,g){var d=o?o+c:c;if(!this._events[d])return!1;var m=this._events[d],y=arguments.length,_,x;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),y){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,v),!0;case 3:return m.fn.call(m.context,v,l),!0;case 4:return m.fn.call(m.context,v,l,h),!0;case 5:return m.fn.call(m.context,v,l,h,p),!0;case 6:return m.fn.call(m.context,v,l,h,p,g),!0}for(x=1,_=new Array(y-1);x<y;x++)_[x-1]=arguments[x];m.fn.apply(m.context,_)}else{var C=m.length,S;for(x=0;x<C;x++)switch(m[x].once&&this.removeListener(c,m[x].fn,void 0,!0),y){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,v);break;case 3:m[x].fn.call(m[x].context,v,l);break;case 4:m[x].fn.call(m[x].context,v,l,h);break;default:if(!_)for(S=1,_=new Array(y-1);S<y;S++)_[S-1]=arguments[S];m[x].fn.apply(m[x].context,_)}}return!0},u.prototype.on=function(c,v,l){var h=new s(v,l||this),p=o?o+c:c;return this._events[p]?this._events[p].fn?this._events[p]=[this._events[p],h]:this._events[p].push(h):(this._events[p]=h,this._eventsCount++),this},u.prototype.once=function(c,v,l){var h=new s(v,l||this,!0),p=o?o+c:c;return this._events[p]?this._events[p].fn?this._events[p]=[this._events[p],h]:this._events[p].push(h):(this._events[p]=h,this._eventsCount++),this},u.prototype.removeListener=function(c,v,l,h){var p=o?o+c:c;if(!this._events[p])return this;if(!v)return--this._eventsCount===0?this._events=new a:delete this._events[p],this;var g=this._events[p];if(g.fn)g.fn===v&&(!h||g.once)&&(!l||g.context===l)&&(--this._eventsCount===0?this._events=new a:delete this._events[p]);else{for(var d=0,m=[],y=g.length;d<y;d++)(g[d].fn!==v||h&&!g[d].once||l&&g[d].context!==l)&&m.push(g[d]);m.length?this._events[p]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new a:delete this._events[p]}return this},u.prototype.removeAllListeners=function(c){var v;return c?(v=o?o+c:c,this._events[v]&&(--this._eventsCount===0?this._events=new a:delete this._events[v])):(this._events=new a,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prototype.setMaxListeners=function(){return this},u.prefixed=o,u.EventEmitter=u,typeof t<"u"&&(t.exports=u)},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ie){return typeof ie}:function(ie){return ie&&typeof Symbol=="function"&&ie.constructor===Symbol&&ie!==Symbol.prototype?"symbol":typeof ie},a=function(){function ie(oe,le){var ue=[],ae=!0,ve=!1,ye=void 0;try{for(var _e=oe[Symbol.iterator](),Ce;!(ae=(Ce=_e.next()).done)&&(ue.push(Ce.value),!(le&&ue.length===le));ae=!0);}catch(Ae){ve=!0,ye=Ae}finally{try{!ae&&_e.return&&_e.return()}finally{if(ve)throw ye}}return ue}return function(oe,le){if(Array.isArray(oe))return oe;if(Symbol.iterator in Object(oe))return ie(oe,le);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function ie(oe,le){for(var ue=0;ue<le.length;ue++){var ae=le[ue];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(oe,ae.key,ae)}}return function(oe,le,ue){return le&&ie(oe.prototype,le),ue&&ie(oe,ue),oe}}(),u=i(3),f=k(u),c=i(2),v=k(c),l=i(0),h=k(l),p=i(5),g=k(p),d=i(10),m=k(d),y=i(9),_=k(y),x=i(36),C=i(37),S=i(13),A=k(S),I=i(26),B=i(38),O=i(39),E=i(40);function k(ie){return ie&&ie.__esModule?ie:{default:ie}}function R(ie,oe,le){return oe in ie?Object.defineProperty(ie,oe,{value:le,enumerable:!0,configurable:!0,writable:!0}):ie[oe]=le,ie}function F(ie,oe){if(!(ie instanceof oe))throw new TypeError("Cannot call a class as a function")}function q(ie,oe){if(!ie)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return oe&&(typeof oe=="object"||typeof oe=="function")?oe:ie}function Z(ie,oe){if(typeof oe!="function"&&oe!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof oe);ie.prototype=Object.create(oe&&oe.prototype,{constructor:{value:ie,enumerable:!1,writable:!0,configurable:!0}}),oe&&(Object.setPrototypeOf?Object.setPrototypeOf(ie,oe):ie.__proto__=oe)}var ee=(0,m.default)("quill:clipboard"),ne="__ql-matcher",Q=[[Node.TEXT_NODE,ce],[Node.TEXT_NODE,X],["br",K],[Node.ELEMENT_NODE,X],[Node.ELEMENT_NODE,V],[Node.ELEMENT_NODE,se],[Node.ELEMENT_NODE,H],[Node.ELEMENT_NODE,fe],["li",P],["b",M.bind(M,"bold")],["i",M.bind(M,"italic")],["style",J]],N=[x.AlignAttribute,B.DirectionAttribute].reduce(function(ie,oe){return ie[oe.keyName]=oe,ie},{}),w=[x.AlignStyle,C.BackgroundStyle,I.ColorStyle,B.DirectionStyle,O.FontStyle,E.SizeStyle].reduce(function(ie,oe){return ie[oe.keyName]=oe,ie},{}),D=function(ie){Z(oe,ie);function oe(le,ue){F(this,oe);var ae=q(this,(oe.__proto__||Object.getPrototypeOf(oe)).call(this,le,ue));return ae.quill.root.addEventListener("paste",ae.onPaste.bind(ae)),ae.container=ae.quill.addContainer("ql-clipboard"),ae.container.setAttribute("contenteditable",!0),ae.container.setAttribute("tabindex",-1),ae.matchers=[],Q.concat(ae.options.matchers).forEach(function(ve){var ye=a(ve,2),_e=ye[0],Ce=ye[1];!ue.matchVisual&&Ce===se||ae.addMatcher(_e,Ce)}),ae}return s(oe,[{key:"addMatcher",value:function(ue,ae){this.matchers.push([ue,ae])}},{key:"convert",value:function(ue){if(typeof ue=="string")return this.container.innerHTML=ue.replace(/\>\r?\n +\</g,"><"),this.convert();var ae=this.quill.getFormat(this.quill.selection.savedRange.index);if(ae[A.default.blotName]){var ve=this.container.innerText;return this.container.innerHTML="",new v.default().insert(ve,R({},A.default.blotName,ae[A.default.blotName]))}var ye=this.prepareMatching(),_e=a(ye,2),Ce=_e[0],Ae=_e[1],Ee=W(this.container,Ce,Ae);return G(Ee,`
65
- `)&&Ee.ops[Ee.ops.length-1].attributes==null&&(Ee=Ee.compose(new v.default().retain(Ee.length()-1).delete(1))),ee.log("convert",this.container.innerHTML,Ee),this.container.innerHTML="",Ee}},{key:"dangerouslyPasteHTML",value:function(ue,ae){var ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;if(typeof ue=="string")this.quill.setContents(this.convert(ue),ae),this.quill.setSelection(0,g.default.sources.SILENT);else{var ye=this.convert(ae);this.quill.updateContents(new v.default().retain(ue).concat(ye),ve),this.quill.setSelection(ue+ye.length(),g.default.sources.SILENT)}}},{key:"onPaste",value:function(ue){var ae=this;if(!(ue.defaultPrevented||!this.quill.isEnabled())){var ve=this.quill.getSelection(),ye=new v.default().retain(ve.index),_e=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(g.default.sources.SILENT),setTimeout(function(){ye=ye.concat(ae.convert()).delete(ve.length),ae.quill.updateContents(ye,g.default.sources.USER),ae.quill.setSelection(ye.length()-ve.length,g.default.sources.SILENT),ae.quill.scrollingContainer.scrollTop=_e,ae.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var ue=this,ae=[],ve=[];return this.matchers.forEach(function(ye){var _e=a(ye,2),Ce=_e[0],Ae=_e[1];switch(Ce){case Node.TEXT_NODE:ve.push(Ae);break;case Node.ELEMENT_NODE:ae.push(Ae);break;default:[].forEach.call(ue.container.querySelectorAll(Ce),function(Ee){Ee[ne]=Ee[ne]||[],Ee[ne].push(Ae)});break}}),[ae,ve]}}]),oe}(_.default);D.DEFAULTS={matchers:[],matchVisual:!0};function L(ie,oe,le){return(typeof oe>"u"?"undefined":o(oe))==="object"?Object.keys(oe).reduce(function(ue,ae){return L(ue,ae,oe[ae])},ie):ie.reduce(function(ue,ae){return ae.attributes&&ae.attributes[oe]?ue.push(ae):ue.insert(ae.insert,(0,f.default)({},R({},oe,le),ae.attributes))},new v.default)}function $(ie){if(ie.nodeType!==Node.ELEMENT_NODE)return{};var oe="__ql-computed-style";return ie[oe]||(ie[oe]=window.getComputedStyle(ie))}function G(ie,oe){for(var le="",ue=ie.ops.length-1;ue>=0&&le.length<oe.length;--ue){var ae=ie.ops[ue];if(typeof ae.insert!="string")break;le=ae.insert+le}return le.slice(-1*oe.length)===oe}function j(ie){if(ie.childNodes.length===0)return!1;var oe=$(ie);return["block","list-item"].indexOf(oe.display)>-1}function W(ie,oe,le){return ie.nodeType===ie.TEXT_NODE?le.reduce(function(ue,ae){return ae(ie,ue)},new v.default):ie.nodeType===ie.ELEMENT_NODE?[].reduce.call(ie.childNodes||[],function(ue,ae){var ve=W(ae,oe,le);return ae.nodeType===ie.ELEMENT_NODE&&(ve=oe.reduce(function(ye,_e){return _e(ae,ye)},ve),ve=(ae[ne]||[]).reduce(function(ye,_e){return _e(ae,ye)},ve)),ue.concat(ve)},new v.default):new v.default}function M(ie,oe,le){return L(le,ie,!0)}function H(ie,oe){var le=h.default.Attributor.Attribute.keys(ie),ue=h.default.Attributor.Class.keys(ie),ae=h.default.Attributor.Style.keys(ie),ve={};return le.concat(ue).concat(ae).forEach(function(ye){var _e=h.default.query(ye,h.default.Scope.ATTRIBUTE);_e!=null&&(ve[_e.attrName]=_e.value(ie),ve[_e.attrName])||(_e=N[ye],_e!=null&&(_e.attrName===ye||_e.keyName===ye)&&(ve[_e.attrName]=_e.value(ie)||void 0),_e=w[ye],_e!=null&&(_e.attrName===ye||_e.keyName===ye)&&(_e=w[ye],ve[_e.attrName]=_e.value(ie)||void 0))}),Object.keys(ve).length>0&&(oe=L(oe,ve)),oe}function V(ie,oe){var le=h.default.query(ie);if(le==null)return oe;if(le.prototype instanceof h.default.Embed){var ue={},ae=le.value(ie);ae!=null&&(ue[le.blotName]=ae,oe=new v.default().insert(ue,le.formats(ie)))}else typeof le.formats=="function"&&(oe=L(oe,le.blotName,le.formats(ie)));return oe}function K(ie,oe){return G(oe,`
61
+ `,M.format).retain(K.length()-J-1).retain(1,{header:null});this.quill.updateContents(P,C.default.sources.USER),this.quill.setSelection(W.index+1,C.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(W,M){var H=M.prefix.length,V=this.quill.getLine(W.index),K=a(V,2),J=K[0],P=K[1];if(P>H)return!0;var X=void 0;switch(M.prefix.trim()){case"[]":case"[ ]":X="unchecked";break;case"[x]":X="checked";break;case"-":case"*":X="bullet";break;default:X="ordered"}this.quill.insertText(W.index," ",C.default.sources.USER),this.quill.history.cutoff();var se=new g.default().retain(W.index-P).delete(H+1).retain(J.length()-2-P).retain(1,{list:X});this.quill.updateContents(se,C.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index-H,C.default.sources.SILENT)}},"code exit":{key:ee.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(W){var M=this.quill.getLine(W.index),H=a(M,2),V=H[0],K=H[1],J=new g.default().retain(W.index+V.length()-K-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(J,C.default.sources.USER)}},"embed left":ne(ee.keys.LEFT,!1),"embed left shift":ne(ee.keys.LEFT,!0),"embed right":ne(ee.keys.RIGHT,!1),"embed right shift":ne(ee.keys.RIGHT,!0)}};function ne(j,W){var M,H=j===ee.keys.LEFT?"prefix":"suffix";return M={key:j,shiftKey:W,altKey:null},E(M,H,/^$/),E(M,"handler",function(K){var J=K.index;j===ee.keys.RIGHT&&(J+=K.length+1);var P=this.quill.getLeaf(J),X=a(P,1),se=X[0];return se instanceof _.default.Embed?(j===ee.keys.LEFT?W?this.quill.setSelection(K.index-1,K.length+1,C.default.sources.USER):this.quill.setSelection(K.index-1,C.default.sources.USER):W?this.quill.setSelection(K.index,K.length+1,C.default.sources.USER):this.quill.setSelection(K.index+K.length+1,C.default.sources.USER),!1):!0}),M}function Q(j,W){if(!(j.index===0||this.quill.getLength()<=1)){var M=this.quill.getLine(j.index),H=a(M,1),V=H[0],K={};if(W.offset===0){var J=this.quill.getLine(j.index-1),P=a(J,1),X=P[0];if(X!=null&&X.length()>1){var se=V.formats(),fe=this.quill.getFormat(j.index-1,1);K=m.default.attributes.diff(se,fe)||{}}}var ue=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(W.prefix)?2:1;this.quill.deleteText(j.index-ue,ue,C.default.sources.USER),Object.keys(K).length>0&&this.quill.formatLine(j.index-ue,ue,K,C.default.sources.USER),this.quill.focus()}}function N(j,W){var M=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(W.suffix)?2:1;if(!(j.index>=this.quill.getLength()-M)){var H={},V=0,K=this.quill.getLine(j.index),J=a(K,1),P=J[0];if(W.offset>=P.length()-1){var X=this.quill.getLine(j.index+1),se=a(X,1),fe=se[0];if(fe){var ue=P.formats(),ie=this.quill.getFormat(j.index,1);H=m.default.attributes.diff(ue,ie)||{},V=fe.length()}}this.quill.deleteText(j.index,M,C.default.sources.USER),Object.keys(H).length>0&&this.quill.formatLine(j.index+V-1,M,H,C.default.sources.USER)}}function w(j){var W=this.quill.getLines(j),M={};if(W.length>1){var H=W[0].formats(),V=W[W.length-1].formats();M=m.default.attributes.diff(V,H)||{}}this.quill.deleteText(j,C.default.sources.USER),Object.keys(M).length>0&&this.quill.formatLine(j.index,1,M,C.default.sources.USER),this.quill.setSelection(j.index,C.default.sources.SILENT),this.quill.focus()}function D(j,W){var M=this;j.length>0&&this.quill.scroll.deleteAt(j.index,j.length);var H=Object.keys(W.format).reduce(function(V,K){return _.default.query(K,_.default.Scope.BLOCK)&&!Array.isArray(W.format[K])&&(V[K]=W.format[K]),V},{});this.quill.insertText(j.index,`
62
+ `,H,C.default.sources.USER),this.quill.setSelection(j.index+1,C.default.sources.SILENT),this.quill.focus(),Object.keys(W.format).forEach(function(V){H[V]==null&&(Array.isArray(W.format[V])||V!=="link"&&M.quill.format(V,W.format[V],C.default.sources.USER))})}function L(j){return{key:ee.keys.TAB,shiftKey:!j,format:{"code-block":!0},handler:function(M){var H=_.default.query("code-block"),V=M.index,K=M.length,J=this.quill.scroll.descendant(H,V),P=a(J,2),X=P[0],se=P[1];if(X!=null){var fe=this.quill.getIndex(X),ue=X.newlineIndex(se,!0)+1,ie=X.newlineIndex(fe+se+K),oe=X.domNode.textContent.slice(ue,ie).split(`
63
+ `);se=0,oe.forEach(function(le,ce){j?(X.insertAt(ue+se,H.TAB),se+=H.TAB.length,ce===0?V+=H.TAB.length:K+=H.TAB.length):le.startsWith(H.TAB)&&(X.deleteAt(ue+se,H.TAB.length),se-=H.TAB.length,ce===0?V-=H.TAB.length:K-=H.TAB.length),se+=le.length+1}),this.quill.update(C.default.sources.USER),this.quill.setSelection(V,K,C.default.sources.SILENT)}}}}function $(j){return{key:j[0].toUpperCase(),shortKey:!0,handler:function(M,H){this.quill.format(j,!H.format[j],C.default.sources.USER)}}}function G(j){if(typeof j=="string"||typeof j=="number")return G({key:j});if((typeof j>"u"?"undefined":o(j))==="object"&&(j=(0,f.default)(j,!1)),typeof j.key=="string")if(ee.keys[j.key.toUpperCase()]!=null)j.key=ee.keys[j.key.toUpperCase()];else if(j.key.length===1)j.key=j.key.toUpperCase().charCodeAt(0);else return null;return j.shortKey&&(j[Z]=j.shortKey,delete j.shortKey),j}r.default=ee,r.SHORTKEY=Z},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function m(y,_){var x=[],C=!0,S=!1,A=void 0;try{for(var I=y[Symbol.iterator](),B;!(C=(B=I.next()).done)&&(x.push(B.value),!(_&&x.length===_));C=!0);}catch(O){S=!0,A=O}finally{try{!C&&I.return&&I.return()}finally{if(S)throw A}}return x}return function(y,_){if(Array.isArray(y))return y;if(Symbol.iterator in Object(y))return m(y,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function m(y,_,x){y===null&&(y=Function.prototype);var C=Object.getOwnPropertyDescriptor(y,_);if(C===void 0){var S=Object.getPrototypeOf(y);return S===null?void 0:m(S,_,x)}else{if("value"in C)return C.value;var A=C.get;return A===void 0?void 0:A.call(x)}},s=function(){function m(y,_){for(var x=0;x<_.length;x++){var C=_[x];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(y,C.key,C)}}return function(y,_,x){return _&&m(y.prototype,_),x&&m(y,x),y}}(),u=i(0),f=l(u),c=i(7),v=l(c);function l(m){return m&&m.__esModule?m:{default:m}}function h(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function p(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function g(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var d=function(m){g(y,m),s(y,null,[{key:"value",value:function(){}}]);function y(_,x){h(this,y);var C=p(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,_));return C.selection=x,C.textNode=document.createTextNode(y.CONTENTS),C.domNode.appendChild(C.textNode),C._length=0,C}return s(y,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(x,C){if(this._length!==0)return a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,x,C);for(var S=this,A=0;S!=null&&S.statics.scope!==f.default.Scope.BLOCK_BLOT;)A+=S.offset(S.parent),S=S.parent;S!=null&&(this._length=y.CONTENTS.length,S.optimize(),S.formatAt(A,y.CONTENTS.length,x,C),this._length=0)}},{key:"index",value:function(x,C){return x===this.textNode?0:a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"index",this).call(this,x,C)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var x=this.textNode,C=this.selection.getNativeRange(),S=void 0,A=void 0,I=void 0;if(C!=null&&C.start.node===x&&C.end.node===x){var B=[x,C.start.offset,C.end.offset];S=B[0],A=B[1],I=B[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==y.CONTENTS){var O=this.textNode.data.split(y.CONTENTS).join("");this.next instanceof v.default?(S=this.next.domNode,this.next.insertAt(0,O),this.textNode.data=y.CONTENTS):(this.textNode.data=O,this.parent.insertBefore(f.default.create(this.textNode),this),this.textNode=document.createTextNode(y.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),A!=null){var E=[A,I].map(function(R){return Math.max(0,Math.min(S.data.length,R-1))}),k=o(E,2);return A=k[0],I=k[1],{startNode:S,startOffset:A,endNode:S,endOffset:I}}}}},{key:"update",value:function(x,C){var S=this;if(x.some(function(I){return I.type==="characterData"&&I.target===S.textNode})){var A=this.restore();A&&(C.range=A)}}},{key:"value",value:function(){return""}}]),y}(f.default.Embed);d.blotName="cursor",d.className="ql-cursor",d.tagName="span",d.CONTENTS="\uFEFF",r.default=d},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(0),a=f(o),s=i(4),u=f(s);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function v(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function l(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h=function(p){l(g,p);function g(){return c(this,g),v(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g}(a.default.Container);h.allowedChildren=[u.default,s.BlockEmbed,h],r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var o=function(){function d(m,y){for(var _=0;_<y.length;_++){var x=y[_];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,y,_){return y&&d(m.prototype,y),_&&d(m,_),m}}(),a=function d(m,y,_){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,y);if(x===void 0){var C=Object.getPrototypeOf(m);return C===null?void 0:d(C,y,_)}else{if("value"in x)return x.value;var S=x.get;return S===void 0?void 0:S.call(_)}},s=i(0),u=f(s);function f(d){return d&&d.__esModule?d:{default:d}}function c(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}function v(d,m){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:d}function l(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(d,m):d.__proto__=m)}var h=function(d){l(m,d);function m(){return c(this,m),v(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"value",value:function(_){var x=a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,_);return x.startsWith("rgb(")?(x=x.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+x.split(",").map(function(C){return("00"+parseInt(C).toString(16)).slice(-2)}).join("")):x}}]),m}(u.default.Attributor.Style),p=new u.default.Attributor.Class("color","ql-color",{scope:u.default.Scope.INLINE}),g=new h("color","color",{scope:u.default.Scope.INLINE});r.ColorAttributor=h,r.ColorClass=p,r.ColorStyle=g},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var o=function(){function g(d,m){for(var y=0;y<m.length;y++){var _=m[y];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(d,_.key,_)}}return function(d,m,y){return m&&g(d.prototype,m),y&&g(d,y),d}}(),a=function g(d,m,y){d===null&&(d=Function.prototype);var _=Object.getOwnPropertyDescriptor(d,m);if(_===void 0){var x=Object.getPrototypeOf(d);return x===null?void 0:g(x,m,y)}else{if("value"in _)return _.value;var C=_.get;return C===void 0?void 0:C.call(y)}},s=i(6),u=f(s);function f(g){return g&&g.__esModule?g:{default:g}}function c(g,d){if(!(g instanceof d))throw new TypeError("Cannot call a class as a function")}function v(g,d){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:g}function l(g,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);g.prototype=Object.create(d&&d.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(g,d):g.__proto__=d)}var h=function(g){l(d,g);function d(){return c(this,d),v(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return o(d,[{key:"format",value:function(y,_){if(y!==this.statics.blotName||!_)return a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"format",this).call(this,y,_);_=this.constructor.sanitize(_),this.domNode.setAttribute("href",_)}}],[{key:"create",value:function(y){var _=a(d.__proto__||Object.getPrototypeOf(d),"create",this).call(this,y);return y=this.sanitize(y),_.setAttribute("href",y),_.setAttribute("rel","noopener noreferrer"),_.setAttribute("target","_blank"),_}},{key:"formats",value:function(y){return y.getAttribute("href")}},{key:"sanitize",value:function(y){return p(y,this.PROTOCOL_WHITELIST)?y:this.SANITIZED_URL}}]),d}(u.default);h.blotName="link",h.tagName="A",h.SANITIZED_URL="about:blank",h.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function p(g,d){var m=document.createElement("a");m.href=g;var y=m.href.slice(0,m.href.indexOf(":"));return d.indexOf(y)>-1}r.default=h,r.sanitize=p},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},a=function(){function d(m,y){for(var _=0;_<y.length;_++){var x=y[_];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,y,_){return y&&d(m.prototype,y),_&&d(m,_),m}}(),s=i(23),u=v(s),f=i(107),c=v(f);function v(d){return d&&d.__esModule?d:{default:d}}function l(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}var h=0;function p(d,m){d.setAttribute(m,d.getAttribute(m)!=="true")}var g=function(){function d(m){var y=this;l(this,d),this.select=m,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){y.togglePicker()}),this.label.addEventListener("keydown",function(_){switch(_.keyCode){case u.default.keys.ENTER:y.togglePicker();break;case u.default.keys.ESCAPE:y.escape(),_.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return a(d,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),p(this.label,"aria-expanded"),p(this.options,"aria-hidden")}},{key:"buildItem",value:function(y){var _=this,x=document.createElement("span");return x.tabIndex="0",x.setAttribute("role","button"),x.classList.add("ql-picker-item"),y.hasAttribute("value")&&x.setAttribute("data-value",y.getAttribute("value")),y.textContent&&x.setAttribute("data-label",y.textContent),x.addEventListener("click",function(){_.selectItem(x,!0)}),x.addEventListener("keydown",function(C){switch(C.keyCode){case u.default.keys.ENTER:_.selectItem(x,!0),C.preventDefault();break;case u.default.keys.ESCAPE:_.escape(),C.preventDefault();break}}),x}},{key:"buildLabel",value:function(){var y=document.createElement("span");return y.classList.add("ql-picker-label"),y.innerHTML=c.default,y.tabIndex="0",y.setAttribute("role","button"),y.setAttribute("aria-expanded","false"),this.container.appendChild(y),y}},{key:"buildOptions",value:function(){var y=this,_=document.createElement("span");_.classList.add("ql-picker-options"),_.setAttribute("aria-hidden","true"),_.tabIndex="-1",_.id="ql-picker-options-"+h,h+=1,this.label.setAttribute("aria-controls",_.id),this.options=_,[].slice.call(this.select.options).forEach(function(x){var C=y.buildItem(x);_.appendChild(C),x.selected===!0&&y.selectItem(C)}),this.container.appendChild(_)}},{key:"buildPicker",value:function(){var y=this;[].slice.call(this.select.attributes).forEach(function(_){y.container.setAttribute(_.name,_.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var y=this;this.close(),setTimeout(function(){return y.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(y){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=this.container.querySelector(".ql-selected");if(y!==x&&(x!=null&&x.classList.remove("ql-selected"),y!=null&&(y.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(y.parentNode.children,y),y.hasAttribute("data-value")?this.label.setAttribute("data-value",y.getAttribute("data-value")):this.label.removeAttribute("data-value"),y.hasAttribute("data-label")?this.label.setAttribute("data-label",y.getAttribute("data-label")):this.label.removeAttribute("data-label"),_))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":o(Event))==="object"){var C=document.createEvent("Event");C.initEvent("change",!0,!0),this.select.dispatchEvent(C)}this.close()}}},{key:"update",value:function(){var y=void 0;if(this.select.selectedIndex>-1){var _=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];y=this.select.options[this.select.selectedIndex],this.selectItem(_)}else this.selectItem(null);var x=y!=null&&y!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",x)}}]),d}();r.default=g},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(0),a=q(o),s=i(5),u=q(s),f=i(4),c=q(f),v=i(16),l=q(v),h=i(25),p=q(h),g=i(24),d=q(g),m=i(35),y=q(m),_=i(6),x=q(_),C=i(22),S=q(C),A=i(7),I=q(A),B=i(55),O=q(B),E=i(42),k=q(E),R=i(23),F=q(R);function q(Z){return Z&&Z.__esModule?Z:{default:Z}}u.default.register({"blots/block":c.default,"blots/block/embed":f.BlockEmbed,"blots/break":l.default,"blots/container":p.default,"blots/cursor":d.default,"blots/embed":y.default,"blots/inline":x.default,"blots/scroll":S.default,"blots/text":I.default,"modules/clipboard":O.default,"modules/history":k.default,"modules/keyboard":F.default}),a.default.register(c.default,l.default,d.default,x.default,S.default,I.default),r.default=u.default},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(1),a=function(){function s(u){this.domNode=u,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(s.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),s.create=function(u){if(this.tagName==null)throw new o.ParchmentError("Blot definition missing tagName");var f;return Array.isArray(this.tagName)?(typeof u=="string"&&(u=u.toUpperCase(),parseInt(u).toString()===u&&(u=parseInt(u))),typeof u=="number"?f=document.createElement(this.tagName[u-1]):this.tagName.indexOf(u)>-1?f=document.createElement(u):f=document.createElement(this.tagName[0])):f=document.createElement(this.tagName),this.className&&f.classList.add(this.className),f},s.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},s.prototype.clone=function(){var u=this.domNode.cloneNode(!1);return o.create(u)},s.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},s.prototype.deleteAt=function(u,f){var c=this.isolate(u,f);c.remove()},s.prototype.formatAt=function(u,f,c,v){var l=this.isolate(u,f);if(o.query(c,o.Scope.BLOT)!=null&&v)l.wrap(c,v);else if(o.query(c,o.Scope.ATTRIBUTE)!=null){var h=o.create(this.statics.scope);l.wrap(h),h.format(c,v)}},s.prototype.insertAt=function(u,f,c){var v=c==null?o.create("text",f):o.create(f,c),l=this.split(u);this.parent.insertBefore(v,l)},s.prototype.insertInto=function(u,f){f===void 0&&(f=null),this.parent!=null&&this.parent.children.remove(this);var c=null;u.children.insertBefore(this,f),f!=null&&(c=f.domNode),(this.domNode.parentNode!=u.domNode||this.domNode.nextSibling!=c)&&u.domNode.insertBefore(this.domNode,c),this.parent=u,this.attach()},s.prototype.isolate=function(u,f){var c=this.split(u);return c.split(f),c},s.prototype.length=function(){return 1},s.prototype.offset=function(u){return u===void 0&&(u=this.parent),this.parent==null||this==u?0:this.parent.children.offset(this)+this.parent.offset(u)},s.prototype.optimize=function(u){this.domNode[o.DATA_KEY]!=null&&delete this.domNode[o.DATA_KEY].mutations},s.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},s.prototype.replace=function(u){u.parent!=null&&(u.parent.insertBefore(this,u.next),u.remove())},s.prototype.replaceWith=function(u,f){var c=typeof u=="string"?o.create(u,f):u;return c.replace(this),c},s.prototype.split=function(u,f){return u===0?this:this.next},s.prototype.update=function(u,f){},s.prototype.wrap=function(u,f){var c=typeof u=="string"?o.create(u,f):u;return this.parent!=null&&this.parent.insertBefore(c,this.next),c.appendChild(this),c},s.blotName="abstract",s}();r.default=a},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(12),a=i(32),s=i(33),u=i(1),f=function(){function c(v){this.attributes={},this.domNode=v,this.build()}return c.prototype.attribute=function(v,l){l?v.add(this.domNode,l)&&(v.value(this.domNode)!=null?this.attributes[v.attrName]=v:delete this.attributes[v.attrName]):(v.remove(this.domNode),delete this.attributes[v.attrName])},c.prototype.build=function(){var v=this;this.attributes={};var l=o.default.keys(this.domNode),h=a.default.keys(this.domNode),p=s.default.keys(this.domNode);l.concat(h).concat(p).forEach(function(g){var d=u.query(g,u.Scope.ATTRIBUTE);d instanceof o.default&&(v.attributes[d.attrName]=d)})},c.prototype.copy=function(v){var l=this;Object.keys(this.attributes).forEach(function(h){var p=l.attributes[h].value(l.domNode);v.format(h,p)})},c.prototype.move=function(v){var l=this;this.copy(v),Object.keys(this.attributes).forEach(function(h){l.attributes[h].remove(l.domNode)}),this.attributes={}},c.prototype.values=function(){var v=this;return Object.keys(this.attributes).reduce(function(l,h){return l[h]=v.attributes[h].value(v.domNode),l},{})},c}();r.default=f},function(t,r,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var l in v)v.hasOwnProperty(l)&&(c[l]=v[l])};return function(c,v){f(c,v);function l(){this.constructor=c}c.prototype=v===null?Object.create(v):(l.prototype=v.prototype,new l)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(12);function s(f,c){var v=f.getAttribute("class")||"";return v.split(/\s+/).filter(function(l){return l.indexOf(c+"-")===0})}var u=function(f){o(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.keys=function(v){return(v.getAttribute("class")||"").split(/\s+/).map(function(l){return l.split("-").slice(0,-1).join("-")})},c.prototype.add=function(v,l){return this.canAdd(v,l)?(this.remove(v),v.classList.add(this.keyName+"-"+l),!0):!1},c.prototype.remove=function(v){var l=s(v,this.keyName);l.forEach(function(h){v.classList.remove(h)}),v.classList.length===0&&v.removeAttribute("class")},c.prototype.value=function(v){var l=s(v,this.keyName)[0]||"",h=l.slice(this.keyName.length+1);return this.canAdd(v,h)?h:""},c}(a.default);r.default=u},function(t,r,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var l in v)v.hasOwnProperty(l)&&(c[l]=v[l])};return function(c,v){f(c,v);function l(){this.constructor=c}c.prototype=v===null?Object.create(v):(l.prototype=v.prototype,new l)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(12);function s(f){var c=f.split("-"),v=c.slice(1).map(function(l){return l[0].toUpperCase()+l.slice(1)}).join("");return c[0]+v}var u=function(f){o(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.keys=function(v){return(v.getAttribute("style")||"").split(";").map(function(l){var h=l.split(":");return h[0].trim()})},c.prototype.add=function(v,l){return this.canAdd(v,l)?(v.style[s(this.keyName)]=l,!0):!1},c.prototype.remove=function(v){v.style[s(this.keyName)]="",v.getAttribute("style")||v.removeAttribute("style")},c.prototype.value=function(v){var l=v.style[s(this.keyName)];return this.canAdd(v,l)?l:""},c}(a.default);r.default=u},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function u(f,c){for(var v=0;v<c.length;v++){var l=c[v];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,l.key,l)}}return function(f,c,v){return c&&u(f.prototype,c),v&&u(f,v),f}}();function a(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var s=function(){function u(f,c){a(this,u),this.quill=f,this.options=c,this.modules={}}return o(u,[{key:"init",value:function(){var c=this;Object.keys(this.options.modules).forEach(function(v){c.modules[v]==null&&c.addModule(v)})}},{key:"addModule",value:function(c){var v=this.quill.constructor.import("modules/"+c);return this.modules[c]=new v(this.quill,this.options.modules[c]||{}),this.modules[c]}}]),u}();s.DEFAULTS={modules:{}},s.themes={default:s},r.default=s},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function m(y,_){for(var x=0;x<_.length;x++){var C=_[x];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(y,C.key,C)}}return function(y,_,x){return _&&m(y.prototype,_),x&&m(y,x),y}}(),a=function m(y,_,x){y===null&&(y=Function.prototype);var C=Object.getOwnPropertyDescriptor(y,_);if(C===void 0){var S=Object.getPrototypeOf(y);return S===null?void 0:m(S,_,x)}else{if("value"in C)return C.value;var A=C.get;return A===void 0?void 0:A.call(x)}},s=i(0),u=v(s),f=i(7),c=v(f);function v(m){return m&&m.__esModule?m:{default:m}}function l(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function h(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function p(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var g="\uFEFF",d=function(m){p(y,m);function y(_){l(this,y);var x=h(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,_));return x.contentNode=document.createElement("span"),x.contentNode.setAttribute("contenteditable",!1),[].slice.call(x.domNode.childNodes).forEach(function(C){x.contentNode.appendChild(C)}),x.leftGuard=document.createTextNode(g),x.rightGuard=document.createTextNode(g),x.domNode.appendChild(x.leftGuard),x.domNode.appendChild(x.contentNode),x.domNode.appendChild(x.rightGuard),x}return o(y,[{key:"index",value:function(x,C){return x===this.leftGuard?0:x===this.rightGuard?1:a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"index",this).call(this,x,C)}},{key:"restore",value:function(x){var C=void 0,S=void 0,A=x.data.split(g).join("");if(x===this.leftGuard)if(this.prev instanceof c.default){var I=this.prev.length();this.prev.insertAt(I,A),C={startNode:this.prev.domNode,startOffset:I+A.length}}else S=document.createTextNode(A),this.parent.insertBefore(u.default.create(S),this),C={startNode:S,startOffset:A.length};else x===this.rightGuard&&(this.next instanceof c.default?(this.next.insertAt(0,A),C={startNode:this.next.domNode,startOffset:A.length}):(S=document.createTextNode(A),this.parent.insertBefore(u.default.create(S),this.next),C={startNode:S,startOffset:A.length}));return x.data=g,C}},{key:"update",value:function(x,C){var S=this;x.forEach(function(A){if(A.type==="characterData"&&(A.target===S.leftGuard||A.target===S.rightGuard)){var I=S.restore(A.target);I&&(C.range=I)}})}}]),y}(u.default.Embed);r.default=d},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var o=i(0),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}var u={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},f=new a.default.Attributor.Attribute("align","align",u),c=new a.default.Attributor.Class("align","ql-align",u),v=new a.default.Attributor.Style("align","text-align",u);r.AlignAttribute=f,r.AlignClass=c,r.AlignStyle=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var o=i(0),a=u(o),s=i(26);function u(v){return v&&v.__esModule?v:{default:v}}var f=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),c=new s.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});r.BackgroundClass=f,r.BackgroundStyle=c},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var o=i(0),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}var u={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},f=new a.default.Attributor.Attribute("direction","dir",u),c=new a.default.Attributor.Class("direction","ql-direction",u),v=new a.default.Attributor.Style("direction","direction",u);r.DirectionAttribute=f,r.DirectionClass=c,r.DirectionStyle=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var o=function(){function m(y,_){for(var x=0;x<_.length;x++){var C=_[x];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(y,C.key,C)}}return function(y,_,x){return _&&m(y.prototype,_),x&&m(y,x),y}}(),a=function m(y,_,x){y===null&&(y=Function.prototype);var C=Object.getOwnPropertyDescriptor(y,_);if(C===void 0){var S=Object.getPrototypeOf(y);return S===null?void 0:m(S,_,x)}else{if("value"in C)return C.value;var A=C.get;return A===void 0?void 0:A.call(x)}},s=i(0),u=f(s);function f(m){return m&&m.__esModule?m:{default:m}}function c(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function v(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function l(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var h={scope:u.default.Scope.INLINE,whitelist:["serif","monospace"]},p=new u.default.Attributor.Class("font","ql-font",h),g=function(m){l(y,m);function y(){return c(this,y),v(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,[{key:"value",value:function(x){return a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"value",this).call(this,x).replace(/["']/g,"")}}]),y}(u.default.Attributor.Style),d=new g("font","font-family",h);r.FontStyle=d,r.FontClass=p},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var o=i(0),a=s(o);function s(c){return c&&c.__esModule?c:{default:c}}var u=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),f=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=u,r.SizeStyle=f},function(t,r,i){t.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var o=function(){function _(x,C){for(var S=0;S<C.length;S++){var A=C[S];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,C,S){return C&&_(x.prototype,C),S&&_(x,S),x}}(),a=i(0),s=l(a),u=i(5),f=l(u),c=i(9),v=l(c);function l(_){return _&&_.__esModule?_:{default:_}}function h(_,x){if(!(_ instanceof x))throw new TypeError("Cannot call a class as a function")}function p(_,x){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:_}function g(_,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);_.prototype=Object.create(x&&x.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(_,x):_.__proto__=x)}var d=function(_){g(x,_);function x(C,S){h(this,x);var A=p(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,C,S));return A.lastRecorded=0,A.ignoreChange=!1,A.clear(),A.quill.on(f.default.events.EDITOR_CHANGE,function(I,B,O,E){I!==f.default.events.TEXT_CHANGE||A.ignoreChange||(!A.options.userOnly||E===f.default.sources.USER?A.record(B,O):A.transform(B))}),A.quill.keyboard.addBinding({key:"Z",shortKey:!0},A.undo.bind(A)),A.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},A.redo.bind(A)),/Win/i.test(navigator.platform)&&A.quill.keyboard.addBinding({key:"Y",shortKey:!0},A.redo.bind(A)),A}return o(x,[{key:"change",value:function(S,A){if(this.stack[S].length!==0){var I=this.stack[S].pop();this.stack[A].push(I),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(I[S],f.default.sources.USER),this.ignoreChange=!1;var B=y(I[S]);this.quill.setSelection(B)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(S,A){if(S.ops.length!==0){this.stack.redo=[];var I=this.quill.getContents().diff(A),B=Date.now();if(this.lastRecorded+this.options.delay>B&&this.stack.undo.length>0){var O=this.stack.undo.pop();I=I.compose(O.undo),S=O.redo.compose(S)}else this.lastRecorded=B;this.stack.undo.push({redo:S,undo:I}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(S){this.stack.undo.forEach(function(A){A.undo=S.transform(A.undo,!0),A.redo=S.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=S.transform(A.undo,!0),A.redo=S.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),x}(v.default);d.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(_){var x=_.ops[_.ops.length-1];return x==null?!1:x.insert!=null?typeof x.insert=="string"&&x.insert.endsWith(`
64
+ `):x.attributes!=null?Object.keys(x.attributes).some(function(C){return s.default.query(C,s.default.Scope.BLOCK)!=null}):!1}function y(_){var x=_.reduce(function(S,A){return S+=A.delete||0,S},0),C=_.length()-x;return m(_)&&(C-=1),C}r.default=d,r.getLastChangeIndex=y},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var o=function(){function D(L,$){for(var G=0;G<$.length;G++){var j=$[G];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(L,j.key,j)}}return function(L,$,G){return $&&D(L.prototype,$),G&&D(L,G),L}}(),a=function D(L,$,G){L===null&&(L=Function.prototype);var j=Object.getOwnPropertyDescriptor(L,$);if(j===void 0){var W=Object.getPrototypeOf(L);return W===null?void 0:D(W,$,G)}else{if("value"in j)return j.value;var M=j.get;return M===void 0?void 0:M.call(G)}},s=i(3),u=B(s),f=i(2),c=B(f),v=i(8),l=B(v),h=i(23),p=B(h),g=i(34),d=B(g),m=i(59),y=B(m),_=i(60),x=B(_),C=i(28),S=B(C),A=i(61),I=B(A);function B(D){return D&&D.__esModule?D:{default:D}}function O(D,L){if(!(D instanceof L))throw new TypeError("Cannot call a class as a function")}function E(D,L){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:D}function k(D,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);D.prototype=Object.create(L&&L.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(D,L):D.__proto__=L)}var R=[!1,"center","right","justify"],F=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],q=[!1,"serif","monospace"],Z=["1","2","3",!1],ee=["small",!1,"large","huge"],ne=function(D){k(L,D);function L($,G){O(this,L);var j=E(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,$,G)),W=function M(H){if(!document.body.contains($.root))return document.body.removeEventListener("click",M);j.tooltip!=null&&!j.tooltip.root.contains(H.target)&&document.activeElement!==j.tooltip.textbox&&!j.quill.hasFocus()&&j.tooltip.hide(),j.pickers!=null&&j.pickers.forEach(function(V){V.container.contains(H.target)||V.close()})};return $.emitter.listenDOM("click",document.body,W),j}return o(L,[{key:"addModule",value:function(G){var j=a(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"addModule",this).call(this,G);return G==="toolbar"&&this.extendToolbar(j),j}},{key:"buildButtons",value:function(G,j){G.forEach(function(W){var M=W.getAttribute("class")||"";M.split(/\s+/).forEach(function(H){if(H.startsWith("ql-")&&(H=H.slice(3),j[H]!=null))if(H==="direction")W.innerHTML=j[H][""]+j[H].rtl;else if(typeof j[H]=="string")W.innerHTML=j[H];else{var V=W.value||"";V!=null&&j[H][V]&&(W.innerHTML=j[H][V])}})})}},{key:"buildPickers",value:function(G,j){var W=this;this.pickers=G.map(function(H){if(H.classList.contains("ql-align"))return H.querySelector("option")==null&&w(H,R),new x.default(H,j.align);if(H.classList.contains("ql-background")||H.classList.contains("ql-color")){var V=H.classList.contains("ql-background")?"background":"color";return H.querySelector("option")==null&&w(H,F,V==="background"?"#ffffff":"#000000"),new y.default(H,j[V])}else return H.querySelector("option")==null&&(H.classList.contains("ql-font")?w(H,q):H.classList.contains("ql-header")?w(H,Z):H.classList.contains("ql-size")&&w(H,ee)),new S.default(H)});var M=function(){W.pickers.forEach(function(V){V.update()})};this.quill.on(l.default.events.EDITOR_CHANGE,M)}}]),L}(d.default);ne.DEFAULTS=(0,u.default)(!0,{},d.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var L=this,$=this.container.querySelector("input.ql-image[type=file]");$==null&&($=document.createElement("input"),$.setAttribute("type","file"),$.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),$.classList.add("ql-image"),$.addEventListener("change",function(){if($.files!=null&&$.files[0]!=null){var G=new FileReader;G.onload=function(j){var W=L.quill.getSelection(!0);L.quill.updateContents(new c.default().retain(W.index).delete(W.length).insert({image:j.target.result}),l.default.sources.USER),L.quill.setSelection(W.index+1,l.default.sources.SILENT),$.value=""},G.readAsDataURL($.files[0])}}),this.container.appendChild($)),$.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var Q=function(D){k(L,D);function L($,G){O(this,L);var j=E(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,$,G));return j.textbox=j.root.querySelector('input[type="text"]'),j.listen(),j}return o(L,[{key:"listen",value:function(){var G=this;this.textbox.addEventListener("keydown",function(j){p.default.match(j,"enter")?(G.save(),j.preventDefault()):p.default.match(j,"escape")&&(G.cancel(),j.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),j!=null?this.textbox.value=j:G!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+G)||""),this.root.setAttribute("data-mode",G)}},{key:"restoreFocus",value:function(){var G=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=G}},{key:"save",value:function(){var G=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var j=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",G,l.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",G,l.default.sources.USER)),this.quill.root.scrollTop=j;break}case"video":G=N(G);case"formula":{if(!G)break;var W=this.quill.getSelection(!0);if(W!=null){var M=W.index+W.length;this.quill.insertEmbed(M,this.root.getAttribute("data-mode"),G,l.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(M+1," ",l.default.sources.USER),this.quill.setSelection(M+2,l.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),L}(I.default);function N(D){var L=D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return L?(L[1]||"https")+"://www.youtube.com/embed/"+L[2]+"?showinfo=0":(L=D.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(L[1]||"https")+"://player.vimeo.com/video/"+L[2]+"/":D}function w(D,L){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;L.forEach(function(G){var j=document.createElement("option");G===$?j.setAttribute("selected","selected"):j.setAttribute("value",G),D.appendChild(j)})}r.BaseTooltip=Q,r.default=ne},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];this.insertBefore(s[0],null),s.length>1&&this.append.apply(this,s.slice(1))},a.prototype.contains=function(s){for(var u,f=this.iterator();u=f();)if(u===s)return!0;return!1},a.prototype.insertBefore=function(s,u){s&&(s.next=u,u!=null?(s.prev=u.prev,u.prev!=null&&(u.prev.next=s),u.prev=s,u===this.head&&(this.head=s)):this.tail!=null?(this.tail.next=s,s.prev=this.tail,this.tail=s):(s.prev=null,this.head=this.tail=s),this.length+=1)},a.prototype.offset=function(s){for(var u=0,f=this.head;f!=null;){if(f===s)return u;u+=f.length(),f=f.next}return-1},a.prototype.remove=function(s){this.contains(s)&&(s.prev!=null&&(s.prev.next=s.next),s.next!=null&&(s.next.prev=s.prev),s===this.head&&(this.head=s.next),s===this.tail&&(this.tail=s.prev),this.length-=1)},a.prototype.iterator=function(s){return s===void 0&&(s=this.head),function(){var u=s;return s!=null&&(s=s.next),u}},a.prototype.find=function(s,u){u===void 0&&(u=!1);for(var f,c=this.iterator();f=c();){var v=f.length();if(s<v||u&&s===v&&(f.next==null||f.next.length()!==0))return[f,s];s-=v}return[null,0]},a.prototype.forEach=function(s){for(var u,f=this.iterator();u=f();)s(u)},a.prototype.forEachAt=function(s,u,f){if(!(u<=0))for(var c=this.find(s),v=c[0],l=c[1],h,p=s-l,g=this.iterator(v);(h=g())&&p<s+u;){var d=h.length();s>p?f(h,s-p,Math.min(u,p+d-s)):f(h,0,Math.min(d,s+u-p)),p+=d}},a.prototype.map=function(s){return this.reduce(function(u,f){return u.push(s(f)),u},[])},a.prototype.reduce=function(s,u){for(var f,c=this.iterator();f=c();)u=s(u,f);return u},a}();r.default=o},function(t,r,i){var o=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,h){l.__proto__=h}||function(l,h){for(var p in h)h.hasOwnProperty(p)&&(l[p]=h[p])};return function(l,h){v(l,h);function p(){this.constructor=l}l.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(17),s=i(1),u={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},f=100,c=function(v){o(l,v);function l(h){var p=v.call(this,h)||this;return p.scroll=p,p.observer=new MutationObserver(function(g){p.update(g)}),p.observer.observe(p.domNode,u),p.attach(),p}return l.prototype.detach=function(){v.prototype.detach.call(this),this.observer.disconnect()},l.prototype.deleteAt=function(h,p){this.update(),h===0&&p===this.length()?this.children.forEach(function(g){g.remove()}):v.prototype.deleteAt.call(this,h,p)},l.prototype.formatAt=function(h,p,g,d){this.update(),v.prototype.formatAt.call(this,h,p,g,d)},l.prototype.insertAt=function(h,p,g){this.update(),v.prototype.insertAt.call(this,h,p,g)},l.prototype.optimize=function(h,p){var g=this;h===void 0&&(h=[]),p===void 0&&(p={}),v.prototype.optimize.call(this,p);for(var d=[].slice.call(this.observer.takeRecords());d.length>0;)h.push(d.pop());for(var m=function(C,S){S===void 0&&(S=!0),!(C==null||C===g)&&C.domNode.parentNode!=null&&(C.domNode[s.DATA_KEY].mutations==null&&(C.domNode[s.DATA_KEY].mutations=[]),S&&m(C.parent))},y=function(C){C.domNode[s.DATA_KEY]==null||C.domNode[s.DATA_KEY].mutations==null||(C instanceof a.default&&C.children.forEach(y),C.optimize(p))},_=h,x=0;_.length>0;x+=1){if(x>=f)throw new Error("[Parchment] Maximum optimize iterations reached");for(_.forEach(function(C){var S=s.find(C.target,!0);S!=null&&(S.domNode===C.target&&(C.type==="childList"?(m(s.find(C.previousSibling,!1)),[].forEach.call(C.addedNodes,function(A){var I=s.find(A,!1);m(I,!1),I instanceof a.default&&I.children.forEach(function(B){m(B,!1)})})):C.type==="attributes"&&m(S.prev)),m(S))}),this.children.forEach(y),_=[].slice.call(this.observer.takeRecords()),d=_.slice();d.length>0;)h.push(d.pop())}},l.prototype.update=function(h,p){var g=this;p===void 0&&(p={}),h=h||this.observer.takeRecords(),h.map(function(d){var m=s.find(d.target,!0);return m==null?null:m.domNode[s.DATA_KEY].mutations==null?(m.domNode[s.DATA_KEY].mutations=[d],m):(m.domNode[s.DATA_KEY].mutations.push(d),null)}).forEach(function(d){d==null||d===g||d.domNode[s.DATA_KEY]==null||d.update(d.domNode[s.DATA_KEY].mutations||[],p)}),this.domNode[s.DATA_KEY].mutations!=null&&v.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,p),this.optimize(h,p)},l.blotName="scroll",l.defaultChild="block",l.scope=s.Scope.BLOCK_BLOT,l.tagName="DIV",l}(a.default);r.default=c},function(t,r,i){var o=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,l){v.__proto__=l}||function(v,l){for(var h in l)l.hasOwnProperty(h)&&(v[h]=l[h])};return function(v,l){c(v,l);function h(){this.constructor=v}v.prototype=l===null?Object.create(l):(h.prototype=l.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(18),s=i(1);function u(c,v){if(Object.keys(c).length!==Object.keys(v).length)return!1;for(var l in c)if(c[l]!==v[l])return!1;return!0}var f=function(c){o(v,c);function v(){return c!==null&&c.apply(this,arguments)||this}return v.formats=function(l){if(l.tagName!==v.tagName)return c.formats.call(this,l)},v.prototype.format=function(l,h){var p=this;l===this.statics.blotName&&!h?(this.children.forEach(function(g){g instanceof a.default||(g=g.wrap(v.blotName,!0)),p.attributes.copy(g)}),this.unwrap()):c.prototype.format.call(this,l,h)},v.prototype.formatAt=function(l,h,p,g){if(this.formats()[p]!=null||s.query(p,s.Scope.ATTRIBUTE)){var d=this.isolate(l,h);d.format(p,g)}else c.prototype.formatAt.call(this,l,h,p,g)},v.prototype.optimize=function(l){c.prototype.optimize.call(this,l);var h=this.formats();if(Object.keys(h).length===0)return this.unwrap();var p=this.next;p instanceof v&&p.prev===this&&u(h,p.formats())&&(p.moveChildren(this),p.remove())},v.blotName="inline",v.scope=s.Scope.INLINE_BLOT,v.tagName="SPAN",v}(a.default);r.default=f},function(t,r,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var l in v)v.hasOwnProperty(l)&&(c[l]=v[l])};return function(c,v){f(c,v);function l(){this.constructor=c}c.prototype=v===null?Object.create(v):(l.prototype=v.prototype,new l)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(18),s=i(1),u=function(f){o(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.formats=function(v){var l=s.query(c.blotName).tagName;if(v.tagName!==l)return f.formats.call(this,v)},c.prototype.format=function(v,l){s.query(v,s.Scope.BLOCK)!=null&&(v===this.statics.blotName&&!l?this.replaceWith(c.blotName):f.prototype.format.call(this,v,l))},c.prototype.formatAt=function(v,l,h,p){s.query(h,s.Scope.BLOCK)!=null?this.format(h,p):f.prototype.formatAt.call(this,v,l,h,p)},c.prototype.insertAt=function(v,l,h){if(h==null||s.query(l,s.Scope.INLINE)!=null)f.prototype.insertAt.call(this,v,l,h);else{var p=this.split(v),g=s.create(l,h);p.parent.insertBefore(g,p)}},c.prototype.update=function(v,l){navigator.userAgent.match(/Trident/)?this.build():f.prototype.update.call(this,v,l)},c.blotName="block",c.scope=s.Scope.BLOCK_BLOT,c.tagName="P",c}(a.default);r.default=u},function(t,r,i){var o=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,c){f.__proto__=c}||function(f,c){for(var v in c)c.hasOwnProperty(v)&&(f[v]=c[v])};return function(f,c){u(f,c);function v(){this.constructor=f}f.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(19),s=function(u){o(f,u);function f(){return u!==null&&u.apply(this,arguments)||this}return f.formats=function(c){},f.prototype.format=function(c,v){u.prototype.formatAt.call(this,0,this.length(),c,v)},f.prototype.formatAt=function(c,v,l,h){c===0&&v===this.length()?this.format(l,h):u.prototype.formatAt.call(this,c,v,l,h)},f.prototype.formats=function(){return this.statics.formats(this.domNode)},f}(a.default);r.default=s},function(t,r,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var l in v)v.hasOwnProperty(l)&&(c[l]=v[l])};return function(c,v){f(c,v);function l(){this.constructor=c}c.prototype=v===null?Object.create(v):(l.prototype=v.prototype,new l)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=i(19),s=i(1),u=function(f){o(c,f);function c(v){var l=f.call(this,v)||this;return l.text=l.statics.value(l.domNode),l}return c.create=function(v){return document.createTextNode(v)},c.value=function(v){var l=v.data;return l.normalize&&(l=l.normalize()),l},c.prototype.deleteAt=function(v,l){this.domNode.data=this.text=this.text.slice(0,v)+this.text.slice(v+l)},c.prototype.index=function(v,l){return this.domNode===v?l:-1},c.prototype.insertAt=function(v,l,h){h==null?(this.text=this.text.slice(0,v)+l+this.text.slice(v),this.domNode.data=this.text):f.prototype.insertAt.call(this,v,l,h)},c.prototype.length=function(){return this.text.length},c.prototype.optimize=function(v){f.prototype.optimize.call(this,v),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof c&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},c.prototype.position=function(v,l){return[this.domNode,v]},c.prototype.split=function(v,l){if(l===void 0&&(l=!1),!l){if(v===0)return this;if(v===this.length())return this.next}var h=s.create(this.domNode.splitText(v));return this.parent.insertBefore(h,this.next),this.text=this.statics.value(this.domNode),h},c.prototype.update=function(v,l){var h=this;v.some(function(p){return p.type==="characterData"&&p.target===h.domNode})&&(this.text=this.statics.value(this.domNode))},c.prototype.value=function(){return this.text},c.blotName="text",c.scope=s.Scope.INLINE_BLOT,c}(a.default);r.default=u},function(t,r,i){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(s,u){return arguments.length>1&&!this.contains(s)==!u?u:a.call(this,s)}}String.prototype.startsWith||(String.prototype.startsWith=function(s,u){return u=u||0,this.substr(u,s.length)===s}),String.prototype.endsWith||(String.prototype.endsWith=function(s,u){var f=this.toString();(typeof u!="number"||!isFinite(u)||Math.floor(u)!==u||u>f.length)&&(u=f.length),u-=s.length;var c=f.indexOf(s,u);return c!==-1&&c===u}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(u){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof u!="function")throw new TypeError("predicate must be a function");for(var f=Object(this),c=f.length>>>0,v=arguments[1],l,h=0;h<c;h++)if(l=f[h],u.call(v,l,h,f))return l}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,r){var i=-1,o=1,a=0;function s(x,C,S){if(x==C)return x?[[a,x]]:[];(S<0||x.length<S)&&(S=null);var A=v(x,C),I=x.substring(0,A);x=x.substring(A),C=C.substring(A),A=l(x,C);var B=x.substring(x.length-A);x=x.substring(0,x.length-A),C=C.substring(0,C.length-A);var O=u(x,C);return I&&O.unshift([a,I]),B&&O.push([a,B]),p(O),S!=null&&(O=m(O,S)),O=y(O),O}function u(x,C){var S;if(!x)return[[o,C]];if(!C)return[[i,x]];var A=x.length>C.length?x:C,I=x.length>C.length?C:x,B=A.indexOf(I);if(B!=-1)return S=[[o,A.substring(0,B)],[a,I],[o,A.substring(B+I.length)]],x.length>C.length&&(S[0][0]=S[2][0]=i),S;if(I.length==1)return[[i,x],[o,C]];var O=h(x,C);if(O){var E=O[0],k=O[1],R=O[2],F=O[3],q=O[4],Z=s(E,R),ee=s(k,F);return Z.concat([[a,q]],ee)}return f(x,C)}function f(x,C){for(var S=x.length,A=C.length,I=Math.ceil((S+A)/2),B=I,O=2*I,E=new Array(O),k=new Array(O),R=0;R<O;R++)E[R]=-1,k[R]=-1;E[B+1]=0,k[B+1]=0;for(var F=S-A,q=F%2!=0,Z=0,ee=0,ne=0,Q=0,N=0;N<I;N++){for(var w=-N+Z;w<=N-ee;w+=2){var D=B+w,L;w==-N||w!=N&&E[D-1]<E[D+1]?L=E[D+1]:L=E[D-1]+1;for(var $=L-w;L<S&&$<A&&x.charAt(L)==C.charAt($);)L++,$++;if(E[D]=L,L>S)ee+=2;else if($>A)Z+=2;else if(q){var G=B+F-w;if(G>=0&&G<O&&k[G]!=-1){var j=S-k[G];if(L>=j)return c(x,C,L,$)}}}for(var W=-N+ne;W<=N-Q;W+=2){var G=B+W,j;W==-N||W!=N&&k[G-1]<k[G+1]?j=k[G+1]:j=k[G-1]+1;for(var M=j-W;j<S&&M<A&&x.charAt(S-j-1)==C.charAt(A-M-1);)j++,M++;if(k[G]=j,j>S)Q+=2;else if(M>A)ne+=2;else if(!q){var D=B+F-W;if(D>=0&&D<O&&E[D]!=-1){var L=E[D],$=B+L-D;if(j=S-j,L>=j)return c(x,C,L,$)}}}}return[[i,x],[o,C]]}function c(x,C,S,A){var I=x.substring(0,S),B=C.substring(0,A),O=x.substring(S),E=C.substring(A),k=s(I,B),R=s(O,E);return k.concat(R)}function v(x,C){if(!x||!C||x.charAt(0)!=C.charAt(0))return 0;for(var S=0,A=Math.min(x.length,C.length),I=A,B=0;S<I;)x.substring(B,I)==C.substring(B,I)?(S=I,B=S):A=I,I=Math.floor((A-S)/2+S);return I}function l(x,C){if(!x||!C||x.charAt(x.length-1)!=C.charAt(C.length-1))return 0;for(var S=0,A=Math.min(x.length,C.length),I=A,B=0;S<I;)x.substring(x.length-I,x.length-B)==C.substring(C.length-I,C.length-B)?(S=I,B=S):A=I,I=Math.floor((A-S)/2+S);return I}function h(x,C){var S=x.length>C.length?x:C,A=x.length>C.length?C:x;if(S.length<4||A.length*2<S.length)return null;function I(ee,ne,Q){for(var N=ee.substring(Q,Q+Math.floor(ee.length/4)),w=-1,D="",L,$,G,j;(w=ne.indexOf(N,w+1))!=-1;){var W=v(ee.substring(Q),ne.substring(w)),M=l(ee.substring(0,Q),ne.substring(0,w));D.length<M+W&&(D=ne.substring(w-M,w)+ne.substring(w,w+W),L=ee.substring(0,Q-M),$=ee.substring(Q+W),G=ne.substring(0,w-M),j=ne.substring(w+W))}return D.length*2>=ee.length?[L,$,G,j,D]:null}var B=I(S,A,Math.ceil(S.length/4)),O=I(S,A,Math.ceil(S.length/2)),E;if(!B&&!O)return null;O?B?E=B[4].length>O[4].length?B:O:E=O:E=B;var k,R,F,q;x.length>C.length?(k=E[0],R=E[1],F=E[2],q=E[3]):(F=E[0],q=E[1],k=E[2],R=E[3]);var Z=E[4];return[k,R,F,q,Z]}function p(x){x.push([a,""]);for(var C=0,S=0,A=0,I="",B="",O;C<x.length;)switch(x[C][0]){case o:A++,B+=x[C][1],C++;break;case i:S++,I+=x[C][1],C++;break;case a:S+A>1?(S!==0&&A!==0&&(O=v(B,I),O!==0&&(C-S-A>0&&x[C-S-A-1][0]==a?x[C-S-A-1][1]+=B.substring(0,O):(x.splice(0,0,[a,B.substring(0,O)]),C++),B=B.substring(O),I=I.substring(O)),O=l(B,I),O!==0&&(x[C][1]=B.substring(B.length-O)+x[C][1],B=B.substring(0,B.length-O),I=I.substring(0,I.length-O))),S===0?x.splice(C-A,S+A,[o,B]):A===0?x.splice(C-S,S+A,[i,I]):x.splice(C-S-A,S+A,[i,I],[o,B]),C=C-S-A+(S?1:0)+(A?1:0)+1):C!==0&&x[C-1][0]==a?(x[C-1][1]+=x[C][1],x.splice(C,1)):C++,A=0,S=0,I="",B="";break}x[x.length-1][1]===""&&x.pop();var E=!1;for(C=1;C<x.length-1;)x[C-1][0]==a&&x[C+1][0]==a&&(x[C][1].substring(x[C][1].length-x[C-1][1].length)==x[C-1][1]?(x[C][1]=x[C-1][1]+x[C][1].substring(0,x[C][1].length-x[C-1][1].length),x[C+1][1]=x[C-1][1]+x[C+1][1],x.splice(C-1,1),E=!0):x[C][1].substring(0,x[C+1][1].length)==x[C+1][1]&&(x[C-1][1]+=x[C+1][1],x[C][1]=x[C][1].substring(x[C+1][1].length)+x[C+1][1],x.splice(C+1,1),E=!0)),C++;E&&p(x)}var g=s;g.INSERT=o,g.DELETE=i,g.EQUAL=a,t.exports=g;function d(x,C){if(C===0)return[a,x];for(var S=0,A=0;A<x.length;A++){var I=x[A];if(I[0]===i||I[0]===a){var B=S+I[1].length;if(C===B)return[A+1,x];if(C<B){x=x.slice();var O=C-S,E=[I[0],I[1].slice(0,O)],k=[I[0],I[1].slice(O)];return x.splice(A,1,E,k),[A+1,x]}else S=B}}throw new Error("cursor_pos is out of bounds!")}function m(x,C){var S=d(x,C),A=S[1],I=S[0],B=A[I],O=A[I+1];if(B==null)return x;if(B[0]!==a)return x;if(O!=null&&B[1]+O[1]===O[1]+B[1])return A.splice(I,2,O,B),_(A,I,2);if(O!=null&&O[1].indexOf(B[1])===0){A.splice(I,2,[O[0],B[1]],[0,B[1]]);var E=O[1].slice(B[1].length);return E.length>0&&A.splice(I+2,0,[O[0],E]),_(A,I,3)}else return x}function y(x){for(var C=!1,S=function(O){return O.charCodeAt(0)>=56320&&O.charCodeAt(0)<=57343},A=function(O){return O.charCodeAt(O.length-1)>=55296&&O.charCodeAt(O.length-1)<=56319},I=2;I<x.length;I+=1)x[I-2][0]===a&&A(x[I-2][1])&&x[I-1][0]===i&&S(x[I-1][1])&&x[I][0]===o&&S(x[I][1])&&(C=!0,x[I-1][1]=x[I-2][1].slice(-1)+x[I-1][1],x[I][1]=x[I-2][1].slice(-1)+x[I][1],x[I-2][1]=x[I-2][1].slice(0,-1));if(!C)return x;for(var B=[],I=0;I<x.length;I+=1)x[I][1].length>0&&B.push(x[I]);return B}function _(x,C,S){for(var A=C+S-1;A>=0&&A>=C-1;A--)if(A+1<x.length){var I=x[A],B=x[A+1];I[0]===B[1]&&x.splice(A,2,[I[0],I[1]+B[1]])}return x}},function(t,r){r=t.exports=typeof Object.keys=="function"?Object.keys:i,r.shim=i;function i(o){var a=[];for(var s in o)a.push(s);return a}},function(t,r){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";r=t.exports=i?o:a,r.supported=o;function o(s){return Object.prototype.toString.call(s)=="[object Arguments]"}r.unsupported=a;function a(s){return s&&typeof s=="object"&&typeof s.length=="number"&&Object.prototype.hasOwnProperty.call(s,"callee")&&!Object.prototype.propertyIsEnumerable.call(s,"callee")||!1}},function(t,r){var i=Object.prototype.hasOwnProperty,o="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(o=!1));function s(f,c,v){this.fn=f,this.context=c,this.once=v||!1}function u(){this._events=new a,this._eventsCount=0}u.prototype.eventNames=function(){var c=[],v,l;if(this._eventsCount===0)return c;for(l in v=this._events)i.call(v,l)&&c.push(o?l.slice(1):l);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(v)):c},u.prototype.listeners=function(c,v){var l=o?o+c:c,h=this._events[l];if(v)return!!h;if(!h)return[];if(h.fn)return[h.fn];for(var p=0,g=h.length,d=new Array(g);p<g;p++)d[p]=h[p].fn;return d},u.prototype.emit=function(c,v,l,h,p,g){var d=o?o+c:c;if(!this._events[d])return!1;var m=this._events[d],y=arguments.length,_,x;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),y){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,v),!0;case 3:return m.fn.call(m.context,v,l),!0;case 4:return m.fn.call(m.context,v,l,h),!0;case 5:return m.fn.call(m.context,v,l,h,p),!0;case 6:return m.fn.call(m.context,v,l,h,p,g),!0}for(x=1,_=new Array(y-1);x<y;x++)_[x-1]=arguments[x];m.fn.apply(m.context,_)}else{var C=m.length,S;for(x=0;x<C;x++)switch(m[x].once&&this.removeListener(c,m[x].fn,void 0,!0),y){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,v);break;case 3:m[x].fn.call(m[x].context,v,l);break;case 4:m[x].fn.call(m[x].context,v,l,h);break;default:if(!_)for(S=1,_=new Array(y-1);S<y;S++)_[S-1]=arguments[S];m[x].fn.apply(m[x].context,_)}}return!0},u.prototype.on=function(c,v,l){var h=new s(v,l||this),p=o?o+c:c;return this._events[p]?this._events[p].fn?this._events[p]=[this._events[p],h]:this._events[p].push(h):(this._events[p]=h,this._eventsCount++),this},u.prototype.once=function(c,v,l){var h=new s(v,l||this,!0),p=o?o+c:c;return this._events[p]?this._events[p].fn?this._events[p]=[this._events[p],h]:this._events[p].push(h):(this._events[p]=h,this._eventsCount++),this},u.prototype.removeListener=function(c,v,l,h){var p=o?o+c:c;if(!this._events[p])return this;if(!v)return--this._eventsCount===0?this._events=new a:delete this._events[p],this;var g=this._events[p];if(g.fn)g.fn===v&&(!h||g.once)&&(!l||g.context===l)&&(--this._eventsCount===0?this._events=new a:delete this._events[p]);else{for(var d=0,m=[],y=g.length;d<y;d++)(g[d].fn!==v||h&&!g[d].once||l&&g[d].context!==l)&&m.push(g[d]);m.length?this._events[p]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new a:delete this._events[p]}return this},u.prototype.removeAllListeners=function(c){var v;return c?(v=o?o+c:c,this._events[v]&&(--this._eventsCount===0?this._events=new a:delete this._events[v])):(this._events=new a,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prototype.setMaxListeners=function(){return this},u.prefixed=o,u.EventEmitter=u,typeof t<"u"&&(t.exports=u)},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ie){return typeof ie}:function(ie){return ie&&typeof Symbol=="function"&&ie.constructor===Symbol&&ie!==Symbol.prototype?"symbol":typeof ie},a=function(){function ie(oe,le){var ce=[],ae=!0,ve=!1,ye=void 0;try{for(var _e=oe[Symbol.iterator](),Ce;!(ae=(Ce=_e.next()).done)&&(ce.push(Ce.value),!(le&&ce.length===le));ae=!0);}catch(Ae){ve=!0,ye=Ae}finally{try{!ae&&_e.return&&_e.return()}finally{if(ve)throw ye}}return ce}return function(oe,le){if(Array.isArray(oe))return oe;if(Symbol.iterator in Object(oe))return ie(oe,le);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function ie(oe,le){for(var ce=0;ce<le.length;ce++){var ae=le[ce];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(oe,ae.key,ae)}}return function(oe,le,ce){return le&&ie(oe.prototype,le),ce&&ie(oe,ce),oe}}(),u=i(3),f=k(u),c=i(2),v=k(c),l=i(0),h=k(l),p=i(5),g=k(p),d=i(10),m=k(d),y=i(9),_=k(y),x=i(36),C=i(37),S=i(13),A=k(S),I=i(26),B=i(38),O=i(39),E=i(40);function k(ie){return ie&&ie.__esModule?ie:{default:ie}}function R(ie,oe,le){return oe in ie?Object.defineProperty(ie,oe,{value:le,enumerable:!0,configurable:!0,writable:!0}):ie[oe]=le,ie}function F(ie,oe){if(!(ie instanceof oe))throw new TypeError("Cannot call a class as a function")}function q(ie,oe){if(!ie)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return oe&&(typeof oe=="object"||typeof oe=="function")?oe:ie}function Z(ie,oe){if(typeof oe!="function"&&oe!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof oe);ie.prototype=Object.create(oe&&oe.prototype,{constructor:{value:ie,enumerable:!1,writable:!0,configurable:!0}}),oe&&(Object.setPrototypeOf?Object.setPrototypeOf(ie,oe):ie.__proto__=oe)}var ee=(0,m.default)("quill:clipboard"),ne="__ql-matcher",Q=[[Node.TEXT_NODE,ue],[Node.TEXT_NODE,X],["br",K],[Node.ELEMENT_NODE,X],[Node.ELEMENT_NODE,V],[Node.ELEMENT_NODE,se],[Node.ELEMENT_NODE,H],[Node.ELEMENT_NODE,fe],["li",P],["b",M.bind(M,"bold")],["i",M.bind(M,"italic")],["style",J]],N=[x.AlignAttribute,B.DirectionAttribute].reduce(function(ie,oe){return ie[oe.keyName]=oe,ie},{}),w=[x.AlignStyle,C.BackgroundStyle,I.ColorStyle,B.DirectionStyle,O.FontStyle,E.SizeStyle].reduce(function(ie,oe){return ie[oe.keyName]=oe,ie},{}),D=function(ie){Z(oe,ie);function oe(le,ce){F(this,oe);var ae=q(this,(oe.__proto__||Object.getPrototypeOf(oe)).call(this,le,ce));return ae.quill.root.addEventListener("paste",ae.onPaste.bind(ae)),ae.container=ae.quill.addContainer("ql-clipboard"),ae.container.setAttribute("contenteditable",!0),ae.container.setAttribute("tabindex",-1),ae.matchers=[],Q.concat(ae.options.matchers).forEach(function(ve){var ye=a(ve,2),_e=ye[0],Ce=ye[1];!ce.matchVisual&&Ce===se||ae.addMatcher(_e,Ce)}),ae}return s(oe,[{key:"addMatcher",value:function(ce,ae){this.matchers.push([ce,ae])}},{key:"convert",value:function(ce){if(typeof ce=="string")return this.container.innerHTML=ce.replace(/\>\r?\n +\</g,"><"),this.convert();var ae=this.quill.getFormat(this.quill.selection.savedRange.index);if(ae[A.default.blotName]){var ve=this.container.innerText;return this.container.innerHTML="",new v.default().insert(ve,R({},A.default.blotName,ae[A.default.blotName]))}var ye=this.prepareMatching(),_e=a(ye,2),Ce=_e[0],Ae=_e[1],Ee=W(this.container,Ce,Ae);return G(Ee,`
65
+ `)&&Ee.ops[Ee.ops.length-1].attributes==null&&(Ee=Ee.compose(new v.default().retain(Ee.length()-1).delete(1))),ee.log("convert",this.container.innerHTML,Ee),this.container.innerHTML="",Ee}},{key:"dangerouslyPasteHTML",value:function(ce,ae){var ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;if(typeof ce=="string")this.quill.setContents(this.convert(ce),ae),this.quill.setSelection(0,g.default.sources.SILENT);else{var ye=this.convert(ae);this.quill.updateContents(new v.default().retain(ce).concat(ye),ve),this.quill.setSelection(ce+ye.length(),g.default.sources.SILENT)}}},{key:"onPaste",value:function(ce){var ae=this;if(!(ce.defaultPrevented||!this.quill.isEnabled())){var ve=this.quill.getSelection(),ye=new v.default().retain(ve.index),_e=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(g.default.sources.SILENT),setTimeout(function(){ye=ye.concat(ae.convert()).delete(ve.length),ae.quill.updateContents(ye,g.default.sources.USER),ae.quill.setSelection(ye.length()-ve.length,g.default.sources.SILENT),ae.quill.scrollingContainer.scrollTop=_e,ae.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var ce=this,ae=[],ve=[];return this.matchers.forEach(function(ye){var _e=a(ye,2),Ce=_e[0],Ae=_e[1];switch(Ce){case Node.TEXT_NODE:ve.push(Ae);break;case Node.ELEMENT_NODE:ae.push(Ae);break;default:[].forEach.call(ce.container.querySelectorAll(Ce),function(Ee){Ee[ne]=Ee[ne]||[],Ee[ne].push(Ae)});break}}),[ae,ve]}}]),oe}(_.default);D.DEFAULTS={matchers:[],matchVisual:!0};function L(ie,oe,le){return(typeof oe>"u"?"undefined":o(oe))==="object"?Object.keys(oe).reduce(function(ce,ae){return L(ce,ae,oe[ae])},ie):ie.reduce(function(ce,ae){return ae.attributes&&ae.attributes[oe]?ce.push(ae):ce.insert(ae.insert,(0,f.default)({},R({},oe,le),ae.attributes))},new v.default)}function $(ie){if(ie.nodeType!==Node.ELEMENT_NODE)return{};var oe="__ql-computed-style";return ie[oe]||(ie[oe]=window.getComputedStyle(ie))}function G(ie,oe){for(var le="",ce=ie.ops.length-1;ce>=0&&le.length<oe.length;--ce){var ae=ie.ops[ce];if(typeof ae.insert!="string")break;le=ae.insert+le}return le.slice(-1*oe.length)===oe}function j(ie){if(ie.childNodes.length===0)return!1;var oe=$(ie);return["block","list-item"].indexOf(oe.display)>-1}function W(ie,oe,le){return ie.nodeType===ie.TEXT_NODE?le.reduce(function(ce,ae){return ae(ie,ce)},new v.default):ie.nodeType===ie.ELEMENT_NODE?[].reduce.call(ie.childNodes||[],function(ce,ae){var ve=W(ae,oe,le);return ae.nodeType===ie.ELEMENT_NODE&&(ve=oe.reduce(function(ye,_e){return _e(ae,ye)},ve),ve=(ae[ne]||[]).reduce(function(ye,_e){return _e(ae,ye)},ve)),ce.concat(ve)},new v.default):new v.default}function M(ie,oe,le){return L(le,ie,!0)}function H(ie,oe){var le=h.default.Attributor.Attribute.keys(ie),ce=h.default.Attributor.Class.keys(ie),ae=h.default.Attributor.Style.keys(ie),ve={};return le.concat(ce).concat(ae).forEach(function(ye){var _e=h.default.query(ye,h.default.Scope.ATTRIBUTE);_e!=null&&(ve[_e.attrName]=_e.value(ie),ve[_e.attrName])||(_e=N[ye],_e!=null&&(_e.attrName===ye||_e.keyName===ye)&&(ve[_e.attrName]=_e.value(ie)||void 0),_e=w[ye],_e!=null&&(_e.attrName===ye||_e.keyName===ye)&&(_e=w[ye],ve[_e.attrName]=_e.value(ie)||void 0))}),Object.keys(ve).length>0&&(oe=L(oe,ve)),oe}function V(ie,oe){var le=h.default.query(ie);if(le==null)return oe;if(le.prototype instanceof h.default.Embed){var ce={},ae=le.value(ie);ae!=null&&(ce[le.blotName]=ae,oe=new v.default().insert(ce,le.formats(ie)))}else typeof le.formats=="function"&&(oe=L(oe,le.blotName,le.formats(ie)));return oe}function K(ie,oe){return G(oe,`
66
66
  `)||oe.insert(`
67
67
  `),oe}function J(){return new v.default}function P(ie,oe){var le=h.default.query(ie);if(le==null||le.blotName!=="list-item"||!G(oe,`
68
- `))return oe;for(var ue=-1,ae=ie.parentNode;!ae.classList.contains("ql-clipboard");)(h.default.query(ae)||{}).blotName==="list"&&(ue+=1),ae=ae.parentNode;return ue<=0?oe:oe.compose(new v.default().retain(oe.length()-1).retain(1,{indent:ue}))}function X(ie,oe){return G(oe,`
68
+ `))return oe;for(var ce=-1,ae=ie.parentNode;!ae.classList.contains("ql-clipboard");)(h.default.query(ae)||{}).blotName==="list"&&(ce+=1),ae=ae.parentNode;return ce<=0?oe:oe.compose(new v.default().retain(oe.length()-1).retain(1,{indent:ce}))}function X(ie,oe){return G(oe,`
69
69
  `)||(j(ie)||oe.length()>0&&ie.nextSibling&&j(ie.nextSibling))&&oe.insert(`
70
70
  `),oe}function se(ie,oe){if(j(ie)&&ie.nextElementSibling!=null&&!G(oe,`
71
71
 
72
72
  `)){var le=ie.offsetHeight+parseFloat($(ie).marginTop)+parseFloat($(ie).marginBottom);ie.nextElementSibling.offsetTop>ie.offsetTop+le*1.5&&oe.insert(`
73
- `)}return oe}function fe(ie,oe){var le={},ue=ie.style||{};return ue.fontStyle&&$(ie).fontStyle==="italic"&&(le.italic=!0),ue.fontWeight&&($(ie).fontWeight.startsWith("bold")||parseInt($(ie).fontWeight)>=700)&&(le.bold=!0),Object.keys(le).length>0&&(oe=L(oe,le)),parseFloat(ue.textIndent||0)>0&&(oe=new v.default().insert(" ").concat(oe)),oe}function ce(ie,oe){var le=ie.data;if(ie.parentNode.tagName==="O:P")return oe.insert(le.trim());if(le.trim().length===0&&ie.parentNode.classList.contains("ql-clipboard"))return oe;if(!$(ie.parentNode).whiteSpace.startsWith("pre")){var ue=function(ve,ye){return ye=ye.replace(/[^\u00a0]/g,""),ye.length<1&&ve?" ":ye};le=le.replace(/\r\n/g," ").replace(/\n/g," "),le=le.replace(/\s\s+/g,ue.bind(ue,!0)),(ie.previousSibling==null&&j(ie.parentNode)||ie.previousSibling!=null&&j(ie.previousSibling))&&(le=le.replace(/^\s+/,ue.bind(ue,!1))),(ie.nextSibling==null&&j(ie.parentNode)||ie.nextSibling!=null&&j(ie.nextSibling))&&(le=le.replace(/\s+$/,ue.bind(ue,!1)))}return oe.insert(le)}r.default=D,r.matchAttributor=H,r.matchBlot=V,r.matchNewline=X,r.matchSpacing=se,r.matchText=ce},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function p(g,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,d,m){return d&&p(g.prototype,d),m&&p(g,m),g}}(),a=function p(g,d,m){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,d);if(y===void 0){var _=Object.getPrototypeOf(g);return _===null?void 0:p(_,d,m)}else{if("value"in y)return y.value;var x=y.get;return x===void 0?void 0:x.call(m)}},s=i(6),u=f(s);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function v(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function l(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h=function(p){l(g,p);function g(){return c(this,g),v(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return o(g,[{key:"optimize",value:function(m){a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),g}(u.default);h.blotName="bold",h.tagName=["STRONG","B"],r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var o=function(){function E(k,R){var F=[],q=!0,Z=!1,ee=void 0;try{for(var ne=k[Symbol.iterator](),Q;!(q=(Q=ne.next()).done)&&(F.push(Q.value),!(R&&F.length===R));q=!0);}catch(N){Z=!0,ee=N}finally{try{!q&&ne.return&&ne.return()}finally{if(Z)throw ee}}return F}return function(k,R){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return E(k,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function E(k,R){for(var F=0;F<R.length;F++){var q=R[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(k,q.key,q)}}return function(k,R,F){return R&&E(k.prototype,R),F&&E(k,F),k}}(),s=i(2),u=m(s),f=i(0),c=m(f),v=i(5),l=m(v),h=i(10),p=m(h),g=i(9),d=m(g);function m(E){return E&&E.__esModule?E:{default:E}}function y(E,k,R){return k in E?Object.defineProperty(E,k,{value:R,enumerable:!0,configurable:!0,writable:!0}):E[k]=R,E}function _(E,k){if(!(E instanceof k))throw new TypeError("Cannot call a class as a function")}function x(E,k){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:E}function C(E,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);E.prototype=Object.create(k&&k.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(E,k):E.__proto__=k)}var S=(0,p.default)("quill:toolbar"),A=function(E){C(k,E);function k(R,F){_(this,k);var q=x(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,R,F));if(Array.isArray(q.options.container)){var Z=document.createElement("div");B(Z,q.options.container),R.container.parentNode.insertBefore(Z,R.container),q.container=Z}else typeof q.options.container=="string"?q.container=document.querySelector(q.options.container):q.container=q.options.container;if(!(q.container instanceof HTMLElement)){var ee;return ee=S.error("Container required for toolbar",q.options),x(q,ee)}return q.container.classList.add("ql-toolbar"),q.controls=[],q.handlers={},Object.keys(q.options.handlers).forEach(function(ne){q.addHandler(ne,q.options.handlers[ne])}),[].forEach.call(q.container.querySelectorAll("button, select"),function(ne){q.attach(ne)}),q.quill.on(l.default.events.EDITOR_CHANGE,function(ne,Q){ne===l.default.events.SELECTION_CHANGE&&q.update(Q)}),q.quill.on(l.default.events.SCROLL_OPTIMIZE,function(){var ne=q.quill.selection.getRange(),Q=o(ne,1),N=Q[0];q.update(N)}),q}return a(k,[{key:"addHandler",value:function(F,q){this.handlers[F]=q}},{key:"attach",value:function(F){var q=this,Z=[].find.call(F.classList,function(ne){return ne.indexOf("ql-")===0});if(Z){if(Z=Z.slice(3),F.tagName==="BUTTON"&&F.setAttribute("type","button"),this.handlers[Z]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Z]==null){S.warn("ignoring attaching to disabled format",Z,F);return}if(c.default.query(Z)==null){S.warn("ignoring attaching to nonexistent format",Z,F);return}}var ee=F.tagName==="SELECT"?"change":"click";F.addEventListener(ee,function(ne){var Q=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var N=F.options[F.selectedIndex];N.hasAttribute("selected")?Q=!1:Q=N.value||!1}else F.classList.contains("ql-active")?Q=!1:Q=F.value||!F.hasAttribute("value"),ne.preventDefault();q.quill.focus();var w=q.quill.selection.getRange(),D=o(w,1),L=D[0];if(q.handlers[Z]!=null)q.handlers[Z].call(q,Q);else if(c.default.query(Z).prototype instanceof c.default.Embed){if(Q=prompt("Enter "+Z),!Q)return;q.quill.updateContents(new u.default().retain(L.index).delete(L.length).insert(y({},Z,Q)),l.default.sources.USER)}else q.quill.format(Z,Q,l.default.sources.USER);q.update(L)}),this.controls.push([Z,F])}}},{key:"update",value:function(F){var q=F==null?{}:this.quill.getFormat(F);this.controls.forEach(function(Z){var ee=o(Z,2),ne=ee[0],Q=ee[1];if(Q.tagName==="SELECT"){var N=void 0;if(F==null)N=null;else if(q[ne]==null)N=Q.querySelector("option[selected]");else if(!Array.isArray(q[ne])){var w=q[ne];typeof w=="string"&&(w=w.replace(/\"/g,'\\"')),N=Q.querySelector('option[value="'+w+'"]')}N==null?(Q.value="",Q.selectedIndex=-1):N.selected=!0}else if(F==null)Q.classList.remove("ql-active");else if(Q.hasAttribute("value")){var D=q[ne]===Q.getAttribute("value")||q[ne]!=null&&q[ne].toString()===Q.getAttribute("value")||q[ne]==null&&!Q.getAttribute("value");Q.classList.toggle("ql-active",D)}else Q.classList.toggle("ql-active",q[ne]!=null)})}}]),k}(d.default);A.DEFAULTS={};function I(E,k,R){var F=document.createElement("button");F.setAttribute("type","button"),F.classList.add("ql-"+k),R!=null&&(F.value=R),E.appendChild(F)}function B(E,k){Array.isArray(k[0])||(k=[k]),k.forEach(function(R){var F=document.createElement("span");F.classList.add("ql-formats"),R.forEach(function(q){if(typeof q=="string")I(F,q);else{var Z=Object.keys(q)[0],ee=q[Z];Array.isArray(ee)?O(F,Z,ee):I(F,Z,ee)}}),E.appendChild(F)})}function O(E,k,R){var F=document.createElement("select");F.classList.add("ql-"+k),R.forEach(function(q){var Z=document.createElement("option");q!==!1?Z.setAttribute("value",q):Z.setAttribute("selected","selected"),F.appendChild(Z)}),E.appendChild(F)}A.DEFAULTS={container:null,handlers:{clean:function(){var k=this,R=this.quill.getSelection();if(R!=null)if(R.length==0){var F=this.quill.getFormat();Object.keys(F).forEach(function(q){c.default.query(q,c.default.Scope.INLINE)!=null&&k.quill.format(q,!1)})}else this.quill.removeFormat(R,l.default.sources.USER)},direction:function(k){var R=this.quill.getFormat().align;k==="rtl"&&R==null?this.quill.format("align","right",l.default.sources.USER):!k&&R==="right"&&this.quill.format("align",!1,l.default.sources.USER),this.quill.format("direction",k,l.default.sources.USER)},indent:function(k){var R=this.quill.getSelection(),F=this.quill.getFormat(R),q=parseInt(F.indent||0);if(k==="+1"||k==="-1"){var Z=k==="+1"?1:-1;F.direction==="rtl"&&(Z*=-1),this.quill.format("indent",q+Z,l.default.sources.USER)}},link:function(k){k===!0&&(k=prompt("Enter link URL:")),this.quill.format("link",k,l.default.sources.USER)},list:function(k){var R=this.quill.getSelection(),F=this.quill.getFormat(R);k==="check"?F.list==="checked"||F.list==="unchecked"?this.quill.format("list",!1,l.default.sources.USER):this.quill.format("list","unchecked",l.default.sources.USER):this.quill.format("list",k,l.default.sources.USER)}}},r.default=A,r.addControls=B},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function p(g,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,d,m){return d&&p(g.prototype,d),m&&p(g,m),g}}(),a=function p(g,d,m){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,d);if(y===void 0){var _=Object.getPrototypeOf(g);return _===null?void 0:p(_,d,m)}else{if("value"in y)return y.value;var x=y.get;return x===void 0?void 0:x.call(m)}},s=i(28),u=f(s);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function v(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function l(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h=function(p){l(g,p);function g(d,m){c(this,g);var y=v(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,d));return y.label.innerHTML=m,y.container.classList.add("ql-color-picker"),[].slice.call(y.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(_){_.classList.add("ql-primary")}),y}return o(g,[{key:"buildItem",value:function(m){var y=a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"buildItem",this).call(this,m);return y.style.backgroundColor=m.getAttribute("value")||"",y}},{key:"selectItem",value:function(m,y){a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,m,y);var _=this.label.querySelector(".ql-color-label"),x=m&&m.getAttribute("data-value")||"";_&&(_.tagName==="line"?_.style.stroke=x:_.style.fill=x)}}]),g}(u.default);r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function p(g,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,d,m){return d&&p(g.prototype,d),m&&p(g,m),g}}(),a=function p(g,d,m){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,d);if(y===void 0){var _=Object.getPrototypeOf(g);return _===null?void 0:p(_,d,m)}else{if("value"in y)return y.value;var x=y.get;return x===void 0?void 0:x.call(m)}},s=i(28),u=f(s);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function v(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function l(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h=function(p){l(g,p);function g(d,m){c(this,g);var y=v(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,d));return y.container.classList.add("ql-icon-picker"),[].forEach.call(y.container.querySelectorAll(".ql-picker-item"),function(_){_.innerHTML=m[_.getAttribute("data-value")||""]}),y.defaultItem=y.container.querySelector(".ql-selected"),y.selectItem(y.defaultItem),y}return o(g,[{key:"selectItem",value:function(m,y){a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,m,y),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),g}(u.default);r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function u(f,c){for(var v=0;v<c.length;v++){var l=c[v];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,l.key,l)}}return function(f,c,v){return c&&u(f.prototype,c),v&&u(f,v),f}}();function a(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var s=function(){function u(f,c){var v=this;a(this,u),this.quill=f,this.boundsContainer=c||document.body,this.root=f.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){v.root.style.marginTop=-1*v.quill.root.scrollTop+"px"}),this.hide()}return o(u,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(c){var v=c.left+c.width/2-this.root.offsetWidth/2,l=c.bottom+this.quill.root.scrollTop;this.root.style.left=v+"px",this.root.style.top=l+"px",this.root.classList.remove("ql-flip");var h=this.boundsContainer.getBoundingClientRect(),p=this.root.getBoundingClientRect(),g=0;if(p.right>h.right&&(g=h.right-p.right,this.root.style.left=v+g+"px"),p.left<h.left&&(g=h.left-p.left,this.root.style.left=v+g+"px"),p.bottom>h.bottom){var d=p.bottom-p.top,m=c.bottom-c.top+d;this.root.style.top=l-m+"px",this.root.classList.add("ql-flip")}return g}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),u}();r.default=s},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function O(E,k){var R=[],F=!0,q=!1,Z=void 0;try{for(var ee=E[Symbol.iterator](),ne;!(F=(ne=ee.next()).done)&&(R.push(ne.value),!(k&&R.length===k));F=!0);}catch(Q){q=!0,Z=Q}finally{try{!F&&ee.return&&ee.return()}finally{if(q)throw Z}}return R}return function(E,k){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return O(E,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function O(E,k,R){E===null&&(E=Function.prototype);var F=Object.getOwnPropertyDescriptor(E,k);if(F===void 0){var q=Object.getPrototypeOf(E);return q===null?void 0:O(q,k,R)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(R)}},s=function(){function O(E,k){for(var R=0;R<k.length;R++){var F=k[R];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(E,F.key,F)}}return function(E,k,R){return k&&O(E.prototype,k),R&&O(E,R),E}}(),u=i(3),f=_(u),c=i(8),v=_(c),l=i(43),h=_(l),p=i(27),g=_(p),d=i(15),m=i(41),y=_(m);function _(O){return O&&O.__esModule?O:{default:O}}function x(O,E){if(!(O instanceof E))throw new TypeError("Cannot call a class as a function")}function C(O,E){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:O}function S(O,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);O.prototype=Object.create(E&&E.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(O,E):O.__proto__=E)}var A=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],I=function(O){S(E,O);function E(k,R){x(this,E),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=A);var F=C(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,k,R));return F.quill.container.classList.add("ql-snow"),F}return s(E,[{key:"extendToolbar",value:function(R){R.container.classList.add("ql-snow"),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),y.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),y.default),this.tooltip=new B(this.quill,this.options.bounds),R.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(F,q){R.handlers.link.call(R,!q.format.link)})}}]),E}(h.default);I.DEFAULTS=(0,f.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(E){if(E){var k=this.quill.getSelection();if(k==null||k.length==0)return;var R=this.quill.getText(k);/^\S+@\S+\.\S+$/.test(R)&&R.indexOf("mailto:")!==0&&(R="mailto:"+R);var F=this.quill.theme.tooltip;F.edit("link",R)}else this.quill.format("link",!1)}}}}});var B=function(O){S(E,O);function E(k,R){x(this,E);var F=C(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,k,R));return F.preview=F.root.querySelector("a.ql-preview"),F}return s(E,[{key:"listen",value:function(){var R=this;a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(F){R.root.classList.contains("ql-editing")?R.save():R.edit("link",R.preview.textContent),F.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(F){if(R.linkRange!=null){var q=R.linkRange;R.restoreFocus(),R.quill.formatText(q,"link",!1,v.default.sources.USER),delete R.linkRange}F.preventDefault(),R.hide()}),this.quill.on(v.default.events.SELECTION_CHANGE,function(F,q,Z){if(F!=null){if(F.length===0&&Z===v.default.sources.USER){var ee=R.quill.scroll.descendant(g.default,F.index),ne=o(ee,2),Q=ne[0],N=ne[1];if(Q!=null){R.linkRange=new d.Range(F.index-N,Q.length());var w=g.default.formats(Q.domNode);R.preview.textContent=w,R.preview.setAttribute("href",w),R.show(),R.position(R.quill.getBounds(R.linkRange));return}}else delete R.linkRange;R.hide()}})}},{key:"show",value:function(){a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),E}(l.BaseTooltip);B.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=I},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(29),a=ae(o),s=i(36),u=i(38),f=i(64),c=i(65),v=ae(c),l=i(66),h=ae(l),p=i(67),g=ae(p),d=i(37),m=i(26),y=i(39),_=i(40),x=i(56),C=ae(x),S=i(68),A=ae(S),I=i(27),B=ae(I),O=i(69),E=ae(O),k=i(70),R=ae(k),F=i(71),q=ae(F),Z=i(72),ee=ae(Z),ne=i(73),Q=ae(ne),N=i(13),w=ae(N),D=i(74),L=ae(D),$=i(75),G=ae($),j=i(57),W=ae(j),M=i(41),H=ae(M),V=i(28),K=ae(V),J=i(59),P=ae(J),X=i(60),se=ae(X),fe=i(61),ce=ae(fe),ie=i(108),oe=ae(ie),le=i(62),ue=ae(le);function ae(ve){return ve&&ve.__esModule?ve:{default:ve}}a.default.register({"attributors/attribute/direction":u.DirectionAttribute,"attributors/class/align":s.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":u.DirectionClass,"attributors/class/font":y.FontClass,"attributors/class/size":_.SizeClass,"attributors/style/align":s.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":u.DirectionStyle,"attributors/style/font":y.FontStyle,"attributors/style/size":_.SizeStyle},!0),a.default.register({"formats/align":s.AlignClass,"formats/direction":u.DirectionClass,"formats/indent":f.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":y.FontClass,"formats/size":_.SizeClass,"formats/blockquote":v.default,"formats/code-block":w.default,"formats/header":h.default,"formats/list":g.default,"formats/bold":C.default,"formats/code":N.Code,"formats/italic":A.default,"formats/link":B.default,"formats/script":E.default,"formats/strike":R.default,"formats/underline":q.default,"formats/image":ee.default,"formats/video":Q.default,"formats/list/item":p.ListItem,"modules/formula":L.default,"modules/syntax":G.default,"modules/toolbar":W.default,"themes/bubble":oe.default,"themes/snow":ue.default,"ui/icons":H.default,"ui/picker":K.default,"ui/icon-picker":se.default,"ui/color-picker":P.default,"ui/tooltip":ce.default},!0),r.default=a.default},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var o=function(){function g(d,m){for(var y=0;y<m.length;y++){var _=m[y];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(d,_.key,_)}}return function(d,m,y){return m&&g(d.prototype,m),y&&g(d,y),d}}(),a=function g(d,m,y){d===null&&(d=Function.prototype);var _=Object.getOwnPropertyDescriptor(d,m);if(_===void 0){var x=Object.getPrototypeOf(d);return x===null?void 0:g(x,m,y)}else{if("value"in _)return _.value;var C=_.get;return C===void 0?void 0:C.call(y)}},s=i(0),u=f(s);function f(g){return g&&g.__esModule?g:{default:g}}function c(g,d){if(!(g instanceof d))throw new TypeError("Cannot call a class as a function")}function v(g,d){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:g}function l(g,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);g.prototype=Object.create(d&&d.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(g,d):g.__proto__=d)}var h=function(g){l(d,g);function d(){return c(this,d),v(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return o(d,[{key:"add",value:function(y,_){if(_==="+1"||_==="-1"){var x=this.value(y)||0;_=_==="+1"?x+1:x-1}return _===0?(this.remove(y),!0):a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"add",this).call(this,y,_)}},{key:"canAdd",value:function(y,_){return a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"canAdd",this).call(this,y,_)||a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"canAdd",this).call(this,y,parseInt(_))}},{key:"value",value:function(y){return parseInt(a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"value",this).call(this,y))||void 0}}]),d}(u.default.Attributor.Class),p=new h("indent","ql-indent",{scope:u.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=p},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(4),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}function u(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}function f(l,h){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:l}function c(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);l.prototype=Object.create(h&&h.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(l,h):l.__proto__=h)}var v=function(l){c(h,l);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(a.default);v.blotName="blockquote",v.tagName="blockquote",r.default=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function h(p,g){for(var d=0;d<g.length;d++){var m=g[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,g,d){return g&&h(p.prototype,g),d&&h(p,d),p}}(),a=i(4),s=u(a);function u(h){return h&&h.__esModule?h:{default:h}}function f(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function c(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function v(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var l=function(h){v(p,h);function p(){return f(this,p),c(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return o(p,null,[{key:"formats",value:function(d){return this.tagName.indexOf(d.tagName)+1}}]),p}(s.default);l.blotName="header",l.tagName=["H1","H2","H3","H4","H5","H6"],r.default=l},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var o=function(){function x(C,S){for(var A=0;A<S.length;A++){var I=S[A];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(C,I.key,I)}}return function(C,S,A){return S&&x(C.prototype,S),A&&x(C,A),C}}(),a=function x(C,S,A){C===null&&(C=Function.prototype);var I=Object.getOwnPropertyDescriptor(C,S);if(I===void 0){var B=Object.getPrototypeOf(C);return B===null?void 0:x(B,S,A)}else{if("value"in I)return I.value;var O=I.get;return O===void 0?void 0:O.call(A)}},s=i(0),u=h(s),f=i(4),c=h(f),v=i(25),l=h(v);function h(x){return x&&x.__esModule?x:{default:x}}function p(x,C,S){return C in x?Object.defineProperty(x,C,{value:S,enumerable:!0,configurable:!0,writable:!0}):x[C]=S,x}function g(x,C){if(!(x instanceof C))throw new TypeError("Cannot call a class as a function")}function d(x,C){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:x}function m(x,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);x.prototype=Object.create(C&&C.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(x,C):x.__proto__=C)}var y=function(x){m(C,x);function C(){return g(this,C),d(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return o(C,[{key:"format",value:function(A,I){A===_.blotName&&!I?this.replaceWith(u.default.create(this.statics.scope)):a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"format",this).call(this,A,I)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(A,I){return this.parent.isolate(this.offset(this.parent),this.length()),A===this.parent.statics.blotName?(this.parent.replaceWith(A,I),this):(this.parent.unwrap(),a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replaceWith",this).call(this,A,I))}}],[{key:"formats",value:function(A){return A.tagName===this.tagName?void 0:a(C.__proto__||Object.getPrototypeOf(C),"formats",this).call(this,A)}}]),C}(c.default);y.blotName="list-item",y.tagName="LI";var _=function(x){m(C,x),o(C,null,[{key:"create",value:function(A){var I=A==="ordered"?"OL":"UL",B=a(C.__proto__||Object.getPrototypeOf(C),"create",this).call(this,I);return(A==="checked"||A==="unchecked")&&B.setAttribute("data-checked",A==="checked"),B}},{key:"formats",value:function(A){if(A.tagName==="OL")return"ordered";if(A.tagName==="UL")return A.hasAttribute("data-checked")?A.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function C(S){g(this,C);var A=d(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,S)),I=function(O){if(O.target.parentNode===S){var E=A.statics.formats(S),k=u.default.find(O.target);E==="checked"?k.format("list","unchecked"):E==="unchecked"&&k.format("list","checked")}};return S.addEventListener("touchstart",I),S.addEventListener("mousedown",I),A}return o(C,[{key:"format",value:function(A,I){this.children.length>0&&this.children.tail.format(A,I)}},{key:"formats",value:function(){return p({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,I){if(A instanceof y)a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertBefore",this).call(this,A,I);else{var B=I==null?this.length():I.offset(this),O=this.split(B);O.parent.insertBefore(A,O)}}},{key:"optimize",value:function(A){a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,A);var I=this.next;I!=null&&I.prev===this&&I.statics.blotName===this.statics.blotName&&I.domNode.tagName===this.domNode.tagName&&I.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(I.moveChildren(this),I.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var I=u.default.create(this.statics.defaultChild);A.moveChildren(I),this.appendChild(I)}a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replace",this).call(this,A)}}]),C}(l.default);_.blotName="list",_.scope=u.default.Scope.BLOCK_BLOT,_.tagName=["OL","UL"],_.defaultChild="list-item",_.allowedChildren=[y],r.ListItem=y,r.default=_},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(56),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}function u(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}function f(l,h){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:l}function c(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);l.prototype=Object.create(h&&h.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(l,h):l.__proto__=h)}var v=function(l){c(h,l);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(a.default);v.blotName="italic",v.tagName=["EM","I"],r.default=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function p(g,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,d,m){return d&&p(g.prototype,d),m&&p(g,m),g}}(),a=function p(g,d,m){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,d);if(y===void 0){var _=Object.getPrototypeOf(g);return _===null?void 0:p(_,d,m)}else{if("value"in y)return y.value;var x=y.get;return x===void 0?void 0:x.call(m)}},s=i(6),u=f(s);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function v(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function l(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h=function(p){l(g,p);function g(){return c(this,g),v(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return o(g,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):a(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),g}(u.default);h.blotName="script",h.tagName=["SUB","SUP"],r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(6),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}function u(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}function f(l,h){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:l}function c(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);l.prototype=Object.create(h&&h.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(l,h):l.__proto__=h)}var v=function(l){c(h,l);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(a.default);v.blotName="strike",v.tagName="S",r.default=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(6),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}function u(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}function f(l,h){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:l}function c(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);l.prototype=Object.create(h&&h.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(l,h):l.__proto__=h)}var v=function(l){c(h,l);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(a.default);v.blotName="underline",v.tagName="U",r.default=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function d(m,y){for(var _=0;_<y.length;_++){var x=y[_];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,y,_){return y&&d(m.prototype,y),_&&d(m,_),m}}(),a=function d(m,y,_){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,y);if(x===void 0){var C=Object.getPrototypeOf(m);return C===null?void 0:d(C,y,_)}else{if("value"in x)return x.value;var S=x.get;return S===void 0?void 0:S.call(_)}},s=i(0),u=c(s),f=i(27);function c(d){return d&&d.__esModule?d:{default:d}}function v(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}function l(d,m){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:d}function h(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(d,m):d.__proto__=m)}var p=["alt","height","width"],g=function(d){h(m,d);function m(){return v(this,m),l(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(_,x){p.indexOf(_)>-1?x?this.domNode.setAttribute(_,x):this.domNode.removeAttribute(_):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,_,x)}}],[{key:"create",value:function(_){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,_);return typeof _=="string"&&x.setAttribute("src",this.sanitize(_)),x}},{key:"formats",value:function(_){return p.reduce(function(x,C){return _.hasAttribute(C)&&(x[C]=_.getAttribute(C)),x},{})}},{key:"match",value:function(_){return/\.(jpe?g|gif|png)$/.test(_)||/^data:image\/.+;base64/.test(_)}},{key:"sanitize",value:function(_){return(0,f.sanitize)(_,["http","https","data"])?_:"//:0"}},{key:"value",value:function(_){return _.getAttribute("src")}}]),m}(u.default.Embed);g.blotName="image",g.tagName="IMG",r.default=g},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function d(m,y){for(var _=0;_<y.length;_++){var x=y[_];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,y,_){return y&&d(m.prototype,y),_&&d(m,_),m}}(),a=function d(m,y,_){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,y);if(x===void 0){var C=Object.getPrototypeOf(m);return C===null?void 0:d(C,y,_)}else{if("value"in x)return x.value;var S=x.get;return S===void 0?void 0:S.call(_)}},s=i(4),u=i(27),f=c(u);function c(d){return d&&d.__esModule?d:{default:d}}function v(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}function l(d,m){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:d}function h(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(d,m):d.__proto__=m)}var p=["height","width"],g=function(d){h(m,d);function m(){return v(this,m),l(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(_,x){p.indexOf(_)>-1?x?this.domNode.setAttribute(_,x):this.domNode.removeAttribute(_):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,_,x)}}],[{key:"create",value:function(_){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,_);return x.setAttribute("frameborder","0"),x.setAttribute("allowfullscreen",!0),x.setAttribute("src",this.sanitize(_)),x}},{key:"formats",value:function(_){return p.reduce(function(x,C){return _.hasAttribute(C)&&(x[C]=_.getAttribute(C)),x},{})}},{key:"sanitize",value:function(_){return f.default.sanitize(_)}},{key:"value",value:function(_){return _.getAttribute("src")}}]),m}(s.BlockEmbed);g.blotName="video",g.className="ql-video",g.tagName="IFRAME",r.default=g},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var o=function(){function _(x,C){for(var S=0;S<C.length;S++){var A=C[S];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,C,S){return C&&_(x.prototype,C),S&&_(x,S),x}}(),a=function _(x,C,S){x===null&&(x=Function.prototype);var A=Object.getOwnPropertyDescriptor(x,C);if(A===void 0){var I=Object.getPrototypeOf(x);return I===null?void 0:_(I,C,S)}else{if("value"in A)return A.value;var B=A.get;return B===void 0?void 0:B.call(S)}},s=i(35),u=h(s),f=i(5),c=h(f),v=i(9),l=h(v);function h(_){return _&&_.__esModule?_:{default:_}}function p(_,x){if(!(_ instanceof x))throw new TypeError("Cannot call a class as a function")}function g(_,x){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:_}function d(_,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);_.prototype=Object.create(x&&x.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(_,x):_.__proto__=x)}var m=function(_){d(x,_);function x(){return p(this,x),g(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,null,[{key:"create",value:function(S){var A=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,S);return typeof S=="string"&&(window.katex.render(S,A,{throwOnError:!1,errorColor:"#f00"}),A.setAttribute("data-value",S)),A}},{key:"value",value:function(S){return S.getAttribute("data-value")}}]),x}(u.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var y=function(_){d(x,_),o(x,null,[{key:"register",value:function(){c.default.register(m,!0)}}]);function x(){p(this,x);var C=g(this,(x.__proto__||Object.getPrototypeOf(x)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return C}return x}(l.default);r.FormulaBlot=m,r.default=y},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var o=function(){function S(A,I){for(var B=0;B<I.length;B++){var O=I[B];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,O.key,O)}}return function(A,I,B){return I&&S(A.prototype,I),B&&S(A,B),A}}(),a=function S(A,I,B){A===null&&(A=Function.prototype);var O=Object.getOwnPropertyDescriptor(A,I);if(O===void 0){var E=Object.getPrototypeOf(A);return E===null?void 0:S(E,I,B)}else{if("value"in O)return O.value;var k=O.get;return k===void 0?void 0:k.call(B)}},s=i(0),u=g(s),f=i(5),c=g(f),v=i(9),l=g(v),h=i(13),p=g(h);function g(S){return S&&S.__esModule?S:{default:S}}function d(S,A){if(!(S instanceof A))throw new TypeError("Cannot call a class as a function")}function m(S,A){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:S}function y(S,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);S.prototype=Object.create(A&&A.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(S,A):S.__proto__=A)}var _=function(S){y(A,S);function A(){return d(this,A),m(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return o(A,[{key:"replaceWith",value:function(B){this.domNode.textContent=this.domNode.textContent,this.attach(),a(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,B)}},{key:"highlight",value:function(B){var O=this.domNode.textContent;this.cachedText!==O&&((O.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=B(O),this.domNode.normalize(),this.attach()),this.cachedText=O)}}]),A}(p.default);_.className="ql-syntax";var x=new u.default.Attributor.Class("token","hljs",{scope:u.default.Scope.INLINE}),C=function(S){y(A,S),o(A,null,[{key:"register",value:function(){c.default.register(x,!0),c.default.register(_,!0)}}]);function A(I,B){d(this,A);var O=m(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,I,B));if(typeof O.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var E=null;return O.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(E),E=setTimeout(function(){O.highlight(),E=null},O.options.interval)}),O.highlight(),O}return o(A,[{key:"highlight",value:function(){var B=this;if(!this.quill.selection.composing){this.quill.update(c.default.sources.USER);var O=this.quill.getSelection();this.quill.scroll.descendants(_).forEach(function(E){E.highlight(B.options.highlight)}),this.quill.update(c.default.sources.SILENT),O!=null&&this.quill.setSelection(O,c.default.sources.SILENT)}}}]),A}(l.default);C.DEFAULTS={highlight:function(){return window.hljs==null?null:function(S){var A=window.hljs.highlightAuto(S);return A.value}}(),interval:1e3},r.CodeBlock=_,r.CodeToken=x,r.default=C},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,r){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,r){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,r){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,r){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var o=function A(I,B,O){I===null&&(I=Function.prototype);var E=Object.getOwnPropertyDescriptor(I,B);if(E===void 0){var k=Object.getPrototypeOf(I);return k===null?void 0:A(k,B,O)}else{if("value"in E)return E.value;var R=E.get;return R===void 0?void 0:R.call(O)}},a=function(){function A(I,B){for(var O=0;O<B.length;O++){var E=B[O];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(I,E.key,E)}}return function(I,B,O){return B&&A(I.prototype,B),O&&A(I,O),I}}(),s=i(3),u=d(s),f=i(8),c=d(f),v=i(43),l=d(v),h=i(15),p=i(41),g=d(p);function d(A){return A&&A.__esModule?A:{default:A}}function m(A,I){if(!(A instanceof I))throw new TypeError("Cannot call a class as a function")}function y(A,I){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:A}function _(A,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);A.prototype=Object.create(I&&I.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(A,I):A.__proto__=I)}var x=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],C=function(A){_(I,A);function I(B,O){m(this,I),O.modules.toolbar!=null&&O.modules.toolbar.container==null&&(O.modules.toolbar.container=x);var E=y(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,B,O));return E.quill.container.classList.add("ql-bubble"),E}return a(I,[{key:"extendToolbar",value:function(O){this.tooltip=new S(this.quill,this.options.bounds),this.tooltip.root.appendChild(O.container),this.buildButtons([].slice.call(O.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(O.container.querySelectorAll("select")),g.default)}}]),I}(l.default);C.DEFAULTS=(0,u.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(I){I?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var S=function(A){_(I,A);function I(B,O){m(this,I);var E=y(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,B,O));return E.quill.on(c.default.events.EDITOR_CHANGE,function(k,R,F,q){if(k===c.default.events.SELECTION_CHANGE)if(R!=null&&R.length>0&&q===c.default.sources.USER){E.show(),E.root.style.left="0px",E.root.style.width="",E.root.style.width=E.root.offsetWidth+"px";var Z=E.quill.getLines(R.index,R.length);if(Z.length===1)E.position(E.quill.getBounds(R));else{var ee=Z[Z.length-1],ne=E.quill.getIndex(ee),Q=Math.min(ee.length()-1,R.index+R.length-ne),N=E.quill.getBounds(new h.Range(ne,Q));E.position(N)}}else document.activeElement!==E.textbox&&E.quill.hasFocus()&&E.hide()}),E}return a(I,[{key:"listen",value:function(){var O=this;o(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){O.root.classList.remove("ql-editing")}),this.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!O.root.classList.contains("ql-hidden")){var E=O.quill.getSelection();E!=null&&O.position(O.quill.getBounds(E))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(O){var E=o(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"position",this).call(this,O),k=this.root.querySelector(".ql-tooltip-arrow");if(k.style.marginLeft="",E===0)return E;k.style.marginLeft=-1*E-k.offsetWidth/2+"px"}}]),I}(v.BaseTooltip);S.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=S,r.default=C},function(t,r,i){t.exports=i(63)}]).default})})(L0);var F8=L0.exports;const hs=ds(F8);var pn=-1,Yt=1,Tt=0;function gi(e,n,t,r){if(e===n)return e?[[Tt,e]]:[];if(t!=null){var i=$8(e,n,t);if(i)return i}var o=ps(e,n),a=e.substring(0,o);e=e.substring(o),n=n.substring(o),o=vs(e,n);var s=e.substring(e.length-o);e=e.substring(0,e.length-o),n=n.substring(0,n.length-o);var u=N8(e,n);return a&&u.unshift([Tt,a]),s&&u.push([Tt,s]),N0(u,r),u}function N8(e,n){var t;if(!e)return[[Yt,n]];if(!n)return[[pn,e]];var r=e.length>n.length?e:n,i=e.length>n.length?n:e,o=r.indexOf(i);if(o!==-1)return t=[[Yt,r.substring(0,o)],[Tt,i],[Yt,r.substring(o+i.length)]],e.length>n.length&&(t[0][0]=t[2][0]=pn),t;if(i.length===1)return[[pn,e],[Yt,n]];var a=M8(e,n);if(a){var s=a[0],u=a[1],f=a[2],c=a[3],v=a[4],l=gi(s,f),h=gi(u,c);return l.concat([[Tt,v]],h)}return P8(e,n)}function P8(e,n){for(var t=e.length,r=n.length,i=Math.ceil((t+r)/2),o=i,a=2*i,s=new Array(a),u=new Array(a),f=0;f<a;f++)s[f]=-1,u[f]=-1;s[o+1]=0,u[o+1]=0;for(var c=t-r,v=c%2!==0,l=0,h=0,p=0,g=0,d=0;d<i;d++){for(var m=-d+l;m<=d-h;m+=2){var y=o+m,_;m===-d||m!==d&&s[y-1]<s[y+1]?_=s[y+1]:_=s[y-1]+1;for(var x=_-m;_<t&&x<r&&e.charAt(_)===n.charAt(x);)_++,x++;if(s[y]=_,_>t)h+=2;else if(x>r)l+=2;else if(v){var C=o+c-m;if(C>=0&&C<a&&u[C]!==-1){var S=t-u[C];if(_>=S)return F0(e,n,_,x)}}}for(var A=-d+p;A<=d-g;A+=2){var C=o+A,S;A===-d||A!==d&&u[C-1]<u[C+1]?S=u[C+1]:S=u[C-1]+1;for(var I=S-A;S<t&&I<r&&e.charAt(t-S-1)===n.charAt(r-I-1);)S++,I++;if(u[C]=S,S>t)g+=2;else if(I>r)p+=2;else if(!v){var y=o+c-A;if(y>=0&&y<a&&s[y]!==-1){var _=s[y],x=o+_-y;if(S=t-S,_>=S)return F0(e,n,_,x)}}}}return[[pn,e],[Yt,n]]}function F0(e,n,t,r){var i=e.substring(0,t),o=n.substring(0,r),a=e.substring(t),s=n.substring(r),u=gi(i,o),f=gi(a,s);return u.concat(f)}function ps(e,n){if(!e||!n||e.charAt(0)!==n.charAt(0))return 0;for(var t=0,r=Math.min(e.length,n.length),i=r,o=0;t<i;)e.substring(o,i)==n.substring(o,i)?(t=i,o=t):r=i,i=Math.floor((r-t)/2+t);return P0(e.charCodeAt(i-1))&&i--,i}function vs(e,n){if(!e||!n||e.slice(-1)!==n.slice(-1))return 0;for(var t=0,r=Math.min(e.length,n.length),i=r,o=0;t<i;)e.substring(e.length-i,e.length-o)==n.substring(n.length-i,n.length-o)?(t=i,o=t):r=i,i=Math.floor((r-t)/2+t);return M0(e.charCodeAt(e.length-i))&&i--,i}function M8(e,n){var t=e.length>n.length?e:n,r=e.length>n.length?n:e;if(t.length<4||r.length*2<t.length)return null;function i(h,p,g){for(var d=h.substring(g,g+Math.floor(h.length/4)),m=-1,y="",_,x,C,S;(m=p.indexOf(d,m+1))!==-1;){var A=ps(h.substring(g),p.substring(m)),I=vs(h.substring(0,g),p.substring(0,m));y.length<I+A&&(y=p.substring(m-I,m)+p.substring(m,m+A),_=h.substring(0,g-I),x=h.substring(g+A),C=p.substring(0,m-I),S=p.substring(m+A))}return y.length*2>=h.length?[_,x,C,S,y]:null}var o=i(t,r,Math.ceil(t.length/4)),a=i(t,r,Math.ceil(t.length/2)),s;if(!o&&!a)return null;a?o?s=o[4].length>a[4].length?o:a:s=a:s=o;var u,f,c,v;e.length>n.length?(u=s[0],f=s[1],c=s[2],v=s[3]):(c=s[0],v=s[1],u=s[2],f=s[3]);var l=s[4];return[u,f,c,v,l]}function N0(e,n){e.push([Tt,""]);for(var t=0,r=0,i=0,o="",a="",s;t<e.length;){if(t<e.length-1&&!e[t][1]){e.splice(t,1);continue}switch(e[t][0]){case Yt:i++,a+=e[t][1],t++;break;case pn:r++,o+=e[t][1],t++;break;case Tt:var u=t-i-r-1;if(n){if(u>=0&&$0(e[u][1])){var f=e[u][1].slice(-1);if(e[u][1]=e[u][1].slice(0,-1),o=f+o,a=f+a,!e[u][1]){e.splice(u,1),t--;var c=u-1;e[c]&&e[c][0]===Yt&&(i++,a=e[c][1]+a,c--),e[c]&&e[c][0]===pn&&(r++,o=e[c][1]+o,c--),u=c}}if(q0(e[t][1])){var f=e[t][1].charAt(0);e[t][1]=e[t][1].slice(1),o+=f,a+=f}}if(t<e.length-1&&!e[t][1]){e.splice(t,1);break}if(o.length>0||a.length>0){o.length>0&&a.length>0&&(s=ps(a,o),s!==0&&(u>=0?e[u][1]+=a.substring(0,s):(e.splice(0,0,[Tt,a.substring(0,s)]),t++),a=a.substring(s),o=o.substring(s)),s=vs(a,o),s!==0&&(e[t][1]=a.substring(a.length-s)+e[t][1],a=a.substring(0,a.length-s),o=o.substring(0,o.length-s)));var v=i+r;o.length===0&&a.length===0?(e.splice(t-v,v),t=t-v):o.length===0?(e.splice(t-v,v,[Yt,a]),t=t-v+1):a.length===0?(e.splice(t-v,v,[pn,o]),t=t-v+1):(e.splice(t-v,v,[pn,o],[Yt,a]),t=t-v+2)}t!==0&&e[t-1][0]===Tt?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,i=0,r=0,o="",a="";break}}e[e.length-1][1]===""&&e.pop();var l=!1;for(t=1;t<e.length-1;)e[t-1][0]===Tt&&e[t+1][0]===Tt&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),l=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),l=!0)),t++;l&&N0(e,n)}function P0(e){return e>=55296&&e<=56319}function M0(e){return e>=56320&&e<=57343}function q0(e){return M0(e.charCodeAt(0))}function $0(e){return P0(e.charCodeAt(e.length-1))}function q8(e){for(var n=[],t=0;t<e.length;t++)e[t][1].length>0&&n.push(e[t]);return n}function gs(e,n,t,r){return $0(e)||q0(r)?null:q8([[Tt,e],[pn,n],[Yt,t],[Tt,r]])}function $8(e,n,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,i=typeof t=="number"?null:t.newRange,o=e.length,a=n.length;if(r.length===0&&(i===null||i.length===0)){var s=r.index,u=e.slice(0,s),f=e.slice(s),c=i?i.index:null;e:{var v=s+a-o;if(c!==null&&c!==v||v<0||v>a)break e;var l=n.slice(0,v),h=n.slice(v);if(h!==f)break e;var p=Math.min(s,v),g=u.slice(0,p),d=l.slice(0,p);if(g!==d)break e;var m=u.slice(p),y=l.slice(p);return gs(g,m,y,f)}e:{if(c!==null&&c!==s)break e;var _=s,l=n.slice(0,_),h=n.slice(_);if(l!==u)break e;var x=Math.min(o-_,a-_),C=f.slice(f.length-x),S=h.slice(h.length-x);if(C!==S)break e;var m=f.slice(0,f.length-x),y=h.slice(0,h.length-x);return gs(u,m,y,C)}}if(r.length>0&&i&&i.length===0)e:{var g=e.slice(0,r.index),C=e.slice(r.index+r.length),p=g.length,x=C.length;if(a<p+x)break e;var d=n.slice(0,p),S=n.slice(a-x);if(g!==d||C!==S)break e;var m=e.slice(p,o-x),y=n.slice(p,a-x);return gs(g,m,y,C)}return null}function Ro(e,n,t){return gi(e,n,t,!0)}Ro.INSERT=Yt,Ro.DELETE=pn,Ro.EQUAL=Tt;var j8=Ro,Lo={exports:{}};Lo.exports,function(e,n){var t=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",s="[object Boolean]",u="[object Date]",f="[object Error]",c="[object Function]",v="[object GeneratorFunction]",l="[object Map]",h="[object Number]",p="[object Object]",g="[object Promise]",d="[object RegExp]",m="[object Set]",y="[object String]",_="[object Symbol]",x="[object WeakMap]",C="[object ArrayBuffer]",S="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",B="[object Int8Array]",O="[object Int16Array]",E="[object Int32Array]",k="[object Uint8Array]",R="[object Uint8ClampedArray]",F="[object Uint16Array]",q="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,ee=/\w*$/,ne=/^\[object .+?Constructor\]$/,Q=/^(?:0|[1-9]\d*)$/,N={};N[o]=N[a]=N[C]=N[S]=N[s]=N[u]=N[A]=N[I]=N[B]=N[O]=N[E]=N[l]=N[h]=N[p]=N[d]=N[m]=N[y]=N[_]=N[k]=N[R]=N[F]=N[q]=!0,N[f]=N[c]=N[x]=!1;var w=typeof Se=="object"&&Se&&Se.Object===Object&&Se,D=typeof self=="object"&&self&&self.Object===Object&&self,L=w||D||Function("return this")(),$=n&&!n.nodeType&&n,G=$&&!0&&e&&!e.nodeType&&e,j=G&&G.exports===$;function W(T,z){return T.set(z[0],z[1]),T}function M(T,z){return T.add(z),T}function H(T,z){for(var re=-1,pe=T?T.length:0;++re<pe&&z(T[re],re,T)!==!1;);return T}function V(T,z){for(var re=-1,pe=z.length,Be=T.length;++re<pe;)T[Be+re]=z[re];return T}function K(T,z,re,pe){var Be=-1,Oe=T?T.length:0;for(pe&&Oe&&(re=T[++Be]);++Be<Oe;)re=z(re,T[Be],Be,T);return re}function J(T,z){for(var re=-1,pe=Array(T);++re<T;)pe[re]=z(re);return pe}function P(T,z){return T==null?void 0:T[z]}function X(T){var z=!1;if(T!=null&&typeof T.toString!="function")try{z=!!(T+"")}catch{}return z}function se(T){var z=-1,re=Array(T.size);return T.forEach(function(pe,Be){re[++z]=[Be,pe]}),re}function fe(T,z){return function(re){return T(z(re))}}function ce(T){var z=-1,re=Array(T.size);return T.forEach(function(pe){re[++z]=pe}),re}var ie=Array.prototype,oe=Function.prototype,le=Object.prototype,ue=L["__core-js_shared__"],ae=function(){var T=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""}(),ve=oe.toString,ye=le.hasOwnProperty,_e=le.toString,Ce=RegExp("^"+ve.call(ye).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=j?L.Buffer:void 0,Ee=L.Symbol,$e=L.Uint8Array,Te=fe(Object.getPrototypeOf,Object),Ke=Object.create,dt=le.propertyIsEnumerable,Xn=ie.splice,Bt=Object.getOwnPropertySymbols,Vt=Ae?Ae.isBuffer:void 0,it=fe(Object.keys,Object),st=rn(L,"DataView"),Mt=rn(L,"Map"),qt=rn(L,"Promise"),kn=rn(L,"Set"),gr=rn(L,"WeakMap"),gn=rn(Object,"create"),mr=Et(st),On=Et(Mt),yr=Et(qt),Wn=Et(kn),xr=Et(gr),mn=Ee?Ee.prototype:void 0,_r=mn?mn.valueOf:void 0;function nn(T){var z=-1,re=T?T.length:0;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function Mr(){this.__data__=gn?gn(null):{}}function ht(T){return this.has(T)&&delete this.__data__[T]}function Ut(T){var z=this.__data__;if(gn){var re=z[T];return re===r?void 0:re}return ye.call(z,T)?z[T]:void 0}function br(T){var z=this.__data__;return gn?z[T]!==void 0:ye.call(z,T)}function Cr(T,z){var re=this.__data__;return re[T]=gn&&z===void 0?r:z,this}nn.prototype.clear=Mr,nn.prototype.delete=ht,nn.prototype.get=Ut,nn.prototype.has=br,nn.prototype.set=Cr;function pt(T){var z=-1,re=T?T.length:0;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function dl(){this.__data__=[]}function hl(T){var z=this.__data__,re=$r(z,T);if(re<0)return!1;var pe=z.length-1;return re==pe?z.pop():Xn.call(z,re,1),!0}function pl(T){var z=this.__data__,re=$r(z,T);return re<0?void 0:z[re][1]}function vl(T){return $r(this.__data__,T)>-1}function gl(T,z){var re=this.__data__,pe=$r(re,T);return pe<0?re.push([T,z]):re[pe][1]=z,this}pt.prototype.clear=dl,pt.prototype.delete=hl,pt.prototype.get=pl,pt.prototype.has=vl,pt.prototype.set=gl;function xt(T){var z=-1,re=T?T.length:0;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function ml(){this.__data__={hash:new nn,map:new(Mt||pt),string:new nn}}function yl(T){return Er(this,T).delete(T)}function xl(T){return Er(this,T).get(T)}function _l(T){return Er(this,T).has(T)}function bl(T,z){return Er(this,T).set(T,z),this}xt.prototype.clear=ml,xt.prototype.delete=yl,xt.prototype.get=xl,xt.prototype.has=_l,xt.prototype.set=bl;function Dt(T){this.__data__=new pt(T)}function Cl(){this.__data__=new pt}function wl(T){return this.__data__.delete(T)}function El(T){return this.__data__.get(T)}function Al(T){return this.__data__.has(T)}function kl(T,z){var re=this.__data__;if(re instanceof pt){var pe=re.__data__;if(!Mt||pe.length<t-1)return pe.push([T,z]),this;re=this.__data__=new xt(pe)}return re.set(T,z),this}Dt.prototype.clear=Cl,Dt.prototype.delete=wl,Dt.prototype.get=El,Dt.prototype.has=Al,Dt.prototype.set=kl;function qr(T,z){var re=Oi(T)||Hr(T)?J(T.length,String):[],pe=re.length,Be=!!pe;for(var Oe in T)(z||ye.call(T,Oe))&&!(Be&&(Oe=="length"||$l(Oe,pe)))&&re.push(Oe);return re}function Ko(T,z,re){var pe=T[z];(!(ye.call(T,z)&&Zo(pe,re))||re===void 0&&!(z in T))&&(T[z]=re)}function $r(T,z){for(var re=T.length;re--;)if(Zo(T[re][0],z))return re;return-1}function yn(T,z){return T&&ki(z,Ii(z),T)}function Ei(T,z,re,pe,Be,Oe,je){var Ue;if(pe&&(Ue=Oe?pe(T,Be,Oe,je):pe(T)),Ue!==void 0)return Ue;if(!_n(T))return T;var ot=Oi(T);if(ot){if(Ue=Ml(T),!z)return Fl(T,Ue)}else{var Xe=In(T),_t=Xe==c||Xe==v;if(Jo(T))return jr(T,z);if(Xe==p||Xe==o||_t&&!Oe){if(X(T))return Oe?T:{};if(Ue=xn(_t?{}:T),!z)return Nl(T,yn(Ue,T))}else{if(!N[Xe])return Oe?T:{};Ue=ql(T,Xe,Ei,z)}}je||(je=new Dt);var Rt=je.get(T);if(Rt)return Rt;if(je.set(T,Ue),!ot)var lt=re?Pl(T):Ii(T);return H(lt||T,function(bt,vt){lt&&(vt=bt,bt=T[vt]),Ko(Ue,vt,Ei(bt,z,re,pe,vt,T,je))}),Ue}function Ol(T){return _n(T)?Ke(T):{}}function Sl(T,z,re){var pe=z(T);return Oi(T)?pe:V(pe,re(T))}function Il(T){return _e.call(T)}function Tl(T){if(!_n(T)||Hl(T))return!1;var z=Si(T)||X(T)?Ce:ne;return z.test(Et(T))}function Bl(T){if(!Go(T))return it(T);var z=[];for(var re in Object(T))ye.call(T,re)&&re!="constructor"&&z.push(re);return z}function jr(T,z){if(z)return T.slice();var re=new T.constructor(T.length);return T.copy(re),re}function Ai(T){var z=new T.constructor(T.byteLength);return new $e(z).set(new $e(T)),z}function wr(T,z){var re=z?Ai(T.buffer):T.buffer;return new T.constructor(re,T.byteOffset,T.byteLength)}function Xo(T,z,re){var pe=z?re(se(T),!0):se(T);return K(pe,W,new T.constructor)}function Wo(T){var z=new T.constructor(T.source,ee.exec(T));return z.lastIndex=T.lastIndex,z}function Dl(T,z,re){var pe=z?re(ce(T),!0):ce(T);return K(pe,M,new T.constructor)}function Rl(T){return _r?Object(_r.call(T)):{}}function Ll(T,z){var re=z?Ai(T.buffer):T.buffer;return new T.constructor(re,T.byteOffset,T.length)}function Fl(T,z){var re=-1,pe=T.length;for(z||(z=Array(pe));++re<pe;)z[re]=T[re];return z}function ki(T,z,re,pe){re||(re={});for(var Be=-1,Oe=z.length;++Be<Oe;){var je=z[Be],Ue=pe?pe(re[je],T[je],je,re,T):void 0;Ko(re,je,Ue===void 0?T[je]:Ue)}return re}function Nl(T,z){return ki(T,Sn(T),z)}function Pl(T){return Sl(T,Ii,Sn)}function Er(T,z){var re=T.__data__;return jl(z)?re[typeof z=="string"?"string":"hash"]:re.map}function rn(T,z){var re=P(T,z);return Tl(re)?re:void 0}var Sn=Bt?fe(Bt,Object):Ul,In=Il;(st&&In(new st(new ArrayBuffer(1)))!=S||Mt&&In(new Mt)!=l||qt&&In(qt.resolve())!=g||kn&&In(new kn)!=m||gr&&In(new gr)!=x)&&(In=function(T){var z=_e.call(T),re=z==p?T.constructor:void 0,pe=re?Et(re):void 0;if(pe)switch(pe){case mr:return S;case On:return l;case yr:return g;case Wn:return m;case xr:return x}return z});function Ml(T){var z=T.length,re=T.constructor(z);return z&&typeof T[0]=="string"&&ye.call(T,"index")&&(re.index=T.index,re.input=T.input),re}function xn(T){return typeof T.constructor=="function"&&!Go(T)?Ol(Te(T)):{}}function ql(T,z,re,pe){var Be=T.constructor;switch(z){case C:return Ai(T);case s:case u:return new Be(+T);case S:return wr(T,pe);case A:case I:case B:case O:case E:case k:case R:case F:case q:return Ll(T,pe);case l:return Xo(T,pe,re);case h:case y:return new Be(T);case d:return Wo(T);case m:return Dl(T,pe,re);case _:return Rl(T)}}function $l(T,z){return z=z??i,!!z&&(typeof T=="number"||Q.test(T))&&T>-1&&T%1==0&&T<z}function jl(T){var z=typeof T;return z=="string"||z=="number"||z=="symbol"||z=="boolean"?T!=="__proto__":T===null}function Hl(T){return!!ae&&ae in T}function Go(T){var z=T&&T.constructor,re=typeof z=="function"&&z.prototype||le;return T===re}function Et(T){if(T!=null){try{return ve.call(T)}catch{}try{return T+""}catch{}}return""}function Qo(T){return Ei(T,!0,!0)}function Zo(T,z){return T===z||T!==T&&z!==z}function Hr(T){return Vl(T)&&ye.call(T,"callee")&&(!dt.call(T,"callee")||_e.call(T)==o)}var Oi=Array.isArray;function Vr(T){return T!=null&&Yo(T.length)&&!Si(T)}function Vl(T){return ea(T)&&Vr(T)}var Jo=Vt||zl;function Si(T){var z=_n(T)?_e.call(T):"";return z==c||z==v}function Yo(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=i}function _n(T){var z=typeof T;return!!T&&(z=="object"||z=="function")}function ea(T){return!!T&&typeof T=="object"}function Ii(T){return Vr(T)?qr(T):Bl(T)}function Ul(){return[]}function zl(){return!1}e.exports=Qo}(Lo,Lo.exports);var j0=Lo.exports,Fo={exports:{}};Fo.exports,function(e,n){var t=200,r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",u="[object Array]",f="[object AsyncFunction]",c="[object Boolean]",v="[object Date]",l="[object Error]",h="[object Function]",p="[object GeneratorFunction]",g="[object Map]",d="[object Number]",m="[object Null]",y="[object Object]",_="[object Promise]",x="[object Proxy]",C="[object RegExp]",S="[object Set]",A="[object String]",I="[object Symbol]",B="[object Undefined]",O="[object WeakMap]",E="[object ArrayBuffer]",k="[object DataView]",R="[object Float32Array]",F="[object Float64Array]",q="[object Int8Array]",Z="[object Int16Array]",ee="[object Int32Array]",ne="[object Uint8Array]",Q="[object Uint8ClampedArray]",N="[object Uint16Array]",w="[object Uint32Array]",D=/[\\^$.*+?()[\]{}|]/g,L=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,G={};G[R]=G[F]=G[q]=G[Z]=G[ee]=G[ne]=G[Q]=G[N]=G[w]=!0,G[s]=G[u]=G[E]=G[c]=G[k]=G[v]=G[l]=G[h]=G[g]=G[d]=G[y]=G[C]=G[S]=G[A]=G[O]=!1;var j=typeof Se=="object"&&Se&&Se.Object===Object&&Se,W=typeof self=="object"&&self&&self.Object===Object&&self,M=j||W||Function("return this")(),H=n&&!n.nodeType&&n,V=H&&!0&&e&&!e.nodeType&&e,K=V&&V.exports===H,J=K&&j.process,P=function(){try{return J&&J.binding&&J.binding("util")}catch{}}(),X=P&&P.isTypedArray;function se(T,z){for(var re=-1,pe=T==null?0:T.length,Be=0,Oe=[];++re<pe;){var je=T[re];z(je,re,T)&&(Oe[Be++]=je)}return Oe}function fe(T,z){for(var re=-1,pe=z.length,Be=T.length;++re<pe;)T[Be+re]=z[re];return T}function ce(T,z){for(var re=-1,pe=T==null?0:T.length;++re<pe;)if(z(T[re],re,T))return!0;return!1}function ie(T,z){for(var re=-1,pe=Array(T);++re<T;)pe[re]=z(re);return pe}function oe(T){return function(z){return T(z)}}function le(T,z){return T.has(z)}function ue(T,z){return T==null?void 0:T[z]}function ae(T){var z=-1,re=Array(T.size);return T.forEach(function(pe,Be){re[++z]=[Be,pe]}),re}function ve(T,z){return function(re){return T(z(re))}}function ye(T){var z=-1,re=Array(T.size);return T.forEach(function(pe){re[++z]=pe}),re}var _e=Array.prototype,Ce=Function.prototype,Ae=Object.prototype,Ee=M["__core-js_shared__"],$e=Ce.toString,Te=Ae.hasOwnProperty,Ke=function(){var T=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""}(),dt=Ae.toString,Xn=RegExp("^"+$e.call(Te).replace(D,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bt=K?M.Buffer:void 0,Vt=M.Symbol,it=M.Uint8Array,st=Ae.propertyIsEnumerable,Mt=_e.splice,qt=Vt?Vt.toStringTag:void 0,kn=Object.getOwnPropertySymbols,gr=Bt?Bt.isBuffer:void 0,gn=ve(Object.keys,Object),mr=Sn(M,"DataView"),On=Sn(M,"Map"),yr=Sn(M,"Promise"),Wn=Sn(M,"Set"),xr=Sn(M,"WeakMap"),mn=Sn(Object,"create"),_r=Et(mr),nn=Et(On),Mr=Et(yr),ht=Et(Wn),Ut=Et(xr),br=Vt?Vt.prototype:void 0,Cr=br?br.valueOf:void 0;function pt(T){var z=-1,re=T==null?0:T.length;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function dl(){this.__data__=mn?mn(null):{},this.size=0}function hl(T){var z=this.has(T)&&delete this.__data__[T];return this.size-=z?1:0,z}function pl(T){var z=this.__data__;if(mn){var re=z[T];return re===r?void 0:re}return Te.call(z,T)?z[T]:void 0}function vl(T){var z=this.__data__;return mn?z[T]!==void 0:Te.call(z,T)}function gl(T,z){var re=this.__data__;return this.size+=this.has(T)?0:1,re[T]=mn&&z===void 0?r:z,this}pt.prototype.clear=dl,pt.prototype.delete=hl,pt.prototype.get=pl,pt.prototype.has=vl,pt.prototype.set=gl;function xt(T){var z=-1,re=T==null?0:T.length;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function ml(){this.__data__=[],this.size=0}function yl(T){var z=this.__data__,re=jr(z,T);if(re<0)return!1;var pe=z.length-1;return re==pe?z.pop():Mt.call(z,re,1),--this.size,!0}function xl(T){var z=this.__data__,re=jr(z,T);return re<0?void 0:z[re][1]}function _l(T){return jr(this.__data__,T)>-1}function bl(T,z){var re=this.__data__,pe=jr(re,T);return pe<0?(++this.size,re.push([T,z])):re[pe][1]=z,this}xt.prototype.clear=ml,xt.prototype.delete=yl,xt.prototype.get=xl,xt.prototype.has=_l,xt.prototype.set=bl;function Dt(T){var z=-1,re=T==null?0:T.length;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function Cl(){this.size=0,this.__data__={hash:new pt,map:new(On||xt),string:new pt}}function wl(T){var z=rn(this,T).delete(T);return this.size-=z?1:0,z}function El(T){return rn(this,T).get(T)}function Al(T){return rn(this,T).has(T)}function kl(T,z){var re=rn(this,T),pe=re.size;return re.set(T,z),this.size+=re.size==pe?0:1,this}Dt.prototype.clear=Cl,Dt.prototype.delete=wl,Dt.prototype.get=El,Dt.prototype.has=Al,Dt.prototype.set=kl;function qr(T){var z=-1,re=T==null?0:T.length;for(this.__data__=new Dt;++z<re;)this.add(T[z])}function Ko(T){return this.__data__.set(T,r),this}function $r(T){return this.__data__.has(T)}qr.prototype.add=qr.prototype.push=Ko,qr.prototype.has=$r;function yn(T){var z=this.__data__=new xt(T);this.size=z.size}function Ei(){this.__data__=new xt,this.size=0}function Ol(T){var z=this.__data__,re=z.delete(T);return this.size=z.size,re}function Sl(T){return this.__data__.get(T)}function Il(T){return this.__data__.has(T)}function Tl(T,z){var re=this.__data__;if(re instanceof xt){var pe=re.__data__;if(!On||pe.length<t-1)return pe.push([T,z]),this.size=++re.size,this;re=this.__data__=new Dt(pe)}return re.set(T,z),this.size=re.size,this}yn.prototype.clear=Ei,yn.prototype.delete=Ol,yn.prototype.get=Sl,yn.prototype.has=Il,yn.prototype.set=Tl;function Bl(T,z){var re=Hr(T),pe=!re&&Zo(T),Be=!re&&!pe&&Vr(T),Oe=!re&&!pe&&!Be&&ea(T),je=re||pe||Be||Oe,Ue=je?ie(T.length,String):[],ot=Ue.length;for(var Xe in T)(z||Te.call(T,Xe))&&!(je&&(Xe=="length"||Be&&(Xe=="offset"||Xe=="parent")||Oe&&(Xe=="buffer"||Xe=="byteLength"||Xe=="byteOffset")||ql(Xe,ot)))&&Ue.push(Xe);return Ue}function jr(T,z){for(var re=T.length;re--;)if(Qo(T[re][0],z))return re;return-1}function Ai(T,z,re){var pe=z(T);return Hr(T)?pe:fe(pe,re(T))}function wr(T){return T==null?T===void 0?B:m:qt&&qt in Object(T)?In(T):Go(T)}function Xo(T){return _n(T)&&wr(T)==s}function Wo(T,z,re,pe,Be){return T===z?!0:T==null||z==null||!_n(T)&&!_n(z)?T!==T&&z!==z:Dl(T,z,re,pe,Wo,Be)}function Dl(T,z,re,pe,Be,Oe){var je=Hr(T),Ue=Hr(z),ot=je?u:xn(T),Xe=Ue?u:xn(z);ot=ot==s?y:ot,Xe=Xe==s?y:Xe;var _t=ot==y,Rt=Xe==y,lt=ot==Xe;if(lt&&Vr(T)){if(!Vr(z))return!1;je=!0,_t=!1}if(lt&&!_t)return Oe||(Oe=new yn),je||ea(T)?ki(T,z,re,pe,Be,Oe):Nl(T,z,ot,re,pe,Be,Oe);if(!(re&i)){var bt=_t&&Te.call(T,"__wrapped__"),vt=Rt&&Te.call(z,"__wrapped__");if(bt||vt){var Gn=bt?T.value():T,Tn=vt?z.value():z;return Oe||(Oe=new yn),Be(Gn,Tn,re,pe,Oe)}}return lt?(Oe||(Oe=new yn),Pl(T,z,re,pe,Be,Oe)):!1}function Rl(T){if(!Yo(T)||jl(T))return!1;var z=Jo(T)?Xn:L;return z.test(Et(T))}function Ll(T){return _n(T)&&Si(T.length)&&!!G[wr(T)]}function Fl(T){if(!Hl(T))return gn(T);var z=[];for(var re in Object(T))Te.call(T,re)&&re!="constructor"&&z.push(re);return z}function ki(T,z,re,pe,Be,Oe){var je=re&i,Ue=T.length,ot=z.length;if(Ue!=ot&&!(je&&ot>Ue))return!1;var Xe=Oe.get(T);if(Xe&&Oe.get(z))return Xe==z;var _t=-1,Rt=!0,lt=re&o?new qr:void 0;for(Oe.set(T,z),Oe.set(z,T);++_t<Ue;){var bt=T[_t],vt=z[_t];if(pe)var Gn=je?pe(vt,bt,_t,z,T,Oe):pe(bt,vt,_t,T,z,Oe);if(Gn!==void 0){if(Gn)continue;Rt=!1;break}if(lt){if(!ce(z,function(Tn,Ar){if(!le(lt,Ar)&&(bt===Tn||Be(bt,Tn,re,pe,Oe)))return lt.push(Ar)})){Rt=!1;break}}else if(!(bt===vt||Be(bt,vt,re,pe,Oe))){Rt=!1;break}}return Oe.delete(T),Oe.delete(z),Rt}function Nl(T,z,re,pe,Be,Oe,je){switch(re){case k:if(T.byteLength!=z.byteLength||T.byteOffset!=z.byteOffset)return!1;T=T.buffer,z=z.buffer;case E:return!(T.byteLength!=z.byteLength||!Oe(new it(T),new it(z)));case c:case v:case d:return Qo(+T,+z);case l:return T.name==z.name&&T.message==z.message;case C:case A:return T==z+"";case g:var Ue=ae;case S:var ot=pe&i;if(Ue||(Ue=ye),T.size!=z.size&&!ot)return!1;var Xe=je.get(T);if(Xe)return Xe==z;pe|=o,je.set(T,z);var _t=ki(Ue(T),Ue(z),pe,Be,Oe,je);return je.delete(T),_t;case I:if(Cr)return Cr.call(T)==Cr.call(z)}return!1}function Pl(T,z,re,pe,Be,Oe){var je=re&i,Ue=Er(T),ot=Ue.length,Xe=Er(z),_t=Xe.length;if(ot!=_t&&!je)return!1;for(var Rt=ot;Rt--;){var lt=Ue[Rt];if(!(je?lt in z:Te.call(z,lt)))return!1}var bt=Oe.get(T);if(bt&&Oe.get(z))return bt==z;var vt=!0;Oe.set(T,z),Oe.set(z,T);for(var Gn=je;++Rt<ot;){lt=Ue[Rt];var Tn=T[lt],Ar=z[lt];if(pe)var td=je?pe(Ar,Tn,lt,z,T,Oe):pe(Tn,Ar,lt,T,z,Oe);if(!(td===void 0?Tn===Ar||Be(Tn,Ar,re,pe,Oe):td)){vt=!1;break}Gn||(Gn=lt=="constructor")}if(vt&&!Gn){var ta=T.constructor,na=z.constructor;ta!=na&&"constructor"in T&&"constructor"in z&&!(typeof ta=="function"&&ta instanceof ta&&typeof na=="function"&&na instanceof na)&&(vt=!1)}return Oe.delete(T),Oe.delete(z),vt}function Er(T){return Ai(T,Ii,Ml)}function rn(T,z){var re=T.__data__;return $l(z)?re[typeof z=="string"?"string":"hash"]:re.map}function Sn(T,z){var re=ue(T,z);return Rl(re)?re:void 0}function In(T){var z=Te.call(T,qt),re=T[qt];try{T[qt]=void 0;var pe=!0}catch{}var Be=dt.call(T);return pe&&(z?T[qt]=re:delete T[qt]),Be}var Ml=kn?function(T){return T==null?[]:(T=Object(T),se(kn(T),function(z){return st.call(T,z)}))}:Ul,xn=wr;(mr&&xn(new mr(new ArrayBuffer(1)))!=k||On&&xn(new On)!=g||yr&&xn(yr.resolve())!=_||Wn&&xn(new Wn)!=S||xr&&xn(new xr)!=O)&&(xn=function(T){var z=wr(T),re=z==y?T.constructor:void 0,pe=re?Et(re):"";if(pe)switch(pe){case _r:return k;case nn:return g;case Mr:return _;case ht:return S;case Ut:return O}return z});function ql(T,z){return z=z??a,!!z&&(typeof T=="number"||$.test(T))&&T>-1&&T%1==0&&T<z}function $l(T){var z=typeof T;return z=="string"||z=="number"||z=="symbol"||z=="boolean"?T!=="__proto__":T===null}function jl(T){return!!Ke&&Ke in T}function Hl(T){var z=T&&T.constructor,re=typeof z=="function"&&z.prototype||Ae;return T===re}function Go(T){return dt.call(T)}function Et(T){if(T!=null){try{return $e.call(T)}catch{}try{return T+""}catch{}}return""}function Qo(T,z){return T===z||T!==T&&z!==z}var Zo=Xo(function(){return arguments}())?Xo:function(T){return _n(T)&&Te.call(T,"callee")&&!st.call(T,"callee")},Hr=Array.isArray;function Oi(T){return T!=null&&Si(T.length)&&!Jo(T)}var Vr=gr||zl;function Vl(T,z){return Wo(T,z)}function Jo(T){if(!Yo(T))return!1;var z=wr(T);return z==h||z==p||z==f||z==x}function Si(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=a}function Yo(T){var z=typeof T;return T!=null&&(z=="object"||z=="function")}function _n(T){return T!=null&&typeof T=="object"}var ea=X?oe(X):Ll;function Ii(T){return Oi(T)?Bl(T):Fl(T)}function Ul(){return[]}function zl(){return!1}e.exports=Vl}(Fo,Fo.exports);var H0=Fo.exports,ms={},V0=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ms,"__esModule",{value:!0});var H8=V0(j0),V8=V0(H0),ys;(function(e){function n(o,a,s){o===void 0&&(o={}),a===void 0&&(a={}),typeof o!="object"&&(o={}),typeof a!="object"&&(a={});var u=H8.default(a);s||(u=Object.keys(u).reduce(function(c,v){return u[v]!=null&&(c[v]=u[v]),c},{}));for(var f in o)o[f]!==void 0&&a[f]===void 0&&(u[f]=o[f]);return Object.keys(u).length>0?u:void 0}e.compose=n;function t(o,a){o===void 0&&(o={}),a===void 0&&(a={}),typeof o!="object"&&(o={}),typeof a!="object"&&(a={});var s=Object.keys(o).concat(Object.keys(a)).reduce(function(u,f){return V8.default(o[f],a[f])||(u[f]=a[f]===void 0?null:a[f]),u},{});return Object.keys(s).length>0?s:void 0}e.diff=t;function r(o,a){o===void 0&&(o={}),a===void 0&&(a={}),o=o||{};var s=Object.keys(a).reduce(function(u,f){return a[f]!==o[f]&&o[f]!==void 0&&(u[f]=a[f]),u},{});return Object.keys(o).reduce(function(u,f){return o[f]!==a[f]&&a[f]===void 0&&(u[f]=null),u},s)}e.invert=r;function i(o,a,s){if(s===void 0&&(s=!1),typeof o!="object")return a;if(typeof a=="object"){if(!s)return a;var u=Object.keys(a).reduce(function(f,c){return o[c]===void 0&&(f[c]=a[c]),f},{});return Object.keys(u).length>0?u:void 0}}e.transform=i})(ys||(ys={})),ms.default=ys;var No={},Po={},U0;function U8(){if(U0)return Po;U0=1;var e=Se&&Se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Po,"__esModule",{value:!0});var n=e(K0()),t=function(){function r(i){this.ops=i,this.index=0,this.offset=0}return r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(i){i||(i=1/0);var o=this.ops[this.index];if(o){var a=this.offset,s=n.default.length(o);if(i>=s-a?(i=s-a,this.index+=1,this.offset=0):this.offset+=i,typeof o.delete=="number")return{delete:i};var u={};return o.attributes&&(u.attributes=o.attributes),typeof o.retain=="number"?u.retain=i:typeof o.insert=="string"?u.insert=o.insert.substr(a,i):u.insert=o.insert,u}else return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},r.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var i=this.offset,o=this.index,a=this.next(),s=this.ops.slice(this.index);return this.offset=i,this.index=o,[a].concat(s)}else return[]},r}();return Po.default=t,Po}var z0;function K0(){if(z0)return No;z0=1;var e=Se&&Se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(No,"__esModule",{value:!0});var n=e(U8()),t;return function(r){function i(a){return new n.default(a)}r.iterator=i;function o(a){return typeof a.delete=="number"?a.delete:typeof a.retain=="number"?a.retain:typeof a.insert=="string"?a.insert.length:1}r.length=o}(t||(t={})),No.default=t,No}var mi=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Mo=mi(j8),z8=mi(j0),xs=mi(H0),yi=mi(ms),ft=mi(K0()),K8="\0",X8=function(){function e(n){Array.isArray(n)?this.ops=n:n!=null&&Array.isArray(n.ops)?this.ops=n.ops:this.ops=[]}return e.prototype.insert=function(n,t){var r={};return typeof n=="string"&&n.length===0?this:(r.insert=n,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))},e.prototype.delete=function(n){return n<=0?this:this.push({delete:n})},e.prototype.retain=function(n,t){if(n<=0)return this;var r={retain:n};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)},e.prototype.push=function(n){var t=this.ops.length,r=this.ops[t-1];if(n=z8.default(n),typeof r=="object"){if(typeof n.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+n.delete},this;if(typeof r.delete=="number"&&n.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(n),this;if(xs.default(n.attributes,r.attributes)){if(typeof n.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+n.insert},typeof n.attributes=="object"&&(this.ops[t-1].attributes=n.attributes),this;if(typeof n.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+n.retain},typeof n.attributes=="object"&&(this.ops[t-1].attributes=n.attributes),this}}return t===this.ops.length?this.ops.push(n):this.ops.splice(t,0,n),this},e.prototype.chop=function(){var n=this.ops[this.ops.length-1];return n&&n.retain&&!n.attributes&&this.ops.pop(),this},e.prototype.filter=function(n){return this.ops.filter(n)},e.prototype.forEach=function(n){this.ops.forEach(n)},e.prototype.map=function(n){return this.ops.map(n)},e.prototype.partition=function(n){var t=[],r=[];return this.forEach(function(i){var o=n(i)?t:r;o.push(i)}),[t,r]},e.prototype.reduce=function(n,t){return this.ops.reduce(n,t)},e.prototype.changeLength=function(){return this.reduce(function(n,t){return t.insert?n+ft.default.length(t):t.delete?n-t.delete:n},0)},e.prototype.length=function(){return this.reduce(function(n,t){return n+ft.default.length(t)},0)},e.prototype.slice=function(n,t){n===void 0&&(n=0),t===void 0&&(t=1/0);for(var r=[],i=ft.default.iterator(this.ops),o=0;o<t&&i.hasNext();){var a=void 0;o<n?a=i.next(n-o):(a=i.next(t-o),r.push(a)),o+=ft.default.length(a)}return new e(r)},e.prototype.compose=function(n){var t=ft.default.iterator(this.ops),r=ft.default.iterator(n.ops),i=[],o=r.peek();if(o!=null&&typeof o.retain=="number"&&o.attributes==null){for(var a=o.retain;t.peekType()==="insert"&&t.peekLength()<=a;)a-=t.peekLength(),i.push(t.next());o.retain-a>0&&r.next(o.retain-a)}for(var s=new e(i);t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{var u=Math.min(t.peekLength(),r.peekLength()),f=t.next(u),c=r.next(u);if(typeof c.retain=="number"){var v={};typeof f.retain=="number"?v.retain=u:v.insert=f.insert;var l=yi.default.compose(f.attributes,c.attributes,typeof f.retain=="number");if(l&&(v.attributes=l),s.push(v),!r.hasNext()&&xs.default(s.ops[s.ops.length-1],v)){var h=new e(t.rest());return s.concat(h).chop()}}else typeof c.delete=="number"&&typeof f.retain=="number"&&s.push(c)}return s.chop()},e.prototype.concat=function(n){var t=new e(this.ops.slice());return n.ops.length>0&&(t.push(n.ops[0]),t.ops=t.ops.concat(n.ops.slice(1))),t},e.prototype.diff=function(n,t){if(this.ops===n.ops)return new e;var r=[this,n].map(function(u){return u.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:K8;var c=u===n?"on":"with";throw new Error("diff() called "+c+" non-document")}).join("")}),i=new e,o=Mo.default(r[0],r[1],t),a=ft.default.iterator(this.ops),s=ft.default.iterator(n.ops);return o.forEach(function(u){for(var f=u[1].length;f>0;){var c=0;switch(u[0]){case Mo.default.INSERT:c=Math.min(s.peekLength(),f),i.push(s.next(c));break;case Mo.default.DELETE:c=Math.min(f,a.peekLength()),a.next(c),i.delete(c);break;case Mo.default.EQUAL:c=Math.min(a.peekLength(),s.peekLength(),f);var v=a.next(c),l=s.next(c);xs.default(v.insert,l.insert)?i.retain(c,yi.default.diff(v.attributes,l.attributes)):i.push(l).delete(c);break}f-=c}}),i.chop()},e.prototype.eachLine=function(n,t){t===void 0&&(t=`
73
+ `)}return oe}function fe(ie,oe){var le={},ce=ie.style||{};return ce.fontStyle&&$(ie).fontStyle==="italic"&&(le.italic=!0),ce.fontWeight&&($(ie).fontWeight.startsWith("bold")||parseInt($(ie).fontWeight)>=700)&&(le.bold=!0),Object.keys(le).length>0&&(oe=L(oe,le)),parseFloat(ce.textIndent||0)>0&&(oe=new v.default().insert(" ").concat(oe)),oe}function ue(ie,oe){var le=ie.data;if(ie.parentNode.tagName==="O:P")return oe.insert(le.trim());if(le.trim().length===0&&ie.parentNode.classList.contains("ql-clipboard"))return oe;if(!$(ie.parentNode).whiteSpace.startsWith("pre")){var ce=function(ve,ye){return ye=ye.replace(/[^\u00a0]/g,""),ye.length<1&&ve?" ":ye};le=le.replace(/\r\n/g," ").replace(/\n/g," "),le=le.replace(/\s\s+/g,ce.bind(ce,!0)),(ie.previousSibling==null&&j(ie.parentNode)||ie.previousSibling!=null&&j(ie.previousSibling))&&(le=le.replace(/^\s+/,ce.bind(ce,!1))),(ie.nextSibling==null&&j(ie.parentNode)||ie.nextSibling!=null&&j(ie.nextSibling))&&(le=le.replace(/\s+$/,ce.bind(ce,!1)))}return oe.insert(le)}r.default=D,r.matchAttributor=H,r.matchBlot=V,r.matchNewline=X,r.matchSpacing=se,r.matchText=ue},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function p(g,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,d,m){return d&&p(g.prototype,d),m&&p(g,m),g}}(),a=function p(g,d,m){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,d);if(y===void 0){var _=Object.getPrototypeOf(g);return _===null?void 0:p(_,d,m)}else{if("value"in y)return y.value;var x=y.get;return x===void 0?void 0:x.call(m)}},s=i(6),u=f(s);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function v(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function l(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h=function(p){l(g,p);function g(){return c(this,g),v(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return o(g,[{key:"optimize",value:function(m){a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),g}(u.default);h.blotName="bold",h.tagName=["STRONG","B"],r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var o=function(){function E(k,R){var F=[],q=!0,Z=!1,ee=void 0;try{for(var ne=k[Symbol.iterator](),Q;!(q=(Q=ne.next()).done)&&(F.push(Q.value),!(R&&F.length===R));q=!0);}catch(N){Z=!0,ee=N}finally{try{!q&&ne.return&&ne.return()}finally{if(Z)throw ee}}return F}return function(k,R){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return E(k,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function E(k,R){for(var F=0;F<R.length;F++){var q=R[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(k,q.key,q)}}return function(k,R,F){return R&&E(k.prototype,R),F&&E(k,F),k}}(),s=i(2),u=m(s),f=i(0),c=m(f),v=i(5),l=m(v),h=i(10),p=m(h),g=i(9),d=m(g);function m(E){return E&&E.__esModule?E:{default:E}}function y(E,k,R){return k in E?Object.defineProperty(E,k,{value:R,enumerable:!0,configurable:!0,writable:!0}):E[k]=R,E}function _(E,k){if(!(E instanceof k))throw new TypeError("Cannot call a class as a function")}function x(E,k){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:E}function C(E,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);E.prototype=Object.create(k&&k.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(E,k):E.__proto__=k)}var S=(0,p.default)("quill:toolbar"),A=function(E){C(k,E);function k(R,F){_(this,k);var q=x(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,R,F));if(Array.isArray(q.options.container)){var Z=document.createElement("div");B(Z,q.options.container),R.container.parentNode.insertBefore(Z,R.container),q.container=Z}else typeof q.options.container=="string"?q.container=document.querySelector(q.options.container):q.container=q.options.container;if(!(q.container instanceof HTMLElement)){var ee;return ee=S.error("Container required for toolbar",q.options),x(q,ee)}return q.container.classList.add("ql-toolbar"),q.controls=[],q.handlers={},Object.keys(q.options.handlers).forEach(function(ne){q.addHandler(ne,q.options.handlers[ne])}),[].forEach.call(q.container.querySelectorAll("button, select"),function(ne){q.attach(ne)}),q.quill.on(l.default.events.EDITOR_CHANGE,function(ne,Q){ne===l.default.events.SELECTION_CHANGE&&q.update(Q)}),q.quill.on(l.default.events.SCROLL_OPTIMIZE,function(){var ne=q.quill.selection.getRange(),Q=o(ne,1),N=Q[0];q.update(N)}),q}return a(k,[{key:"addHandler",value:function(F,q){this.handlers[F]=q}},{key:"attach",value:function(F){var q=this,Z=[].find.call(F.classList,function(ne){return ne.indexOf("ql-")===0});if(Z){if(Z=Z.slice(3),F.tagName==="BUTTON"&&F.setAttribute("type","button"),this.handlers[Z]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Z]==null){S.warn("ignoring attaching to disabled format",Z,F);return}if(c.default.query(Z)==null){S.warn("ignoring attaching to nonexistent format",Z,F);return}}var ee=F.tagName==="SELECT"?"change":"click";F.addEventListener(ee,function(ne){var Q=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var N=F.options[F.selectedIndex];N.hasAttribute("selected")?Q=!1:Q=N.value||!1}else F.classList.contains("ql-active")?Q=!1:Q=F.value||!F.hasAttribute("value"),ne.preventDefault();q.quill.focus();var w=q.quill.selection.getRange(),D=o(w,1),L=D[0];if(q.handlers[Z]!=null)q.handlers[Z].call(q,Q);else if(c.default.query(Z).prototype instanceof c.default.Embed){if(Q=prompt("Enter "+Z),!Q)return;q.quill.updateContents(new u.default().retain(L.index).delete(L.length).insert(y({},Z,Q)),l.default.sources.USER)}else q.quill.format(Z,Q,l.default.sources.USER);q.update(L)}),this.controls.push([Z,F])}}},{key:"update",value:function(F){var q=F==null?{}:this.quill.getFormat(F);this.controls.forEach(function(Z){var ee=o(Z,2),ne=ee[0],Q=ee[1];if(Q.tagName==="SELECT"){var N=void 0;if(F==null)N=null;else if(q[ne]==null)N=Q.querySelector("option[selected]");else if(!Array.isArray(q[ne])){var w=q[ne];typeof w=="string"&&(w=w.replace(/\"/g,'\\"')),N=Q.querySelector('option[value="'+w+'"]')}N==null?(Q.value="",Q.selectedIndex=-1):N.selected=!0}else if(F==null)Q.classList.remove("ql-active");else if(Q.hasAttribute("value")){var D=q[ne]===Q.getAttribute("value")||q[ne]!=null&&q[ne].toString()===Q.getAttribute("value")||q[ne]==null&&!Q.getAttribute("value");Q.classList.toggle("ql-active",D)}else Q.classList.toggle("ql-active",q[ne]!=null)})}}]),k}(d.default);A.DEFAULTS={};function I(E,k,R){var F=document.createElement("button");F.setAttribute("type","button"),F.classList.add("ql-"+k),R!=null&&(F.value=R),E.appendChild(F)}function B(E,k){Array.isArray(k[0])||(k=[k]),k.forEach(function(R){var F=document.createElement("span");F.classList.add("ql-formats"),R.forEach(function(q){if(typeof q=="string")I(F,q);else{var Z=Object.keys(q)[0],ee=q[Z];Array.isArray(ee)?O(F,Z,ee):I(F,Z,ee)}}),E.appendChild(F)})}function O(E,k,R){var F=document.createElement("select");F.classList.add("ql-"+k),R.forEach(function(q){var Z=document.createElement("option");q!==!1?Z.setAttribute("value",q):Z.setAttribute("selected","selected"),F.appendChild(Z)}),E.appendChild(F)}A.DEFAULTS={container:null,handlers:{clean:function(){var k=this,R=this.quill.getSelection();if(R!=null)if(R.length==0){var F=this.quill.getFormat();Object.keys(F).forEach(function(q){c.default.query(q,c.default.Scope.INLINE)!=null&&k.quill.format(q,!1)})}else this.quill.removeFormat(R,l.default.sources.USER)},direction:function(k){var R=this.quill.getFormat().align;k==="rtl"&&R==null?this.quill.format("align","right",l.default.sources.USER):!k&&R==="right"&&this.quill.format("align",!1,l.default.sources.USER),this.quill.format("direction",k,l.default.sources.USER)},indent:function(k){var R=this.quill.getSelection(),F=this.quill.getFormat(R),q=parseInt(F.indent||0);if(k==="+1"||k==="-1"){var Z=k==="+1"?1:-1;F.direction==="rtl"&&(Z*=-1),this.quill.format("indent",q+Z,l.default.sources.USER)}},link:function(k){k===!0&&(k=prompt("Enter link URL:")),this.quill.format("link",k,l.default.sources.USER)},list:function(k){var R=this.quill.getSelection(),F=this.quill.getFormat(R);k==="check"?F.list==="checked"||F.list==="unchecked"?this.quill.format("list",!1,l.default.sources.USER):this.quill.format("list","unchecked",l.default.sources.USER):this.quill.format("list",k,l.default.sources.USER)}}},r.default=A,r.addControls=B},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function p(g,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,d,m){return d&&p(g.prototype,d),m&&p(g,m),g}}(),a=function p(g,d,m){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,d);if(y===void 0){var _=Object.getPrototypeOf(g);return _===null?void 0:p(_,d,m)}else{if("value"in y)return y.value;var x=y.get;return x===void 0?void 0:x.call(m)}},s=i(28),u=f(s);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function v(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function l(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h=function(p){l(g,p);function g(d,m){c(this,g);var y=v(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,d));return y.label.innerHTML=m,y.container.classList.add("ql-color-picker"),[].slice.call(y.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(_){_.classList.add("ql-primary")}),y}return o(g,[{key:"buildItem",value:function(m){var y=a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"buildItem",this).call(this,m);return y.style.backgroundColor=m.getAttribute("value")||"",y}},{key:"selectItem",value:function(m,y){a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,m,y);var _=this.label.querySelector(".ql-color-label"),x=m&&m.getAttribute("data-value")||"";_&&(_.tagName==="line"?_.style.stroke=x:_.style.fill=x)}}]),g}(u.default);r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function p(g,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,d,m){return d&&p(g.prototype,d),m&&p(g,m),g}}(),a=function p(g,d,m){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,d);if(y===void 0){var _=Object.getPrototypeOf(g);return _===null?void 0:p(_,d,m)}else{if("value"in y)return y.value;var x=y.get;return x===void 0?void 0:x.call(m)}},s=i(28),u=f(s);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function v(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function l(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h=function(p){l(g,p);function g(d,m){c(this,g);var y=v(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,d));return y.container.classList.add("ql-icon-picker"),[].forEach.call(y.container.querySelectorAll(".ql-picker-item"),function(_){_.innerHTML=m[_.getAttribute("data-value")||""]}),y.defaultItem=y.container.querySelector(".ql-selected"),y.selectItem(y.defaultItem),y}return o(g,[{key:"selectItem",value:function(m,y){a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,m,y),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),g}(u.default);r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function u(f,c){for(var v=0;v<c.length;v++){var l=c[v];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,l.key,l)}}return function(f,c,v){return c&&u(f.prototype,c),v&&u(f,v),f}}();function a(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var s=function(){function u(f,c){var v=this;a(this,u),this.quill=f,this.boundsContainer=c||document.body,this.root=f.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){v.root.style.marginTop=-1*v.quill.root.scrollTop+"px"}),this.hide()}return o(u,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(c){var v=c.left+c.width/2-this.root.offsetWidth/2,l=c.bottom+this.quill.root.scrollTop;this.root.style.left=v+"px",this.root.style.top=l+"px",this.root.classList.remove("ql-flip");var h=this.boundsContainer.getBoundingClientRect(),p=this.root.getBoundingClientRect(),g=0;if(p.right>h.right&&(g=h.right-p.right,this.root.style.left=v+g+"px"),p.left<h.left&&(g=h.left-p.left,this.root.style.left=v+g+"px"),p.bottom>h.bottom){var d=p.bottom-p.top,m=c.bottom-c.top+d;this.root.style.top=l-m+"px",this.root.classList.add("ql-flip")}return g}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),u}();r.default=s},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function O(E,k){var R=[],F=!0,q=!1,Z=void 0;try{for(var ee=E[Symbol.iterator](),ne;!(F=(ne=ee.next()).done)&&(R.push(ne.value),!(k&&R.length===k));F=!0);}catch(Q){q=!0,Z=Q}finally{try{!F&&ee.return&&ee.return()}finally{if(q)throw Z}}return R}return function(E,k){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return O(E,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function O(E,k,R){E===null&&(E=Function.prototype);var F=Object.getOwnPropertyDescriptor(E,k);if(F===void 0){var q=Object.getPrototypeOf(E);return q===null?void 0:O(q,k,R)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(R)}},s=function(){function O(E,k){for(var R=0;R<k.length;R++){var F=k[R];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(E,F.key,F)}}return function(E,k,R){return k&&O(E.prototype,k),R&&O(E,R),E}}(),u=i(3),f=_(u),c=i(8),v=_(c),l=i(43),h=_(l),p=i(27),g=_(p),d=i(15),m=i(41),y=_(m);function _(O){return O&&O.__esModule?O:{default:O}}function x(O,E){if(!(O instanceof E))throw new TypeError("Cannot call a class as a function")}function C(O,E){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:O}function S(O,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);O.prototype=Object.create(E&&E.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(O,E):O.__proto__=E)}var A=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],I=function(O){S(E,O);function E(k,R){x(this,E),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=A);var F=C(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,k,R));return F.quill.container.classList.add("ql-snow"),F}return s(E,[{key:"extendToolbar",value:function(R){R.container.classList.add("ql-snow"),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),y.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),y.default),this.tooltip=new B(this.quill,this.options.bounds),R.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(F,q){R.handlers.link.call(R,!q.format.link)})}}]),E}(h.default);I.DEFAULTS=(0,f.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(E){if(E){var k=this.quill.getSelection();if(k==null||k.length==0)return;var R=this.quill.getText(k);/^\S+@\S+\.\S+$/.test(R)&&R.indexOf("mailto:")!==0&&(R="mailto:"+R);var F=this.quill.theme.tooltip;F.edit("link",R)}else this.quill.format("link",!1)}}}}});var B=function(O){S(E,O);function E(k,R){x(this,E);var F=C(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,k,R));return F.preview=F.root.querySelector("a.ql-preview"),F}return s(E,[{key:"listen",value:function(){var R=this;a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(F){R.root.classList.contains("ql-editing")?R.save():R.edit("link",R.preview.textContent),F.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(F){if(R.linkRange!=null){var q=R.linkRange;R.restoreFocus(),R.quill.formatText(q,"link",!1,v.default.sources.USER),delete R.linkRange}F.preventDefault(),R.hide()}),this.quill.on(v.default.events.SELECTION_CHANGE,function(F,q,Z){if(F!=null){if(F.length===0&&Z===v.default.sources.USER){var ee=R.quill.scroll.descendant(g.default,F.index),ne=o(ee,2),Q=ne[0],N=ne[1];if(Q!=null){R.linkRange=new d.Range(F.index-N,Q.length());var w=g.default.formats(Q.domNode);R.preview.textContent=w,R.preview.setAttribute("href",w),R.show(),R.position(R.quill.getBounds(R.linkRange));return}}else delete R.linkRange;R.hide()}})}},{key:"show",value:function(){a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),E}(l.BaseTooltip);B.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=I},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(29),a=ae(o),s=i(36),u=i(38),f=i(64),c=i(65),v=ae(c),l=i(66),h=ae(l),p=i(67),g=ae(p),d=i(37),m=i(26),y=i(39),_=i(40),x=i(56),C=ae(x),S=i(68),A=ae(S),I=i(27),B=ae(I),O=i(69),E=ae(O),k=i(70),R=ae(k),F=i(71),q=ae(F),Z=i(72),ee=ae(Z),ne=i(73),Q=ae(ne),N=i(13),w=ae(N),D=i(74),L=ae(D),$=i(75),G=ae($),j=i(57),W=ae(j),M=i(41),H=ae(M),V=i(28),K=ae(V),J=i(59),P=ae(J),X=i(60),se=ae(X),fe=i(61),ue=ae(fe),ie=i(108),oe=ae(ie),le=i(62),ce=ae(le);function ae(ve){return ve&&ve.__esModule?ve:{default:ve}}a.default.register({"attributors/attribute/direction":u.DirectionAttribute,"attributors/class/align":s.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":u.DirectionClass,"attributors/class/font":y.FontClass,"attributors/class/size":_.SizeClass,"attributors/style/align":s.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":u.DirectionStyle,"attributors/style/font":y.FontStyle,"attributors/style/size":_.SizeStyle},!0),a.default.register({"formats/align":s.AlignClass,"formats/direction":u.DirectionClass,"formats/indent":f.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":y.FontClass,"formats/size":_.SizeClass,"formats/blockquote":v.default,"formats/code-block":w.default,"formats/header":h.default,"formats/list":g.default,"formats/bold":C.default,"formats/code":N.Code,"formats/italic":A.default,"formats/link":B.default,"formats/script":E.default,"formats/strike":R.default,"formats/underline":q.default,"formats/image":ee.default,"formats/video":Q.default,"formats/list/item":p.ListItem,"modules/formula":L.default,"modules/syntax":G.default,"modules/toolbar":W.default,"themes/bubble":oe.default,"themes/snow":ce.default,"ui/icons":H.default,"ui/picker":K.default,"ui/icon-picker":se.default,"ui/color-picker":P.default,"ui/tooltip":ue.default},!0),r.default=a.default},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var o=function(){function g(d,m){for(var y=0;y<m.length;y++){var _=m[y];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(d,_.key,_)}}return function(d,m,y){return m&&g(d.prototype,m),y&&g(d,y),d}}(),a=function g(d,m,y){d===null&&(d=Function.prototype);var _=Object.getOwnPropertyDescriptor(d,m);if(_===void 0){var x=Object.getPrototypeOf(d);return x===null?void 0:g(x,m,y)}else{if("value"in _)return _.value;var C=_.get;return C===void 0?void 0:C.call(y)}},s=i(0),u=f(s);function f(g){return g&&g.__esModule?g:{default:g}}function c(g,d){if(!(g instanceof d))throw new TypeError("Cannot call a class as a function")}function v(g,d){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:g}function l(g,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);g.prototype=Object.create(d&&d.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(g,d):g.__proto__=d)}var h=function(g){l(d,g);function d(){return c(this,d),v(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return o(d,[{key:"add",value:function(y,_){if(_==="+1"||_==="-1"){var x=this.value(y)||0;_=_==="+1"?x+1:x-1}return _===0?(this.remove(y),!0):a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"add",this).call(this,y,_)}},{key:"canAdd",value:function(y,_){return a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"canAdd",this).call(this,y,_)||a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"canAdd",this).call(this,y,parseInt(_))}},{key:"value",value:function(y){return parseInt(a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"value",this).call(this,y))||void 0}}]),d}(u.default.Attributor.Class),p=new h("indent","ql-indent",{scope:u.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=p},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(4),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}function u(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}function f(l,h){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:l}function c(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);l.prototype=Object.create(h&&h.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(l,h):l.__proto__=h)}var v=function(l){c(h,l);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(a.default);v.blotName="blockquote",v.tagName="blockquote",r.default=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function h(p,g){for(var d=0;d<g.length;d++){var m=g[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,g,d){return g&&h(p.prototype,g),d&&h(p,d),p}}(),a=i(4),s=u(a);function u(h){return h&&h.__esModule?h:{default:h}}function f(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function c(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function v(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var l=function(h){v(p,h);function p(){return f(this,p),c(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return o(p,null,[{key:"formats",value:function(d){return this.tagName.indexOf(d.tagName)+1}}]),p}(s.default);l.blotName="header",l.tagName=["H1","H2","H3","H4","H5","H6"],r.default=l},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var o=function(){function x(C,S){for(var A=0;A<S.length;A++){var I=S[A];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(C,I.key,I)}}return function(C,S,A){return S&&x(C.prototype,S),A&&x(C,A),C}}(),a=function x(C,S,A){C===null&&(C=Function.prototype);var I=Object.getOwnPropertyDescriptor(C,S);if(I===void 0){var B=Object.getPrototypeOf(C);return B===null?void 0:x(B,S,A)}else{if("value"in I)return I.value;var O=I.get;return O===void 0?void 0:O.call(A)}},s=i(0),u=h(s),f=i(4),c=h(f),v=i(25),l=h(v);function h(x){return x&&x.__esModule?x:{default:x}}function p(x,C,S){return C in x?Object.defineProperty(x,C,{value:S,enumerable:!0,configurable:!0,writable:!0}):x[C]=S,x}function g(x,C){if(!(x instanceof C))throw new TypeError("Cannot call a class as a function")}function d(x,C){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:x}function m(x,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);x.prototype=Object.create(C&&C.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(x,C):x.__proto__=C)}var y=function(x){m(C,x);function C(){return g(this,C),d(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return o(C,[{key:"format",value:function(A,I){A===_.blotName&&!I?this.replaceWith(u.default.create(this.statics.scope)):a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"format",this).call(this,A,I)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(A,I){return this.parent.isolate(this.offset(this.parent),this.length()),A===this.parent.statics.blotName?(this.parent.replaceWith(A,I),this):(this.parent.unwrap(),a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replaceWith",this).call(this,A,I))}}],[{key:"formats",value:function(A){return A.tagName===this.tagName?void 0:a(C.__proto__||Object.getPrototypeOf(C),"formats",this).call(this,A)}}]),C}(c.default);y.blotName="list-item",y.tagName="LI";var _=function(x){m(C,x),o(C,null,[{key:"create",value:function(A){var I=A==="ordered"?"OL":"UL",B=a(C.__proto__||Object.getPrototypeOf(C),"create",this).call(this,I);return(A==="checked"||A==="unchecked")&&B.setAttribute("data-checked",A==="checked"),B}},{key:"formats",value:function(A){if(A.tagName==="OL")return"ordered";if(A.tagName==="UL")return A.hasAttribute("data-checked")?A.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function C(S){g(this,C);var A=d(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,S)),I=function(O){if(O.target.parentNode===S){var E=A.statics.formats(S),k=u.default.find(O.target);E==="checked"?k.format("list","unchecked"):E==="unchecked"&&k.format("list","checked")}};return S.addEventListener("touchstart",I),S.addEventListener("mousedown",I),A}return o(C,[{key:"format",value:function(A,I){this.children.length>0&&this.children.tail.format(A,I)}},{key:"formats",value:function(){return p({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,I){if(A instanceof y)a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertBefore",this).call(this,A,I);else{var B=I==null?this.length():I.offset(this),O=this.split(B);O.parent.insertBefore(A,O)}}},{key:"optimize",value:function(A){a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,A);var I=this.next;I!=null&&I.prev===this&&I.statics.blotName===this.statics.blotName&&I.domNode.tagName===this.domNode.tagName&&I.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(I.moveChildren(this),I.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var I=u.default.create(this.statics.defaultChild);A.moveChildren(I),this.appendChild(I)}a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replace",this).call(this,A)}}]),C}(l.default);_.blotName="list",_.scope=u.default.Scope.BLOCK_BLOT,_.tagName=["OL","UL"],_.defaultChild="list-item",_.allowedChildren=[y],r.ListItem=y,r.default=_},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(56),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}function u(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}function f(l,h){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:l}function c(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);l.prototype=Object.create(h&&h.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(l,h):l.__proto__=h)}var v=function(l){c(h,l);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(a.default);v.blotName="italic",v.tagName=["EM","I"],r.default=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function p(g,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,d,m){return d&&p(g.prototype,d),m&&p(g,m),g}}(),a=function p(g,d,m){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,d);if(y===void 0){var _=Object.getPrototypeOf(g);return _===null?void 0:p(_,d,m)}else{if("value"in y)return y.value;var x=y.get;return x===void 0?void 0:x.call(m)}},s=i(6),u=f(s);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function v(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function l(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h=function(p){l(g,p);function g(){return c(this,g),v(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return o(g,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):a(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),g}(u.default);h.blotName="script",h.tagName=["SUB","SUP"],r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(6),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}function u(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}function f(l,h){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:l}function c(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);l.prototype=Object.create(h&&h.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(l,h):l.__proto__=h)}var v=function(l){c(h,l);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(a.default);v.blotName="strike",v.tagName="S",r.default=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(6),a=s(o);function s(l){return l&&l.__esModule?l:{default:l}}function u(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}function f(l,h){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:l}function c(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);l.prototype=Object.create(h&&h.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(l,h):l.__proto__=h)}var v=function(l){c(h,l);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(a.default);v.blotName="underline",v.tagName="U",r.default=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function d(m,y){for(var _=0;_<y.length;_++){var x=y[_];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,y,_){return y&&d(m.prototype,y),_&&d(m,_),m}}(),a=function d(m,y,_){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,y);if(x===void 0){var C=Object.getPrototypeOf(m);return C===null?void 0:d(C,y,_)}else{if("value"in x)return x.value;var S=x.get;return S===void 0?void 0:S.call(_)}},s=i(0),u=c(s),f=i(27);function c(d){return d&&d.__esModule?d:{default:d}}function v(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}function l(d,m){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:d}function h(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(d,m):d.__proto__=m)}var p=["alt","height","width"],g=function(d){h(m,d);function m(){return v(this,m),l(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(_,x){p.indexOf(_)>-1?x?this.domNode.setAttribute(_,x):this.domNode.removeAttribute(_):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,_,x)}}],[{key:"create",value:function(_){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,_);return typeof _=="string"&&x.setAttribute("src",this.sanitize(_)),x}},{key:"formats",value:function(_){return p.reduce(function(x,C){return _.hasAttribute(C)&&(x[C]=_.getAttribute(C)),x},{})}},{key:"match",value:function(_){return/\.(jpe?g|gif|png)$/.test(_)||/^data:image\/.+;base64/.test(_)}},{key:"sanitize",value:function(_){return(0,f.sanitize)(_,["http","https","data"])?_:"//:0"}},{key:"value",value:function(_){return _.getAttribute("src")}}]),m}(u.default.Embed);g.blotName="image",g.tagName="IMG",r.default=g},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function d(m,y){for(var _=0;_<y.length;_++){var x=y[_];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,y,_){return y&&d(m.prototype,y),_&&d(m,_),m}}(),a=function d(m,y,_){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,y);if(x===void 0){var C=Object.getPrototypeOf(m);return C===null?void 0:d(C,y,_)}else{if("value"in x)return x.value;var S=x.get;return S===void 0?void 0:S.call(_)}},s=i(4),u=i(27),f=c(u);function c(d){return d&&d.__esModule?d:{default:d}}function v(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}function l(d,m){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:d}function h(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(d,m):d.__proto__=m)}var p=["height","width"],g=function(d){h(m,d);function m(){return v(this,m),l(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(_,x){p.indexOf(_)>-1?x?this.domNode.setAttribute(_,x):this.domNode.removeAttribute(_):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,_,x)}}],[{key:"create",value:function(_){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,_);return x.setAttribute("frameborder","0"),x.setAttribute("allowfullscreen",!0),x.setAttribute("src",this.sanitize(_)),x}},{key:"formats",value:function(_){return p.reduce(function(x,C){return _.hasAttribute(C)&&(x[C]=_.getAttribute(C)),x},{})}},{key:"sanitize",value:function(_){return f.default.sanitize(_)}},{key:"value",value:function(_){return _.getAttribute("src")}}]),m}(s.BlockEmbed);g.blotName="video",g.className="ql-video",g.tagName="IFRAME",r.default=g},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var o=function(){function _(x,C){for(var S=0;S<C.length;S++){var A=C[S];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,C,S){return C&&_(x.prototype,C),S&&_(x,S),x}}(),a=function _(x,C,S){x===null&&(x=Function.prototype);var A=Object.getOwnPropertyDescriptor(x,C);if(A===void 0){var I=Object.getPrototypeOf(x);return I===null?void 0:_(I,C,S)}else{if("value"in A)return A.value;var B=A.get;return B===void 0?void 0:B.call(S)}},s=i(35),u=h(s),f=i(5),c=h(f),v=i(9),l=h(v);function h(_){return _&&_.__esModule?_:{default:_}}function p(_,x){if(!(_ instanceof x))throw new TypeError("Cannot call a class as a function")}function g(_,x){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:_}function d(_,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);_.prototype=Object.create(x&&x.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(_,x):_.__proto__=x)}var m=function(_){d(x,_);function x(){return p(this,x),g(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,null,[{key:"create",value:function(S){var A=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,S);return typeof S=="string"&&(window.katex.render(S,A,{throwOnError:!1,errorColor:"#f00"}),A.setAttribute("data-value",S)),A}},{key:"value",value:function(S){return S.getAttribute("data-value")}}]),x}(u.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var y=function(_){d(x,_),o(x,null,[{key:"register",value:function(){c.default.register(m,!0)}}]);function x(){p(this,x);var C=g(this,(x.__proto__||Object.getPrototypeOf(x)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return C}return x}(l.default);r.FormulaBlot=m,r.default=y},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var o=function(){function S(A,I){for(var B=0;B<I.length;B++){var O=I[B];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,O.key,O)}}return function(A,I,B){return I&&S(A.prototype,I),B&&S(A,B),A}}(),a=function S(A,I,B){A===null&&(A=Function.prototype);var O=Object.getOwnPropertyDescriptor(A,I);if(O===void 0){var E=Object.getPrototypeOf(A);return E===null?void 0:S(E,I,B)}else{if("value"in O)return O.value;var k=O.get;return k===void 0?void 0:k.call(B)}},s=i(0),u=g(s),f=i(5),c=g(f),v=i(9),l=g(v),h=i(13),p=g(h);function g(S){return S&&S.__esModule?S:{default:S}}function d(S,A){if(!(S instanceof A))throw new TypeError("Cannot call a class as a function")}function m(S,A){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:S}function y(S,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);S.prototype=Object.create(A&&A.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(S,A):S.__proto__=A)}var _=function(S){y(A,S);function A(){return d(this,A),m(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return o(A,[{key:"replaceWith",value:function(B){this.domNode.textContent=this.domNode.textContent,this.attach(),a(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,B)}},{key:"highlight",value:function(B){var O=this.domNode.textContent;this.cachedText!==O&&((O.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=B(O),this.domNode.normalize(),this.attach()),this.cachedText=O)}}]),A}(p.default);_.className="ql-syntax";var x=new u.default.Attributor.Class("token","hljs",{scope:u.default.Scope.INLINE}),C=function(S){y(A,S),o(A,null,[{key:"register",value:function(){c.default.register(x,!0),c.default.register(_,!0)}}]);function A(I,B){d(this,A);var O=m(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,I,B));if(typeof O.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var E=null;return O.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(E),E=setTimeout(function(){O.highlight(),E=null},O.options.interval)}),O.highlight(),O}return o(A,[{key:"highlight",value:function(){var B=this;if(!this.quill.selection.composing){this.quill.update(c.default.sources.USER);var O=this.quill.getSelection();this.quill.scroll.descendants(_).forEach(function(E){E.highlight(B.options.highlight)}),this.quill.update(c.default.sources.SILENT),O!=null&&this.quill.setSelection(O,c.default.sources.SILENT)}}}]),A}(l.default);C.DEFAULTS={highlight:function(){return window.hljs==null?null:function(S){var A=window.hljs.highlightAuto(S);return A.value}}(),interval:1e3},r.CodeBlock=_,r.CodeToken=x,r.default=C},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,r){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,r){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,r){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,r){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,r){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var o=function A(I,B,O){I===null&&(I=Function.prototype);var E=Object.getOwnPropertyDescriptor(I,B);if(E===void 0){var k=Object.getPrototypeOf(I);return k===null?void 0:A(k,B,O)}else{if("value"in E)return E.value;var R=E.get;return R===void 0?void 0:R.call(O)}},a=function(){function A(I,B){for(var O=0;O<B.length;O++){var E=B[O];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(I,E.key,E)}}return function(I,B,O){return B&&A(I.prototype,B),O&&A(I,O),I}}(),s=i(3),u=d(s),f=i(8),c=d(f),v=i(43),l=d(v),h=i(15),p=i(41),g=d(p);function d(A){return A&&A.__esModule?A:{default:A}}function m(A,I){if(!(A instanceof I))throw new TypeError("Cannot call a class as a function")}function y(A,I){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:A}function _(A,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);A.prototype=Object.create(I&&I.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(A,I):A.__proto__=I)}var x=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],C=function(A){_(I,A);function I(B,O){m(this,I),O.modules.toolbar!=null&&O.modules.toolbar.container==null&&(O.modules.toolbar.container=x);var E=y(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,B,O));return E.quill.container.classList.add("ql-bubble"),E}return a(I,[{key:"extendToolbar",value:function(O){this.tooltip=new S(this.quill,this.options.bounds),this.tooltip.root.appendChild(O.container),this.buildButtons([].slice.call(O.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(O.container.querySelectorAll("select")),g.default)}}]),I}(l.default);C.DEFAULTS=(0,u.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(I){I?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var S=function(A){_(I,A);function I(B,O){m(this,I);var E=y(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,B,O));return E.quill.on(c.default.events.EDITOR_CHANGE,function(k,R,F,q){if(k===c.default.events.SELECTION_CHANGE)if(R!=null&&R.length>0&&q===c.default.sources.USER){E.show(),E.root.style.left="0px",E.root.style.width="",E.root.style.width=E.root.offsetWidth+"px";var Z=E.quill.getLines(R.index,R.length);if(Z.length===1)E.position(E.quill.getBounds(R));else{var ee=Z[Z.length-1],ne=E.quill.getIndex(ee),Q=Math.min(ee.length()-1,R.index+R.length-ne),N=E.quill.getBounds(new h.Range(ne,Q));E.position(N)}}else document.activeElement!==E.textbox&&E.quill.hasFocus()&&E.hide()}),E}return a(I,[{key:"listen",value:function(){var O=this;o(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){O.root.classList.remove("ql-editing")}),this.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!O.root.classList.contains("ql-hidden")){var E=O.quill.getSelection();E!=null&&O.position(O.quill.getBounds(E))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(O){var E=o(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"position",this).call(this,O),k=this.root.querySelector(".ql-tooltip-arrow");if(k.style.marginLeft="",E===0)return E;k.style.marginLeft=-1*E-k.offsetWidth/2+"px"}}]),I}(v.BaseTooltip);S.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=S,r.default=C},function(t,r,i){t.exports=i(63)}]).default})})(L0);var F8=L0.exports;const hs=ds(F8);var pn=-1,Yt=1,Tt=0;function gi(e,n,t,r){if(e===n)return e?[[Tt,e]]:[];if(t!=null){var i=$8(e,n,t);if(i)return i}var o=ps(e,n),a=e.substring(0,o);e=e.substring(o),n=n.substring(o),o=vs(e,n);var s=e.substring(e.length-o);e=e.substring(0,e.length-o),n=n.substring(0,n.length-o);var u=N8(e,n);return a&&u.unshift([Tt,a]),s&&u.push([Tt,s]),N0(u,r),u}function N8(e,n){var t;if(!e)return[[Yt,n]];if(!n)return[[pn,e]];var r=e.length>n.length?e:n,i=e.length>n.length?n:e,o=r.indexOf(i);if(o!==-1)return t=[[Yt,r.substring(0,o)],[Tt,i],[Yt,r.substring(o+i.length)]],e.length>n.length&&(t[0][0]=t[2][0]=pn),t;if(i.length===1)return[[pn,e],[Yt,n]];var a=M8(e,n);if(a){var s=a[0],u=a[1],f=a[2],c=a[3],v=a[4],l=gi(s,f),h=gi(u,c);return l.concat([[Tt,v]],h)}return P8(e,n)}function P8(e,n){for(var t=e.length,r=n.length,i=Math.ceil((t+r)/2),o=i,a=2*i,s=new Array(a),u=new Array(a),f=0;f<a;f++)s[f]=-1,u[f]=-1;s[o+1]=0,u[o+1]=0;for(var c=t-r,v=c%2!==0,l=0,h=0,p=0,g=0,d=0;d<i;d++){for(var m=-d+l;m<=d-h;m+=2){var y=o+m,_;m===-d||m!==d&&s[y-1]<s[y+1]?_=s[y+1]:_=s[y-1]+1;for(var x=_-m;_<t&&x<r&&e.charAt(_)===n.charAt(x);)_++,x++;if(s[y]=_,_>t)h+=2;else if(x>r)l+=2;else if(v){var C=o+c-m;if(C>=0&&C<a&&u[C]!==-1){var S=t-u[C];if(_>=S)return F0(e,n,_,x)}}}for(var A=-d+p;A<=d-g;A+=2){var C=o+A,S;A===-d||A!==d&&u[C-1]<u[C+1]?S=u[C+1]:S=u[C-1]+1;for(var I=S-A;S<t&&I<r&&e.charAt(t-S-1)===n.charAt(r-I-1);)S++,I++;if(u[C]=S,S>t)g+=2;else if(I>r)p+=2;else if(!v){var y=o+c-A;if(y>=0&&y<a&&s[y]!==-1){var _=s[y],x=o+_-y;if(S=t-S,_>=S)return F0(e,n,_,x)}}}}return[[pn,e],[Yt,n]]}function F0(e,n,t,r){var i=e.substring(0,t),o=n.substring(0,r),a=e.substring(t),s=n.substring(r),u=gi(i,o),f=gi(a,s);return u.concat(f)}function ps(e,n){if(!e||!n||e.charAt(0)!==n.charAt(0))return 0;for(var t=0,r=Math.min(e.length,n.length),i=r,o=0;t<i;)e.substring(o,i)==n.substring(o,i)?(t=i,o=t):r=i,i=Math.floor((r-t)/2+t);return P0(e.charCodeAt(i-1))&&i--,i}function vs(e,n){if(!e||!n||e.slice(-1)!==n.slice(-1))return 0;for(var t=0,r=Math.min(e.length,n.length),i=r,o=0;t<i;)e.substring(e.length-i,e.length-o)==n.substring(n.length-i,n.length-o)?(t=i,o=t):r=i,i=Math.floor((r-t)/2+t);return M0(e.charCodeAt(e.length-i))&&i--,i}function M8(e,n){var t=e.length>n.length?e:n,r=e.length>n.length?n:e;if(t.length<4||r.length*2<t.length)return null;function i(h,p,g){for(var d=h.substring(g,g+Math.floor(h.length/4)),m=-1,y="",_,x,C,S;(m=p.indexOf(d,m+1))!==-1;){var A=ps(h.substring(g),p.substring(m)),I=vs(h.substring(0,g),p.substring(0,m));y.length<I+A&&(y=p.substring(m-I,m)+p.substring(m,m+A),_=h.substring(0,g-I),x=h.substring(g+A),C=p.substring(0,m-I),S=p.substring(m+A))}return y.length*2>=h.length?[_,x,C,S,y]:null}var o=i(t,r,Math.ceil(t.length/4)),a=i(t,r,Math.ceil(t.length/2)),s;if(!o&&!a)return null;a?o?s=o[4].length>a[4].length?o:a:s=a:s=o;var u,f,c,v;e.length>n.length?(u=s[0],f=s[1],c=s[2],v=s[3]):(c=s[0],v=s[1],u=s[2],f=s[3]);var l=s[4];return[u,f,c,v,l]}function N0(e,n){e.push([Tt,""]);for(var t=0,r=0,i=0,o="",a="",s;t<e.length;){if(t<e.length-1&&!e[t][1]){e.splice(t,1);continue}switch(e[t][0]){case Yt:i++,a+=e[t][1],t++;break;case pn:r++,o+=e[t][1],t++;break;case Tt:var u=t-i-r-1;if(n){if(u>=0&&$0(e[u][1])){var f=e[u][1].slice(-1);if(e[u][1]=e[u][1].slice(0,-1),o=f+o,a=f+a,!e[u][1]){e.splice(u,1),t--;var c=u-1;e[c]&&e[c][0]===Yt&&(i++,a=e[c][1]+a,c--),e[c]&&e[c][0]===pn&&(r++,o=e[c][1]+o,c--),u=c}}if(q0(e[t][1])){var f=e[t][1].charAt(0);e[t][1]=e[t][1].slice(1),o+=f,a+=f}}if(t<e.length-1&&!e[t][1]){e.splice(t,1);break}if(o.length>0||a.length>0){o.length>0&&a.length>0&&(s=ps(a,o),s!==0&&(u>=0?e[u][1]+=a.substring(0,s):(e.splice(0,0,[Tt,a.substring(0,s)]),t++),a=a.substring(s),o=o.substring(s)),s=vs(a,o),s!==0&&(e[t][1]=a.substring(a.length-s)+e[t][1],a=a.substring(0,a.length-s),o=o.substring(0,o.length-s)));var v=i+r;o.length===0&&a.length===0?(e.splice(t-v,v),t=t-v):o.length===0?(e.splice(t-v,v,[Yt,a]),t=t-v+1):a.length===0?(e.splice(t-v,v,[pn,o]),t=t-v+1):(e.splice(t-v,v,[pn,o],[Yt,a]),t=t-v+2)}t!==0&&e[t-1][0]===Tt?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,i=0,r=0,o="",a="";break}}e[e.length-1][1]===""&&e.pop();var l=!1;for(t=1;t<e.length-1;)e[t-1][0]===Tt&&e[t+1][0]===Tt&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),l=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),l=!0)),t++;l&&N0(e,n)}function P0(e){return e>=55296&&e<=56319}function M0(e){return e>=56320&&e<=57343}function q0(e){return M0(e.charCodeAt(0))}function $0(e){return P0(e.charCodeAt(e.length-1))}function q8(e){for(var n=[],t=0;t<e.length;t++)e[t][1].length>0&&n.push(e[t]);return n}function gs(e,n,t,r){return $0(e)||q0(r)?null:q8([[Tt,e],[pn,n],[Yt,t],[Tt,r]])}function $8(e,n,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,i=typeof t=="number"?null:t.newRange,o=e.length,a=n.length;if(r.length===0&&(i===null||i.length===0)){var s=r.index,u=e.slice(0,s),f=e.slice(s),c=i?i.index:null;e:{var v=s+a-o;if(c!==null&&c!==v||v<0||v>a)break e;var l=n.slice(0,v),h=n.slice(v);if(h!==f)break e;var p=Math.min(s,v),g=u.slice(0,p),d=l.slice(0,p);if(g!==d)break e;var m=u.slice(p),y=l.slice(p);return gs(g,m,y,f)}e:{if(c!==null&&c!==s)break e;var _=s,l=n.slice(0,_),h=n.slice(_);if(l!==u)break e;var x=Math.min(o-_,a-_),C=f.slice(f.length-x),S=h.slice(h.length-x);if(C!==S)break e;var m=f.slice(0,f.length-x),y=h.slice(0,h.length-x);return gs(u,m,y,C)}}if(r.length>0&&i&&i.length===0)e:{var g=e.slice(0,r.index),C=e.slice(r.index+r.length),p=g.length,x=C.length;if(a<p+x)break e;var d=n.slice(0,p),S=n.slice(a-x);if(g!==d||C!==S)break e;var m=e.slice(p,o-x),y=n.slice(p,a-x);return gs(g,m,y,C)}return null}function Ro(e,n,t){return gi(e,n,t,!0)}Ro.INSERT=Yt,Ro.DELETE=pn,Ro.EQUAL=Tt;var j8=Ro,Lo={exports:{}};Lo.exports,function(e,n){var t=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",s="[object Boolean]",u="[object Date]",f="[object Error]",c="[object Function]",v="[object GeneratorFunction]",l="[object Map]",h="[object Number]",p="[object Object]",g="[object Promise]",d="[object RegExp]",m="[object Set]",y="[object String]",_="[object Symbol]",x="[object WeakMap]",C="[object ArrayBuffer]",S="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",B="[object Int8Array]",O="[object Int16Array]",E="[object Int32Array]",k="[object Uint8Array]",R="[object Uint8ClampedArray]",F="[object Uint16Array]",q="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,ee=/\w*$/,ne=/^\[object .+?Constructor\]$/,Q=/^(?:0|[1-9]\d*)$/,N={};N[o]=N[a]=N[C]=N[S]=N[s]=N[u]=N[A]=N[I]=N[B]=N[O]=N[E]=N[l]=N[h]=N[p]=N[d]=N[m]=N[y]=N[_]=N[k]=N[R]=N[F]=N[q]=!0,N[f]=N[c]=N[x]=!1;var w=typeof Se=="object"&&Se&&Se.Object===Object&&Se,D=typeof self=="object"&&self&&self.Object===Object&&self,L=w||D||Function("return this")(),$=n&&!n.nodeType&&n,G=$&&!0&&e&&!e.nodeType&&e,j=G&&G.exports===$;function W(T,z){return T.set(z[0],z[1]),T}function M(T,z){return T.add(z),T}function H(T,z){for(var re=-1,pe=T?T.length:0;++re<pe&&z(T[re],re,T)!==!1;);return T}function V(T,z){for(var re=-1,pe=z.length,Be=T.length;++re<pe;)T[Be+re]=z[re];return T}function K(T,z,re,pe){var Be=-1,Oe=T?T.length:0;for(pe&&Oe&&(re=T[++Be]);++Be<Oe;)re=z(re,T[Be],Be,T);return re}function J(T,z){for(var re=-1,pe=Array(T);++re<T;)pe[re]=z(re);return pe}function P(T,z){return T==null?void 0:T[z]}function X(T){var z=!1;if(T!=null&&typeof T.toString!="function")try{z=!!(T+"")}catch{}return z}function se(T){var z=-1,re=Array(T.size);return T.forEach(function(pe,Be){re[++z]=[Be,pe]}),re}function fe(T,z){return function(re){return T(z(re))}}function ue(T){var z=-1,re=Array(T.size);return T.forEach(function(pe){re[++z]=pe}),re}var ie=Array.prototype,oe=Function.prototype,le=Object.prototype,ce=L["__core-js_shared__"],ae=function(){var T=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""}(),ve=oe.toString,ye=le.hasOwnProperty,_e=le.toString,Ce=RegExp("^"+ve.call(ye).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=j?L.Buffer:void 0,Ee=L.Symbol,$e=L.Uint8Array,Te=fe(Object.getPrototypeOf,Object),Ke=Object.create,dt=le.propertyIsEnumerable,Xn=ie.splice,Bt=Object.getOwnPropertySymbols,Vt=Ae?Ae.isBuffer:void 0,it=fe(Object.keys,Object),st=rn(L,"DataView"),Mt=rn(L,"Map"),qt=rn(L,"Promise"),kn=rn(L,"Set"),gr=rn(L,"WeakMap"),gn=rn(Object,"create"),mr=Et(st),On=Et(Mt),yr=Et(qt),Wn=Et(kn),xr=Et(gr),mn=Ee?Ee.prototype:void 0,_r=mn?mn.valueOf:void 0;function nn(T){var z=-1,re=T?T.length:0;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function Mr(){this.__data__=gn?gn(null):{}}function ht(T){return this.has(T)&&delete this.__data__[T]}function Ut(T){var z=this.__data__;if(gn){var re=z[T];return re===r?void 0:re}return ye.call(z,T)?z[T]:void 0}function br(T){var z=this.__data__;return gn?z[T]!==void 0:ye.call(z,T)}function Cr(T,z){var re=this.__data__;return re[T]=gn&&z===void 0?r:z,this}nn.prototype.clear=Mr,nn.prototype.delete=ht,nn.prototype.get=Ut,nn.prototype.has=br,nn.prototype.set=Cr;function pt(T){var z=-1,re=T?T.length:0;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function dl(){this.__data__=[]}function hl(T){var z=this.__data__,re=$r(z,T);if(re<0)return!1;var pe=z.length-1;return re==pe?z.pop():Xn.call(z,re,1),!0}function pl(T){var z=this.__data__,re=$r(z,T);return re<0?void 0:z[re][1]}function vl(T){return $r(this.__data__,T)>-1}function gl(T,z){var re=this.__data__,pe=$r(re,T);return pe<0?re.push([T,z]):re[pe][1]=z,this}pt.prototype.clear=dl,pt.prototype.delete=hl,pt.prototype.get=pl,pt.prototype.has=vl,pt.prototype.set=gl;function xt(T){var z=-1,re=T?T.length:0;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function ml(){this.__data__={hash:new nn,map:new(Mt||pt),string:new nn}}function yl(T){return Er(this,T).delete(T)}function xl(T){return Er(this,T).get(T)}function _l(T){return Er(this,T).has(T)}function bl(T,z){return Er(this,T).set(T,z),this}xt.prototype.clear=ml,xt.prototype.delete=yl,xt.prototype.get=xl,xt.prototype.has=_l,xt.prototype.set=bl;function Dt(T){this.__data__=new pt(T)}function Cl(){this.__data__=new pt}function wl(T){return this.__data__.delete(T)}function El(T){return this.__data__.get(T)}function Al(T){return this.__data__.has(T)}function kl(T,z){var re=this.__data__;if(re instanceof pt){var pe=re.__data__;if(!Mt||pe.length<t-1)return pe.push([T,z]),this;re=this.__data__=new xt(pe)}return re.set(T,z),this}Dt.prototype.clear=Cl,Dt.prototype.delete=wl,Dt.prototype.get=El,Dt.prototype.has=Al,Dt.prototype.set=kl;function qr(T,z){var re=Oi(T)||Hr(T)?J(T.length,String):[],pe=re.length,Be=!!pe;for(var Oe in T)(z||ye.call(T,Oe))&&!(Be&&(Oe=="length"||$l(Oe,pe)))&&re.push(Oe);return re}function Ko(T,z,re){var pe=T[z];(!(ye.call(T,z)&&Zo(pe,re))||re===void 0&&!(z in T))&&(T[z]=re)}function $r(T,z){for(var re=T.length;re--;)if(Zo(T[re][0],z))return re;return-1}function yn(T,z){return T&&ki(z,Ii(z),T)}function Ei(T,z,re,pe,Be,Oe,je){var Ue;if(pe&&(Ue=Oe?pe(T,Be,Oe,je):pe(T)),Ue!==void 0)return Ue;if(!_n(T))return T;var ot=Oi(T);if(ot){if(Ue=Ml(T),!z)return Fl(T,Ue)}else{var Xe=In(T),_t=Xe==c||Xe==v;if(Jo(T))return jr(T,z);if(Xe==p||Xe==o||_t&&!Oe){if(X(T))return Oe?T:{};if(Ue=xn(_t?{}:T),!z)return Nl(T,yn(Ue,T))}else{if(!N[Xe])return Oe?T:{};Ue=ql(T,Xe,Ei,z)}}je||(je=new Dt);var Rt=je.get(T);if(Rt)return Rt;if(je.set(T,Ue),!ot)var lt=re?Pl(T):Ii(T);return H(lt||T,function(bt,vt){lt&&(vt=bt,bt=T[vt]),Ko(Ue,vt,Ei(bt,z,re,pe,vt,T,je))}),Ue}function Ol(T){return _n(T)?Ke(T):{}}function Sl(T,z,re){var pe=z(T);return Oi(T)?pe:V(pe,re(T))}function Il(T){return _e.call(T)}function Tl(T){if(!_n(T)||Hl(T))return!1;var z=Si(T)||X(T)?Ce:ne;return z.test(Et(T))}function Bl(T){if(!Go(T))return it(T);var z=[];for(var re in Object(T))ye.call(T,re)&&re!="constructor"&&z.push(re);return z}function jr(T,z){if(z)return T.slice();var re=new T.constructor(T.length);return T.copy(re),re}function Ai(T){var z=new T.constructor(T.byteLength);return new $e(z).set(new $e(T)),z}function wr(T,z){var re=z?Ai(T.buffer):T.buffer;return new T.constructor(re,T.byteOffset,T.byteLength)}function Xo(T,z,re){var pe=z?re(se(T),!0):se(T);return K(pe,W,new T.constructor)}function Wo(T){var z=new T.constructor(T.source,ee.exec(T));return z.lastIndex=T.lastIndex,z}function Dl(T,z,re){var pe=z?re(ue(T),!0):ue(T);return K(pe,M,new T.constructor)}function Rl(T){return _r?Object(_r.call(T)):{}}function Ll(T,z){var re=z?Ai(T.buffer):T.buffer;return new T.constructor(re,T.byteOffset,T.length)}function Fl(T,z){var re=-1,pe=T.length;for(z||(z=Array(pe));++re<pe;)z[re]=T[re];return z}function ki(T,z,re,pe){re||(re={});for(var Be=-1,Oe=z.length;++Be<Oe;){var je=z[Be],Ue=pe?pe(re[je],T[je],je,re,T):void 0;Ko(re,je,Ue===void 0?T[je]:Ue)}return re}function Nl(T,z){return ki(T,Sn(T),z)}function Pl(T){return Sl(T,Ii,Sn)}function Er(T,z){var re=T.__data__;return jl(z)?re[typeof z=="string"?"string":"hash"]:re.map}function rn(T,z){var re=P(T,z);return Tl(re)?re:void 0}var Sn=Bt?fe(Bt,Object):Ul,In=Il;(st&&In(new st(new ArrayBuffer(1)))!=S||Mt&&In(new Mt)!=l||qt&&In(qt.resolve())!=g||kn&&In(new kn)!=m||gr&&In(new gr)!=x)&&(In=function(T){var z=_e.call(T),re=z==p?T.constructor:void 0,pe=re?Et(re):void 0;if(pe)switch(pe){case mr:return S;case On:return l;case yr:return g;case Wn:return m;case xr:return x}return z});function Ml(T){var z=T.length,re=T.constructor(z);return z&&typeof T[0]=="string"&&ye.call(T,"index")&&(re.index=T.index,re.input=T.input),re}function xn(T){return typeof T.constructor=="function"&&!Go(T)?Ol(Te(T)):{}}function ql(T,z,re,pe){var Be=T.constructor;switch(z){case C:return Ai(T);case s:case u:return new Be(+T);case S:return wr(T,pe);case A:case I:case B:case O:case E:case k:case R:case F:case q:return Ll(T,pe);case l:return Xo(T,pe,re);case h:case y:return new Be(T);case d:return Wo(T);case m:return Dl(T,pe,re);case _:return Rl(T)}}function $l(T,z){return z=z??i,!!z&&(typeof T=="number"||Q.test(T))&&T>-1&&T%1==0&&T<z}function jl(T){var z=typeof T;return z=="string"||z=="number"||z=="symbol"||z=="boolean"?T!=="__proto__":T===null}function Hl(T){return!!ae&&ae in T}function Go(T){var z=T&&T.constructor,re=typeof z=="function"&&z.prototype||le;return T===re}function Et(T){if(T!=null){try{return ve.call(T)}catch{}try{return T+""}catch{}}return""}function Qo(T){return Ei(T,!0,!0)}function Zo(T,z){return T===z||T!==T&&z!==z}function Hr(T){return Vl(T)&&ye.call(T,"callee")&&(!dt.call(T,"callee")||_e.call(T)==o)}var Oi=Array.isArray;function Vr(T){return T!=null&&Yo(T.length)&&!Si(T)}function Vl(T){return ea(T)&&Vr(T)}var Jo=Vt||zl;function Si(T){var z=_n(T)?_e.call(T):"";return z==c||z==v}function Yo(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=i}function _n(T){var z=typeof T;return!!T&&(z=="object"||z=="function")}function ea(T){return!!T&&typeof T=="object"}function Ii(T){return Vr(T)?qr(T):Bl(T)}function Ul(){return[]}function zl(){return!1}e.exports=Qo}(Lo,Lo.exports);var j0=Lo.exports,Fo={exports:{}};Fo.exports,function(e,n){var t=200,r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",u="[object Array]",f="[object AsyncFunction]",c="[object Boolean]",v="[object Date]",l="[object Error]",h="[object Function]",p="[object GeneratorFunction]",g="[object Map]",d="[object Number]",m="[object Null]",y="[object Object]",_="[object Promise]",x="[object Proxy]",C="[object RegExp]",S="[object Set]",A="[object String]",I="[object Symbol]",B="[object Undefined]",O="[object WeakMap]",E="[object ArrayBuffer]",k="[object DataView]",R="[object Float32Array]",F="[object Float64Array]",q="[object Int8Array]",Z="[object Int16Array]",ee="[object Int32Array]",ne="[object Uint8Array]",Q="[object Uint8ClampedArray]",N="[object Uint16Array]",w="[object Uint32Array]",D=/[\\^$.*+?()[\]{}|]/g,L=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,G={};G[R]=G[F]=G[q]=G[Z]=G[ee]=G[ne]=G[Q]=G[N]=G[w]=!0,G[s]=G[u]=G[E]=G[c]=G[k]=G[v]=G[l]=G[h]=G[g]=G[d]=G[y]=G[C]=G[S]=G[A]=G[O]=!1;var j=typeof Se=="object"&&Se&&Se.Object===Object&&Se,W=typeof self=="object"&&self&&self.Object===Object&&self,M=j||W||Function("return this")(),H=n&&!n.nodeType&&n,V=H&&!0&&e&&!e.nodeType&&e,K=V&&V.exports===H,J=K&&j.process,P=function(){try{return J&&J.binding&&J.binding("util")}catch{}}(),X=P&&P.isTypedArray;function se(T,z){for(var re=-1,pe=T==null?0:T.length,Be=0,Oe=[];++re<pe;){var je=T[re];z(je,re,T)&&(Oe[Be++]=je)}return Oe}function fe(T,z){for(var re=-1,pe=z.length,Be=T.length;++re<pe;)T[Be+re]=z[re];return T}function ue(T,z){for(var re=-1,pe=T==null?0:T.length;++re<pe;)if(z(T[re],re,T))return!0;return!1}function ie(T,z){for(var re=-1,pe=Array(T);++re<T;)pe[re]=z(re);return pe}function oe(T){return function(z){return T(z)}}function le(T,z){return T.has(z)}function ce(T,z){return T==null?void 0:T[z]}function ae(T){var z=-1,re=Array(T.size);return T.forEach(function(pe,Be){re[++z]=[Be,pe]}),re}function ve(T,z){return function(re){return T(z(re))}}function ye(T){var z=-1,re=Array(T.size);return T.forEach(function(pe){re[++z]=pe}),re}var _e=Array.prototype,Ce=Function.prototype,Ae=Object.prototype,Ee=M["__core-js_shared__"],$e=Ce.toString,Te=Ae.hasOwnProperty,Ke=function(){var T=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""}(),dt=Ae.toString,Xn=RegExp("^"+$e.call(Te).replace(D,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bt=K?M.Buffer:void 0,Vt=M.Symbol,it=M.Uint8Array,st=Ae.propertyIsEnumerable,Mt=_e.splice,qt=Vt?Vt.toStringTag:void 0,kn=Object.getOwnPropertySymbols,gr=Bt?Bt.isBuffer:void 0,gn=ve(Object.keys,Object),mr=Sn(M,"DataView"),On=Sn(M,"Map"),yr=Sn(M,"Promise"),Wn=Sn(M,"Set"),xr=Sn(M,"WeakMap"),mn=Sn(Object,"create"),_r=Et(mr),nn=Et(On),Mr=Et(yr),ht=Et(Wn),Ut=Et(xr),br=Vt?Vt.prototype:void 0,Cr=br?br.valueOf:void 0;function pt(T){var z=-1,re=T==null?0:T.length;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function dl(){this.__data__=mn?mn(null):{},this.size=0}function hl(T){var z=this.has(T)&&delete this.__data__[T];return this.size-=z?1:0,z}function pl(T){var z=this.__data__;if(mn){var re=z[T];return re===r?void 0:re}return Te.call(z,T)?z[T]:void 0}function vl(T){var z=this.__data__;return mn?z[T]!==void 0:Te.call(z,T)}function gl(T,z){var re=this.__data__;return this.size+=this.has(T)?0:1,re[T]=mn&&z===void 0?r:z,this}pt.prototype.clear=dl,pt.prototype.delete=hl,pt.prototype.get=pl,pt.prototype.has=vl,pt.prototype.set=gl;function xt(T){var z=-1,re=T==null?0:T.length;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function ml(){this.__data__=[],this.size=0}function yl(T){var z=this.__data__,re=jr(z,T);if(re<0)return!1;var pe=z.length-1;return re==pe?z.pop():Mt.call(z,re,1),--this.size,!0}function xl(T){var z=this.__data__,re=jr(z,T);return re<0?void 0:z[re][1]}function _l(T){return jr(this.__data__,T)>-1}function bl(T,z){var re=this.__data__,pe=jr(re,T);return pe<0?(++this.size,re.push([T,z])):re[pe][1]=z,this}xt.prototype.clear=ml,xt.prototype.delete=yl,xt.prototype.get=xl,xt.prototype.has=_l,xt.prototype.set=bl;function Dt(T){var z=-1,re=T==null?0:T.length;for(this.clear();++z<re;){var pe=T[z];this.set(pe[0],pe[1])}}function Cl(){this.size=0,this.__data__={hash:new pt,map:new(On||xt),string:new pt}}function wl(T){var z=rn(this,T).delete(T);return this.size-=z?1:0,z}function El(T){return rn(this,T).get(T)}function Al(T){return rn(this,T).has(T)}function kl(T,z){var re=rn(this,T),pe=re.size;return re.set(T,z),this.size+=re.size==pe?0:1,this}Dt.prototype.clear=Cl,Dt.prototype.delete=wl,Dt.prototype.get=El,Dt.prototype.has=Al,Dt.prototype.set=kl;function qr(T){var z=-1,re=T==null?0:T.length;for(this.__data__=new Dt;++z<re;)this.add(T[z])}function Ko(T){return this.__data__.set(T,r),this}function $r(T){return this.__data__.has(T)}qr.prototype.add=qr.prototype.push=Ko,qr.prototype.has=$r;function yn(T){var z=this.__data__=new xt(T);this.size=z.size}function Ei(){this.__data__=new xt,this.size=0}function Ol(T){var z=this.__data__,re=z.delete(T);return this.size=z.size,re}function Sl(T){return this.__data__.get(T)}function Il(T){return this.__data__.has(T)}function Tl(T,z){var re=this.__data__;if(re instanceof xt){var pe=re.__data__;if(!On||pe.length<t-1)return pe.push([T,z]),this.size=++re.size,this;re=this.__data__=new Dt(pe)}return re.set(T,z),this.size=re.size,this}yn.prototype.clear=Ei,yn.prototype.delete=Ol,yn.prototype.get=Sl,yn.prototype.has=Il,yn.prototype.set=Tl;function Bl(T,z){var re=Hr(T),pe=!re&&Zo(T),Be=!re&&!pe&&Vr(T),Oe=!re&&!pe&&!Be&&ea(T),je=re||pe||Be||Oe,Ue=je?ie(T.length,String):[],ot=Ue.length;for(var Xe in T)(z||Te.call(T,Xe))&&!(je&&(Xe=="length"||Be&&(Xe=="offset"||Xe=="parent")||Oe&&(Xe=="buffer"||Xe=="byteLength"||Xe=="byteOffset")||ql(Xe,ot)))&&Ue.push(Xe);return Ue}function jr(T,z){for(var re=T.length;re--;)if(Qo(T[re][0],z))return re;return-1}function Ai(T,z,re){var pe=z(T);return Hr(T)?pe:fe(pe,re(T))}function wr(T){return T==null?T===void 0?B:m:qt&&qt in Object(T)?In(T):Go(T)}function Xo(T){return _n(T)&&wr(T)==s}function Wo(T,z,re,pe,Be){return T===z?!0:T==null||z==null||!_n(T)&&!_n(z)?T!==T&&z!==z:Dl(T,z,re,pe,Wo,Be)}function Dl(T,z,re,pe,Be,Oe){var je=Hr(T),Ue=Hr(z),ot=je?u:xn(T),Xe=Ue?u:xn(z);ot=ot==s?y:ot,Xe=Xe==s?y:Xe;var _t=ot==y,Rt=Xe==y,lt=ot==Xe;if(lt&&Vr(T)){if(!Vr(z))return!1;je=!0,_t=!1}if(lt&&!_t)return Oe||(Oe=new yn),je||ea(T)?ki(T,z,re,pe,Be,Oe):Nl(T,z,ot,re,pe,Be,Oe);if(!(re&i)){var bt=_t&&Te.call(T,"__wrapped__"),vt=Rt&&Te.call(z,"__wrapped__");if(bt||vt){var Gn=bt?T.value():T,Tn=vt?z.value():z;return Oe||(Oe=new yn),Be(Gn,Tn,re,pe,Oe)}}return lt?(Oe||(Oe=new yn),Pl(T,z,re,pe,Be,Oe)):!1}function Rl(T){if(!Yo(T)||jl(T))return!1;var z=Jo(T)?Xn:L;return z.test(Et(T))}function Ll(T){return _n(T)&&Si(T.length)&&!!G[wr(T)]}function Fl(T){if(!Hl(T))return gn(T);var z=[];for(var re in Object(T))Te.call(T,re)&&re!="constructor"&&z.push(re);return z}function ki(T,z,re,pe,Be,Oe){var je=re&i,Ue=T.length,ot=z.length;if(Ue!=ot&&!(je&&ot>Ue))return!1;var Xe=Oe.get(T);if(Xe&&Oe.get(z))return Xe==z;var _t=-1,Rt=!0,lt=re&o?new qr:void 0;for(Oe.set(T,z),Oe.set(z,T);++_t<Ue;){var bt=T[_t],vt=z[_t];if(pe)var Gn=je?pe(vt,bt,_t,z,T,Oe):pe(bt,vt,_t,T,z,Oe);if(Gn!==void 0){if(Gn)continue;Rt=!1;break}if(lt){if(!ue(z,function(Tn,Ar){if(!le(lt,Ar)&&(bt===Tn||Be(bt,Tn,re,pe,Oe)))return lt.push(Ar)})){Rt=!1;break}}else if(!(bt===vt||Be(bt,vt,re,pe,Oe))){Rt=!1;break}}return Oe.delete(T),Oe.delete(z),Rt}function Nl(T,z,re,pe,Be,Oe,je){switch(re){case k:if(T.byteLength!=z.byteLength||T.byteOffset!=z.byteOffset)return!1;T=T.buffer,z=z.buffer;case E:return!(T.byteLength!=z.byteLength||!Oe(new it(T),new it(z)));case c:case v:case d:return Qo(+T,+z);case l:return T.name==z.name&&T.message==z.message;case C:case A:return T==z+"";case g:var Ue=ae;case S:var ot=pe&i;if(Ue||(Ue=ye),T.size!=z.size&&!ot)return!1;var Xe=je.get(T);if(Xe)return Xe==z;pe|=o,je.set(T,z);var _t=ki(Ue(T),Ue(z),pe,Be,Oe,je);return je.delete(T),_t;case I:if(Cr)return Cr.call(T)==Cr.call(z)}return!1}function Pl(T,z,re,pe,Be,Oe){var je=re&i,Ue=Er(T),ot=Ue.length,Xe=Er(z),_t=Xe.length;if(ot!=_t&&!je)return!1;for(var Rt=ot;Rt--;){var lt=Ue[Rt];if(!(je?lt in z:Te.call(z,lt)))return!1}var bt=Oe.get(T);if(bt&&Oe.get(z))return bt==z;var vt=!0;Oe.set(T,z),Oe.set(z,T);for(var Gn=je;++Rt<ot;){lt=Ue[Rt];var Tn=T[lt],Ar=z[lt];if(pe)var td=je?pe(Ar,Tn,lt,z,T,Oe):pe(Tn,Ar,lt,T,z,Oe);if(!(td===void 0?Tn===Ar||Be(Tn,Ar,re,pe,Oe):td)){vt=!1;break}Gn||(Gn=lt=="constructor")}if(vt&&!Gn){var ta=T.constructor,na=z.constructor;ta!=na&&"constructor"in T&&"constructor"in z&&!(typeof ta=="function"&&ta instanceof ta&&typeof na=="function"&&na instanceof na)&&(vt=!1)}return Oe.delete(T),Oe.delete(z),vt}function Er(T){return Ai(T,Ii,Ml)}function rn(T,z){var re=T.__data__;return $l(z)?re[typeof z=="string"?"string":"hash"]:re.map}function Sn(T,z){var re=ce(T,z);return Rl(re)?re:void 0}function In(T){var z=Te.call(T,qt),re=T[qt];try{T[qt]=void 0;var pe=!0}catch{}var Be=dt.call(T);return pe&&(z?T[qt]=re:delete T[qt]),Be}var Ml=kn?function(T){return T==null?[]:(T=Object(T),se(kn(T),function(z){return st.call(T,z)}))}:Ul,xn=wr;(mr&&xn(new mr(new ArrayBuffer(1)))!=k||On&&xn(new On)!=g||yr&&xn(yr.resolve())!=_||Wn&&xn(new Wn)!=S||xr&&xn(new xr)!=O)&&(xn=function(T){var z=wr(T),re=z==y?T.constructor:void 0,pe=re?Et(re):"";if(pe)switch(pe){case _r:return k;case nn:return g;case Mr:return _;case ht:return S;case Ut:return O}return z});function ql(T,z){return z=z??a,!!z&&(typeof T=="number"||$.test(T))&&T>-1&&T%1==0&&T<z}function $l(T){var z=typeof T;return z=="string"||z=="number"||z=="symbol"||z=="boolean"?T!=="__proto__":T===null}function jl(T){return!!Ke&&Ke in T}function Hl(T){var z=T&&T.constructor,re=typeof z=="function"&&z.prototype||Ae;return T===re}function Go(T){return dt.call(T)}function Et(T){if(T!=null){try{return $e.call(T)}catch{}try{return T+""}catch{}}return""}function Qo(T,z){return T===z||T!==T&&z!==z}var Zo=Xo(function(){return arguments}())?Xo:function(T){return _n(T)&&Te.call(T,"callee")&&!st.call(T,"callee")},Hr=Array.isArray;function Oi(T){return T!=null&&Si(T.length)&&!Jo(T)}var Vr=gr||zl;function Vl(T,z){return Wo(T,z)}function Jo(T){if(!Yo(T))return!1;var z=wr(T);return z==h||z==p||z==f||z==x}function Si(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=a}function Yo(T){var z=typeof T;return T!=null&&(z=="object"||z=="function")}function _n(T){return T!=null&&typeof T=="object"}var ea=X?oe(X):Ll;function Ii(T){return Oi(T)?Bl(T):Fl(T)}function Ul(){return[]}function zl(){return!1}e.exports=Vl}(Fo,Fo.exports);var H0=Fo.exports,ms={},V0=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ms,"__esModule",{value:!0});var H8=V0(j0),V8=V0(H0),ys;(function(e){function n(o,a,s){o===void 0&&(o={}),a===void 0&&(a={}),typeof o!="object"&&(o={}),typeof a!="object"&&(a={});var u=H8.default(a);s||(u=Object.keys(u).reduce(function(c,v){return u[v]!=null&&(c[v]=u[v]),c},{}));for(var f in o)o[f]!==void 0&&a[f]===void 0&&(u[f]=o[f]);return Object.keys(u).length>0?u:void 0}e.compose=n;function t(o,a){o===void 0&&(o={}),a===void 0&&(a={}),typeof o!="object"&&(o={}),typeof a!="object"&&(a={});var s=Object.keys(o).concat(Object.keys(a)).reduce(function(u,f){return V8.default(o[f],a[f])||(u[f]=a[f]===void 0?null:a[f]),u},{});return Object.keys(s).length>0?s:void 0}e.diff=t;function r(o,a){o===void 0&&(o={}),a===void 0&&(a={}),o=o||{};var s=Object.keys(a).reduce(function(u,f){return a[f]!==o[f]&&o[f]!==void 0&&(u[f]=a[f]),u},{});return Object.keys(o).reduce(function(u,f){return o[f]!==a[f]&&a[f]===void 0&&(u[f]=null),u},s)}e.invert=r;function i(o,a,s){if(s===void 0&&(s=!1),typeof o!="object")return a;if(typeof a=="object"){if(!s)return a;var u=Object.keys(a).reduce(function(f,c){return o[c]===void 0&&(f[c]=a[c]),f},{});return Object.keys(u).length>0?u:void 0}}e.transform=i})(ys||(ys={})),ms.default=ys;var No={},Po={},U0;function U8(){if(U0)return Po;U0=1;var e=Se&&Se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Po,"__esModule",{value:!0});var n=e(K0()),t=function(){function r(i){this.ops=i,this.index=0,this.offset=0}return r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(i){i||(i=1/0);var o=this.ops[this.index];if(o){var a=this.offset,s=n.default.length(o);if(i>=s-a?(i=s-a,this.index+=1,this.offset=0):this.offset+=i,typeof o.delete=="number")return{delete:i};var u={};return o.attributes&&(u.attributes=o.attributes),typeof o.retain=="number"?u.retain=i:typeof o.insert=="string"?u.insert=o.insert.substr(a,i):u.insert=o.insert,u}else return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},r.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var i=this.offset,o=this.index,a=this.next(),s=this.ops.slice(this.index);return this.offset=i,this.index=o,[a].concat(s)}else return[]},r}();return Po.default=t,Po}var z0;function K0(){if(z0)return No;z0=1;var e=Se&&Se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(No,"__esModule",{value:!0});var n=e(U8()),t;return function(r){function i(a){return new n.default(a)}r.iterator=i;function o(a){return typeof a.delete=="number"?a.delete:typeof a.retain=="number"?a.retain:typeof a.insert=="string"?a.insert.length:1}r.length=o}(t||(t={})),No.default=t,No}var mi=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Mo=mi(j8),z8=mi(j0),xs=mi(H0),yi=mi(ms),ft=mi(K0()),K8="\0",X8=function(){function e(n){Array.isArray(n)?this.ops=n:n!=null&&Array.isArray(n.ops)?this.ops=n.ops:this.ops=[]}return e.prototype.insert=function(n,t){var r={};return typeof n=="string"&&n.length===0?this:(r.insert=n,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))},e.prototype.delete=function(n){return n<=0?this:this.push({delete:n})},e.prototype.retain=function(n,t){if(n<=0)return this;var r={retain:n};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)},e.prototype.push=function(n){var t=this.ops.length,r=this.ops[t-1];if(n=z8.default(n),typeof r=="object"){if(typeof n.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+n.delete},this;if(typeof r.delete=="number"&&n.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(n),this;if(xs.default(n.attributes,r.attributes)){if(typeof n.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+n.insert},typeof n.attributes=="object"&&(this.ops[t-1].attributes=n.attributes),this;if(typeof n.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+n.retain},typeof n.attributes=="object"&&(this.ops[t-1].attributes=n.attributes),this}}return t===this.ops.length?this.ops.push(n):this.ops.splice(t,0,n),this},e.prototype.chop=function(){var n=this.ops[this.ops.length-1];return n&&n.retain&&!n.attributes&&this.ops.pop(),this},e.prototype.filter=function(n){return this.ops.filter(n)},e.prototype.forEach=function(n){this.ops.forEach(n)},e.prototype.map=function(n){return this.ops.map(n)},e.prototype.partition=function(n){var t=[],r=[];return this.forEach(function(i){var o=n(i)?t:r;o.push(i)}),[t,r]},e.prototype.reduce=function(n,t){return this.ops.reduce(n,t)},e.prototype.changeLength=function(){return this.reduce(function(n,t){return t.insert?n+ft.default.length(t):t.delete?n-t.delete:n},0)},e.prototype.length=function(){return this.reduce(function(n,t){return n+ft.default.length(t)},0)},e.prototype.slice=function(n,t){n===void 0&&(n=0),t===void 0&&(t=1/0);for(var r=[],i=ft.default.iterator(this.ops),o=0;o<t&&i.hasNext();){var a=void 0;o<n?a=i.next(n-o):(a=i.next(t-o),r.push(a)),o+=ft.default.length(a)}return new e(r)},e.prototype.compose=function(n){var t=ft.default.iterator(this.ops),r=ft.default.iterator(n.ops),i=[],o=r.peek();if(o!=null&&typeof o.retain=="number"&&o.attributes==null){for(var a=o.retain;t.peekType()==="insert"&&t.peekLength()<=a;)a-=t.peekLength(),i.push(t.next());o.retain-a>0&&r.next(o.retain-a)}for(var s=new e(i);t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{var u=Math.min(t.peekLength(),r.peekLength()),f=t.next(u),c=r.next(u);if(typeof c.retain=="number"){var v={};typeof f.retain=="number"?v.retain=u:v.insert=f.insert;var l=yi.default.compose(f.attributes,c.attributes,typeof f.retain=="number");if(l&&(v.attributes=l),s.push(v),!r.hasNext()&&xs.default(s.ops[s.ops.length-1],v)){var h=new e(t.rest());return s.concat(h).chop()}}else typeof c.delete=="number"&&typeof f.retain=="number"&&s.push(c)}return s.chop()},e.prototype.concat=function(n){var t=new e(this.ops.slice());return n.ops.length>0&&(t.push(n.ops[0]),t.ops=t.ops.concat(n.ops.slice(1))),t},e.prototype.diff=function(n,t){if(this.ops===n.ops)return new e;var r=[this,n].map(function(u){return u.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:K8;var c=u===n?"on":"with";throw new Error("diff() called "+c+" non-document")}).join("")}),i=new e,o=Mo.default(r[0],r[1],t),a=ft.default.iterator(this.ops),s=ft.default.iterator(n.ops);return o.forEach(function(u){for(var f=u[1].length;f>0;){var c=0;switch(u[0]){case Mo.default.INSERT:c=Math.min(s.peekLength(),f),i.push(s.next(c));break;case Mo.default.DELETE:c=Math.min(f,a.peekLength()),a.next(c),i.delete(c);break;case Mo.default.EQUAL:c=Math.min(a.peekLength(),s.peekLength(),f);var v=a.next(c),l=s.next(c);xs.default(v.insert,l.insert)?i.retain(c,yi.default.diff(v.attributes,l.attributes)):i.push(l).delete(c);break}f-=c}}),i.chop()},e.prototype.eachLine=function(n,t){t===void 0&&(t=`
74
74
  `);for(var r=ft.default.iterator(this.ops),i=new e,o=0;r.hasNext();){if(r.peekType()!=="insert")return;var a=r.peek(),s=ft.default.length(a)-r.peekLength(),u=typeof a.insert=="string"?a.insert.indexOf(t,s)-s:-1;if(u<0)i.push(r.next());else if(u>0)i.push(r.next(u));else{if(n(i,r.next(1).attributes||{},o)===!1)return;o+=1,i=new e}}i.length()>0&&n(i,{},o)},e.prototype.invert=function(n){var t=new e;return this.reduce(function(r,i){if(i.insert)t.delete(ft.default.length(i));else{if(i.retain&&i.attributes==null)return t.retain(i.retain),r+i.retain;if(i.delete||i.retain&&i.attributes){var o=i.delete||i.retain,a=n.slice(r,r+o);return a.forEach(function(s){i.delete?t.push(s):i.retain&&i.attributes&&t.retain(ft.default.length(s),yi.default.invert(i.attributes,s.attributes))}),r+o}}return r},0),t.chop()},e.prototype.transform=function(n,t){if(t===void 0&&(t=!1),t=!!t,typeof n=="number")return this.transformPosition(n,t);for(var r=n,i=ft.default.iterator(this.ops),o=ft.default.iterator(r.ops),a=new e;i.hasNext()||o.hasNext();)if(i.peekType()==="insert"&&(t||o.peekType()!=="insert"))a.retain(ft.default.length(i.next()));else if(o.peekType()==="insert")a.push(o.next());else{var s=Math.min(i.peekLength(),o.peekLength()),u=i.next(s),f=o.next(s);if(u.delete)continue;f.delete?a.push(f):a.retain(s,yi.default.transform(u.attributes,f.attributes,t))}return a.chop()},e.prototype.transformPosition=function(n,t){t===void 0&&(t=!1),t=!!t;for(var r=ft.default.iterator(this.ops),i=0;r.hasNext()&&i<=n;){var o=r.peekLength(),a=r.peekType();if(r.next(),a==="delete"){n-=Math.min(o,n-i);continue}else a==="insert"&&(i<n||!t)&&(n+=o);i+=o}return n},e.Op=ft.default,e.AttributeMap=yi.default,e}(),W8=X8;const G8=ds(W8);/*!
75
75
  * VueQuill @vueup/vue-quill v1.2.0
76
76
  * https://vueup.github.io/vue-quill/
@@ -83,7 +83,7 @@
83
83
  * Date: 2023-05-12T08:44:03.742Z
84
84
  */const X0={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},Q8=Pc({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:e=>["delta","html","text"].includes(e)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:e=>["snow","bubble",""].includes(e)},toolbar:{type:[String,Array,Object],required:!1,validator:e=>typeof e=="string"&&e!==""?e.charAt(0)==="#"?!0:Object.keys(X0).indexOf(e)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(e,n)=>{Nt(()=>{o()}),Zi(()=>{t=null});let t,r;const i=te(),o=()=>{var E;if(i.value){if(r=a(),e.modules)if(Array.isArray(e.modules))for(const k of e.modules)hs.register(`modules/${k.name}`,k.module);else hs.register(`modules/${e.modules.name}`,e.modules.module);t=new hs(i.value,r),_(e.content),t.on("text-change",v),t.on("selection-change",h),t.on("editor-change",p),e.theme!=="bubble"&&i.value.classList.remove("ql-bubble"),e.theme!=="snow"&&i.value.classList.remove("ql-snow"),(E=t.getModule("toolbar"))===null||E===void 0||E.container.addEventListener("mousedown",k=>{k.preventDefault()}),n.emit("ready",t)}},a=()=>{const E={};if(e.theme!==""&&(E.theme=e.theme),e.readOnly&&(E.readOnly=e.readOnly),e.placeholder&&(E.placeholder=e.placeholder),e.toolbar&&e.toolbar!==""&&(E.modules={toolbar:(()=>{if(typeof e.toolbar=="object")return e.toolbar;if(typeof e.toolbar=="string")return e.toolbar.charAt(0)==="#"?e.toolbar:X0[e.toolbar]})()}),e.modules){const k=(()=>{var R,F;const q={};if(Array.isArray(e.modules))for(const Z of e.modules)q[Z.name]=(R=Z.options)!==null&&R!==void 0?R:{};else q[e.modules.name]=(F=e.modules.options)!==null&&F!==void 0?F:{};return q})();E.modules=Object.assign({},E.modules,k)}return Object.assign({},e.globalOptions,e.options,E)},s=E=>typeof E=="object"&&E?E.slice():E,u=E=>Object.values(E.ops).some(k=>!k.retain||Object.keys(k).length!==1);let f;const c=E=>{if(typeof f==typeof E){if(E===f)return!0;if(typeof E=="object"&&E&&typeof f=="object"&&f)return!u(f.diff(E))}return!1},v=(E,k,R)=>{f=s(y()),c(e.content)||n.emit("update:content",f),n.emit("textChange",{delta:E,oldContents:k,source:R})},l=te(),h=(E,k,R)=>{l.value=!!(t!=null&&t.hasFocus()),n.emit("selectionChange",{range:E,oldRange:k,source:R})};Ye(l,E=>{E?n.emit("focus",i):n.emit("blur",i)});const p=(...E)=>{E[0]==="text-change"&&n.emit("editorChange",{name:E[0],delta:E[1],oldContents:E[2],source:E[3]}),E[0]==="selection-change"&&n.emit("editorChange",{name:E[0],range:E[1],oldRange:E[2],source:E[3]})},g=()=>i.value,d=()=>{var E;return(E=t==null?void 0:t.getModule("toolbar"))===null||E===void 0?void 0:E.container},m=()=>{if(t)return t;throw`The quill editor hasn't been instantiated yet,
85
85
  make sure to call this method when the editor ready
86
- or use v-on:ready="onReady(quill)" event instead.`},y=(E,k)=>e.contentType==="html"?S():e.contentType==="text"?x(E,k):t==null?void 0:t.getContents(E,k),_=(E,k="api")=>{const R=E||(e.contentType==="delta"?new G8:"");e.contentType==="html"?A(R):e.contentType==="text"?C(R,k):t==null||t.setContents(R,k),f=s(R)},x=(E,k)=>{var R;return(R=t==null?void 0:t.getText(E,k))!==null&&R!==void 0?R:""},C=(E,k="api")=>{t==null||t.setText(E,k)},S=()=>{var E;return(E=t==null?void 0:t.root.innerHTML)!==null&&E!==void 0?E:""},A=E=>{t&&(t.root.innerHTML=E)},I=(E,k="api")=>{const R=t==null?void 0:t.clipboard.convert(E);R&&(t==null||t.setContents(R,k))},B=()=>{t==null||t.focus()},O=()=>{sn(()=>{var E;!n.slots.toolbar&&t&&((E=t.getModule("toolbar"))===null||E===void 0||E.container.remove()),o()})};return Ye(()=>e.content,E=>{if(!t||!E||c(E))return;const k=t.getSelection();k&&sn(()=>t==null?void 0:t.setSelection(k)),_(E)},{deep:!0}),Ye(()=>e.enable,E=>{t&&t.enable(E)}),{editor:i,getEditor:g,getToolbar:d,getQuill:m,getContents:y,setContents:_,getHTML:S,setHTML:A,pasteHTML:I,focus:B,getText:x,setText:C,reinit:O}},render(){var e,n;return[(n=(e=this.$slots).toolbar)===null||n===void 0?void 0:n.call(e),eh("div",{ref:"editor",...this.$attrs})]}}),Z8={class:"input"},J8=["for","data-test-id"],Y8=["data-test-id"],ep=Le({__name:"RichTextEditor",props:{modelValue:{type:String,default:""},editorOptions:{type:Object,default:()=>({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"})},dataTestId:{type:String,default:""},label:{type:String,default:""},required:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["update:modelValue"],setup(e){const n=e,t=me(()=>typeof n.error=="string"?n.error:n.error===""?!1:n.error===!0?`${n.label||"Field"} is required`:n.error),r=te("");return qn(()=>{r.value=n.modelValue}),(i,o)=>(U(),Y("div",Z8,[e.label?(U(),Y("label",{key:0,class:we({error_color:!!e.error}),for:e.label,"data-test-id":`${e.dataTestId}-label`},[Ne(xe(e.label)+" ",1),e.required?(U(),Y("span",{key:0,class:we({error_color:!!e.error})},"*",2)):ge("",!0)],10,J8)):ge("",!0),he(Fe(Q8),{"content-type":"html",toolbar:e.editorOptions,"model-value":e.modelValue,"data-test-id":e.dataTestId,content:r.value,"onUpdate:content":o[0]||(o[0]=a=>i.$emit("update:modelValue",a))},null,8,["toolbar","model-value","data-test-id","content"]),t.value?(U(),Y("div",{key:1,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${e.dataTestId}-error`},xe(t.value),9,Y8)):ge("",!0)]))}},[["__scopeId","data-v-76aecac0"]]),tp={class:"ect-w-full ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-rounded-md ect-border-1 ect-border-gray-200 md:ect-gap-5 lg:ect-gap-6","data-test-id":"configurator-inputs-container"},np={key:0,class:"ect-text-sm ect-font-regular ect-text-gray-900"},rp={class:"ect-grid ect-grid-cols-1 sm:ect-grid-cols-2 ect-gap-4"},ip={key:0,class:"ect-col-span-2"},op=["data-test-id"],ap=["id","onUpdate:modelValue","disabled","data-test-id"],sp=["for","data-test-id"],lp={key:2,class:"quill-editor-styles"},cp=b("div",{class:"dropdowntp"},null,-1),up=b("div",{id:"modals"},null,-1),W0={__name:"InputsContainer",props:{title:{type:String,default:""},lookup:{type:Object,default:()=>null},attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(e){const n=dn(),t=e,r=te({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"}),i=te(t.lookup),o=me(()=>{const u=t.lookup.relatedFields.map(f=>f.child);return u.push("Name"),u});function a(u,f){const c=f.options.find(v=>v.Id===u);u===null?(f.options=[],f.value=null,f.relatedFields.forEach(v=>{v.value=null})):(f.value=c.Name,f.relatedFields.forEach(v=>{v.value=c[v.child]}))}const s=or(async function(u,f){f.loading=!0;const c={objectType:f.referenceObject,searchText:u||"",lstFields:o.value||[]},v=await n.getRecords(c);f.options=v,f.loading=!1});return(u,f)=>(U(),Y(be,null,[b("div",tp,[e.title?(U(),Y("div",np,xe(e.title),1)):ge("",!0),b("div",rp,[i.value?(U(),Y("div",ip,[he(R0,{modelValue:i.value.referenceRecordId,"onUpdate:modelValue":[f[0]||(f[0]=c=>i.value.referenceRecordId=c),f[1]||(f[1]=c=>a(c,i.value))],"data-test-id":`configurator-inputs-lookup-${i.value.attRecordId??u.index}`,label:i.value.label,options:i.value.options,disabled:!i.value.editable,required:i.value.required,loading:i.value.loading,property:{key:"Id",value:"Name"},lookup:"",search:"",highlight:"",onSearch:f[2]||(f[2]=c=>Fe(s)(c,i.value))},null,8,["modelValue","data-test-id","label","options","disabled","required","loading"])])):ge("",!0),(U(!0),Y(be,null,Me(e.attributes,(c,v)=>(U(),Y("div",{key:v,class:"attribute-input"},[c.dataType==="PICKLIST"||c.dataType==="MULTIPICKLIST"?(U(),ke(R0,{key:0,modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,placeholder:c.label,disabled:!c.editable,options:c.picklistValues.map(l=>({label:l,value:l})),select:"",highlight:"","data-test-id":`configurator-inputs-dropdown-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","placeholder","disabled","options","data-test-id"])):c.dataType==="BOOLEAN"?(U(),Y("div",{key:1,class:"ect-flex ect-items-center ect-gap-3 ect-py-3.5","data-test-id":`configurator-inputs-checkbox-${c.attRecordId??u.index}`},[ln(b("input",{id:`checkbox-${c.attRecordId??u.index}`,"onUpdate:modelValue":l=>c.value=l,type:"checkbox",disabled:!c.editable,class:"ect-w-4 ect-h-4 ect-accent-success ect-border-gray-300 ect-rounded ect-text-text-success focus:ect-ring-green-500","data-test-id":`configurator-inputs-checkbox-input-${c.attRecordId??u.index}`},null,8,ap),[[Va,c.value]]),b("label",{for:`checkbox-${c.attRecordId??u.index}`,class:"ect-text-sm ect-font-medium ect-text-gray-900 ect-cursor-pointer","data-test-id":`configurator-inputs-checkbox-label-${c.attRecordId??u.index}`},xe(c.label),9,sp)],8,op)):c.dataType==="TEXTAREA"?(U(),Y("div",lp,[he(ep,{modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,required:c.required,"editor-options":r.value,"data-test-id":`configurator-inputs-textarea-quill-editor-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","required","editor-options","data-test-id"])])):(U(),ke(c8,{key:3,modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,disabled:!c.editable,highlight:"","data-test-id":`configurator-inputs-custom-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","disabled","data-test-id"]))]))),128))])]),cp,up],64))}},fp={class:"ect-w-full ect-flex ect-flex-col ect-gap-4","data-test-id":"configurator-inputs-container"},dp={class:"ect-bg-white ect-rounded-lg"},_s={__name:"AttributesContainer",props:{attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(e){const n=e,t=te([]),r=te([]),i=te({});return qn(()=>{const o={},a=[...n.attributes];a.forEach(u=>{u.dataType==="REFERENCE"&&(i.value[u.apiName]=["Name"],u.relatedFields=[],o[u.apiName]=u),u.editable=u.editable&&!u.apiName.includes(".")});let s=null;a.forEach(u=>{if(u.referenceObject==="XX_Base__Location__c"&&(s?u.firstLookup="Copy from "+s.label:s=u),u.apiName.includes(".")){const[f,c]=u.apiName.split(".");u.parent=f,u.child=c,i.value[f]!=null&&(i.value[f].push(c),o[f].relatedFields.push(u))}}),r.value=a.filter(u=>u.dataType==="REFERENCE"),t.value=a.filter(u=>!(u.apiName.includes(".")||u.dataType==="REFERENCE"))}),(o,a)=>(U(),Y("div",fp,[b("div",dp,[he(W0,{attributes:t.value},null,8,["attributes"])]),(U(!0),Y(be,null,Me(r.value,s=>(U(),Y("div",{key:s.attRecordId,class:"ect-bg-white ect-rounded-lg"},[he(W0,{title:s.referenceLabel+" Lookup",lookup:s,attributes:s.relatedFields},null,8,["title","lookup","attributes"])]))),128))]))}},hp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},pp=b("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1),vp={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},gp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},mp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},yp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},xp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},_p={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},bp={__name:"AttributesModal",props:{option:{type:Object,required:!0},attributes:{type:Array,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=n,r=e,i=me(()=>JSON.parse(JSON.stringify(r.attributes))),o=()=>{t("close")},a=()=>{t("done",i.value),t("close")};return(s,u)=>(U(),ke(Wa,{header:"",title:"Update Attributes Values",description:"Update the values associated with selected attributes.",footer:"","no-close":"",onClose:o},{content:Ve(()=>[b("header",hp,[pp,b("div",vp,[b("p",gp,xe(e.option.itemName),1),b("p",mp,xe(e.option.qty),1),b("p",yp,xe(e.option.price),1)])]),b("main",xp,[he(_s,{attributes:i.value},null,8,["attributes"])])]),footer:Ve(()=>[b("div",_p,[he(Ht,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"attributes-modal-button-cancel",onClick:u[0]||(u[0]=f=>t("close"))},{default:Ve(()=>[Ne("Cancel")]),_:1}),he(Ht,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"attributes-modal-button-done",onClick:a},{default:Ve(()=>[Ne("Done")]),_:1})])]),_:1}))}},Cp=["data-test-id"],wp=["data-test-id"],Ep=["data-test-id"],Ap={class:"ect-bg-white ect-rounded-xl ect-shadow-sm"},kp={class:"ect-relative ect-w-full ect-border-b ect-border-solid ect-border-b-neutral-200 max-md:ect-max-w-full"},Op={key:0,class:"ect-flex ect-z-0 ect-flex-col ect-gap-4 ect-justify-center ect-py-4 ect-px-6 ect-w-full max-md:ect-px-5 max-md:ect-max-w-full"},Sp={class:"ect-gap-1 ect-w-full max-md:ect-max-w-full"},Ip={class:"ect-text-lg ect-font-semibold ect-leading-5 ect-text-neutral-700 max-md:ect-max-w-full"},Tp={key:0,class:"ect-mt-1 ect-text-sm ect-leading-none ect-text-zinc-600 max-md:ect-max-w-full"},Bp={class:"ect-flex ect-overflow-hidden ect-absolute ect-top-2.5 ect-right-4 ect-z-0 ect-p-1 ect-rounded-lg"},Dp={key:0,class:"ect-flex-1 ect-overflow-y-auto ect-h-[600px] ect-max-h-[70vh]"},Rp={key:1,class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-xs ect-leading-4 ect-text-neutral-700 max-md:ect-px-5 max-md:ect-max-w-full"},Lp={key:2,class:"ect-relative ect-w-full ect-border-t ect-border-solid ect-border-t-neutral-200 max-md:ect-max-w-full"},Fp=Le({__name:"AppModalGen3",props:{title:{type:String,required:!0},description:{type:String,required:!0},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:n}){const t=n;return(r,i)=>(U(),ke(Nu,{to:"modaltp"},{default:Ve(()=>[b("div",{class:"modal-mask","data-test-id":`${r.dataTestId}-mask`},[b("div",{class:"modal-wrapper","data-test-id":`${r.dataTestId}-wrapper`},[b("div",{class:"modal-container",style:ze(r.width?`max-width: ${r.width.includes("calc")?r.width:r.width+"px"}; width: 100%;`:""),"data-test-id":`${r.dataTestId}-container`},[b("div",Ap,[b("div",kp,[e.header?(U(),Y("div",Op,[b("div",Sp,[b("div",Ip,xe(e.title),1),e.description?(U(),Y("div",Tp,xe(e.description),1)):ge("",!0)])])):ge("",!0),b("div",Bp,[b("button",{class:"ect-flex ect-self-stretch ect-my-auto ect-w-6 ect-min-h-6 ect-cursor-pointer hover:ect-bg-gray-100 ect-rounded ect-transition-colors ect-justify-center ect-items-center","aria-label":"Close modal",onClick:i[0]||(i[0]=o=>t("close"))},[he(We,{icon:"close",color:"#000000",size:"11",height:"11"})])])]),r.$slots.content?(U(),Y("div",Dp,[Je(r.$slots,"content",{},void 0,!0)])):(U(),Y("div",Rp,[Je(r.$slots,"default",{},void 0,!0)])),e.footer?(U(),Y("div",Lp,[Je(r.$slots,"footer",{},void 0,!0)])):ge("",!0)])],12,Ep)],8,wp)],8,Cp)]),_:3}))}},[["__scopeId","data-v-41ebff01"]]),ur=e=>(Xt("data-v-395645da"),e=e(),Wt(),e),Np={class:"ect-w-[600px]"},Pp={class:"ect-px-6 ect-pt-4 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},Mp=ur(()=>b("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1)),qp={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},$p={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},jp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Hp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Vp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-mt-4 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},Up=ur(()=>b("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-700 ect-mb-3","data-test-id":"conflict-modal-supporting-text"}," Above selection requires a configuration change ",-1)),zp={class:"ect-flex ect-flex-col ect-gap-2"},Kp={key:0,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-add-table"},Xp=ur(()=>b("div",{class:"ect-px-4 ect-py-2"},[b("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-add-header"}," This change will add: ")],-1)),Wp={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-add-product"},Gp={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-add-qty"},Qp={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-add-price"},Zp={key:1,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-remove-table"},Jp=ur(()=>b("div",{class:"ect-px-4 ect-py-2"},[b("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-remove-header"}," This change will remove: ")],-1)),Yp={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-remove-product"},e3={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-remove-qty"},t3={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-remove-price"},n3={class:"ect-flex ect-justify-between ect-items-center ect-px-4 ect-py-1 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-bg-white ect-rounded-md ect-border ect-border-neutral-200 ect-rounded-md"},r3=ur(()=>b("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-price-change-label"}," Price change ",-1)),i3={class:"ect-text-sm ect-font-semibold ect-leading-5","data-test-id":"conflict-modal-price-change-value"},o3={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full"},a3=ur(()=>b("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-500 ect-mb-2","data-test-id":"conflict-modal-summary-supporting-text"}," Price Adjustment Summary ",-1)),s3={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-mt-2 ect-bg-neutral-50","data-test-id":"conflict-modal-summary-table"},l3={class:"ect-flex ect-flex-col ect-gap-2"},c3={class:"ect-flex-1"},u3={class:"font-regular","data-test-id":"conflict-modal-summary-base-price-label"},f3={class:"ect-text-center ect-w-28"},d3={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},h3={class:"ect-text-center ect-w-28"},p3={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},v3={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-px-4 ect-py-1 ect-mt-2","data-test-id":"conflict-modal-summary-total"},g3={class:"ect-flex ect-items-center"},m3=ur(()=>b("div",{class:"ect-flex-1"},[b("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-summary-total-label"}," Total Price change ")],-1)),y3={class:"ect-text-center ect-w-28"},x3={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},_3={class:"ect-text-center ect-w-28"},b3={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},C3={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},w3=Le({__name:"ConflictModal",props:{item:{type:Object,required:!0},data:{type:Object,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=dn(),r=n,i=e,o=me(()=>{const p=t.summaryPrices,g=[];return g.push({label:"Base Price",value:p.basePrice,priceChange:p.basePrice}),g.push({label:"Add Ons",value:p.addOns,priceChange:p.addOns+v.value}),g}),a=me(()=>{const p=t.summaryPrices;return{label:"Total Price",value:p.total,priceChange:p.total+v.value}}),s=me(()=>i.data.inclusions.map(g=>t.optionByPublishKey.get(g))),u=me(()=>s.value.filter(p=>p.itemId!==i.item.itemId)),f=me(()=>i.data.exclusions.map(p=>t.optionByPublishKey.get(p))),c=me(()=>f.value.filter(p=>p.itemId!==i.item.itemId)),v=me(()=>s.value.reduce((p,g)=>p+g.price,0)-f.value.reduce((p,g)=>p+g.price,0)),l=()=>{r("close")},h=()=>{r("done")};return(p,g)=>(U(),ke(Fp,{header:"",title:"Confirm Your Selection",description:"This selection requires a configuration change",footer:"","no-close":"",onClose:l},{content:Ve(()=>[b("div",Np,[b("header",Pp,[Mp,b("div",qp,[b("p",$p,xe(e.item.itemName),1),b("p",jp,xe(e.item.qty),1),b("p",Hp,xe(Fe(Pt)(e.item.price)),1)])]),b("main",Vp,[Up,b("div",zp,[u.value.length>0?(U(),Y("div",Kp,[Xp,(U(!0),Y(be,null,Me(u.value,d=>(U(),Y("div",{key:d.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[b("p",Wp,xe(d.itemName),1),b("p",Gp,xe(d.qty),1),b("p",Qp," + "+xe(Fe(Pt)(d.price)),1)]))),128))])):ge("",!0),c.value.length>0?(U(),Y("div",Zp,[Jp,(U(!0),Y(be,null,Me(c.value,d=>(U(),Y("div",{key:d.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[b("p",Yp,xe(d.itemName),1),b("p",e3,xe(d.qty),1),b("p",t3," - "+xe(Fe(Pt)(d.price)),1)]))),128))])):ge("",!0),b("div",n3,[r3,b("p",i3,xe(Fe(Pt)(v.value)),1)])])]),b("footer",null,[b("div",o3,[a3,b("div",s3,[b("div",l3,[(U(!0),Y(be,null,Me(o.value,(d,m)=>(U(),Y("div",{key:d.label,class:we(["ect-flex ect-px-4 ect-py-1",{"ect-border-t ect-border-neutral-200":m>0}])},[b("div",c3,[b("p",u3,xe(d.label),1)]),b("div",f3,[b("p",d3,xe(Fe(Pt)(d.value)),1)]),b("div",h3,[b("p",p3,xe(Fe(Pt)(d.priceChange)),1)])],2))),128))])]),b("div",v3,[b("div",g3,[m3,b("div",y3,[b("p",x3,xe(Fe(Pt)(a.value.value)),1)]),b("div",_3,[b("p",b3,xe(Fe(Pt)(a.value.priceChange)),1)])])])])])])]),footer:Ve(()=>[b("div",C3,[he(Ht,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"conflict-modal-button-cancel",onClick:g[0]||(g[0]=d=>r("close"))},{default:Ve(()=>[Ne("Cancel")]),_:1}),he(Ht,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"conflict-modal-button-done",onClick:h},{default:Ve(()=>[Ne("Done")]),_:1})])]),_:1}))}},[["__scopeId","data-v-395645da"]]),E3={class:"ect-flex ect-flex-col"},A3=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],k3=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],O3={key:0},S3={key:1,class:"ect-border-t ect-border-gray-200 ect-p-4"},I3={__name:"ConfiguratorTabSections",props:{data:{type:Object,required:!0}},setup(e){const n=dn(),t=e,r=me(()=>t.data.itemTypes||[]),i=me(()=>t.data.showImage||!1),o=te(null),a=te({});let s=te(null),u=te(null);const f=(p,g)=>{p.qty=g},c=(p,g)=>{p.itemName=g},v=()=>{n.configuration.categoryOptions.forEach(p=>{p.itemTypes.forEach(g=>{g.options.forEach(d=>{n.configuration.sysGuidedOptions&&(o.value.hidden.includes(d.relationshipInfo.publishKey)?d.hidden=!0:d.hidden=!1),o.value.inclusions.includes(d.relationshipInfo.publishKey)&&!g.selected.includes(d.itemId)&&g.selected.push(d.itemId),o.value.exclusions.includes(d.relationshipInfo.publishKey)&&g.selected.includes(d.itemId)&&g.selected.splice(g.selected.indexOf(d.itemId),1)})})}),o.value=null,a.value=null},l=async(p,g,d,m)=>{if(p.preventDefault(),p.stopPropagation(),s.value=null,u.value=null,g.calculateRules){m&&m.isRadio?d.includes(g.itemId)?(d.splice(0,d.length),u.value=g.relationshipInfo.publishKey):(d.splice(0,d.length),d.push(g.itemId),s.value=g.relationshipInfo.publishKey):d.includes(g.itemId)?(d.splice(d.indexOf(g.itemId),1),u.value=g.relationshipInfo.publishKey):(d.push(g.itemId),s.value=g.relationshipInfo.publishKey);const y=u.value?g:null,_=s.value?g:null,x=await n.evaluateConfigSelection(y,_);x.inclusions.length>0||x.exclusions.length>0?(o.value=x,a.value=g,[...x.inclusions,...x.exclusions].includes(g.relationshipInfo.publishKey)||(s.value&&o.value.exclusions.push(s.value),u.value&&o.value.inclusions.push(u.value))):(o.value=x,s.value&&o.value.exclusions.push(s.value),u.value&&o.value.inclusions.push(u.value),v())}},h=(p,g,d,m)=>{p.target.type==="checkbox"||p.target.type==="radio"||(p.preventDefault(),p.stopPropagation(),m.isRadio?d.includes(g.itemId)?d.splice(0,d.length):(d.splice(0,d.length),d.push(g.itemId)):d.includes(g.itemId)?d.splice(d.indexOf(g.itemId),1):d.push(g.itemId),l(p,g,d,m))};return(p,g)=>(U(),Y(be,null,[o.value?(U(),ke(w3,{key:0,item:a.value,data:o.value,onClose:g[0]||(g[0]=d=>o.value=null),onDone:v},null,8,["item","data"])):ge("",!0),b("div",E3,[(U(!0),Y(be,null,Me(r.value,d=>(U(),ke(o6,{key:d.itemTypeId,title:d.itemTypeName,description:d.description,message:d.isRadio?d.selected?"":d.minMessage:d.selected.length<d.minNumber?d.minMessage:d.selected.length===d.maxNumber?d.maxMessage:""},{default:Ve(()=>[b("div",{class:we([d.numberOfColumns===1?"ect-space-y-3 md:ect-space-y-4 ect-p-2 md:ect-p-4":d.numberOfColumns===2?"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4":"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 lg:ect-grid-cols-3 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4"])},[(U(!0),Y(be,null,Me(d.options||[],m=>(U(),Y(be,{key:m.itemId},[m.hidden?ge("",!0):(U(),ke(Y6,{key:0,item:m,name:m.itemName,description:m.description||"","min-quantity":d.minQuantity,"max-quantity":d.maxQuantity,"show-image":i.value,selected:d.selected.includes(m.itemId),tags:m.getTags(),price:m.price,quantity:m.qty,"image-url":m.defaultImageURL,attributes:m.attributes||[],size:d.numberOfColumns,"item-id":m.itemId,"item-type":d.itemTypeName||"",category:d.category,"relationship-info":m.relationshipInfo||{},option:Fe(n).optionByItemId.get(m.itemId),"is-attributes":m.isAttributes,"show-attributes":d.lightboxAttributes,disabled:m.isDisabled,"onUpdate:quantity":y=>f(m,y),"onUpdate:name":y=>c(m,y),onEditAttributes:y=>m.showAttributesModal=!0,onClick:y=>d.selected.includes(m.itemId)||m.isDisabled?null:h(y,m,d.selected,d)},{"selection-control":Ve(()=>[d.isRadio?ln((U(),Y("input",{key:0,"onUpdate:modelValue":y=>d.selected[0]=y,"data-test-id":`configurator-${d.itemTypeId}-radio-${m.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"radio",value:m.itemId,disabled:m.isDisabled,onClick:g[1]||(g[1]=mt(()=>{},["stop"])),onChange:y=>l(y,m,d.selected,d)},null,40,A3)),[[Su,d.selected[0]]]):ln((U(),Y("input",{key:1,"onUpdate:modelValue":y=>d.selected=y,"data-test-id":`configurator-${d.itemTypeId}-checkbox-${m.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"checkbox",value:m.itemId,disabled:m.isDisabled,onClick:g[2]||(g[2]=mt(()=>{},["stop"])),onChange:y=>l(y,m,d.selected,d)},null,40,k3)),[[Va,d.selected]])]),default:Ve(()=>[d.lightboxAttributes?(U(),Y("div",O3,[m.showAttributesModal?(U(),ke(bp,{key:0,option:m,attributes:m.attributes,onDone:y=>m.attributes=y,onClose:y=>m.showAttributesModal=!1},null,8,["option","attributes","onDone","onClose"])):ge("",!0)])):(U(),Y("div",S3,[he(_s,{attributes:m.attributes},null,8,["attributes"])]))]),_:2},1032,["item","name","description","min-quantity","max-quantity","show-image","selected","tags","price","quantity","image-url","attributes","size","item-id","item-type","category","relationship-info","option","is-attributes","show-attributes","disabled","onUpdate:quantity","onUpdate:name","onEditAttributes","onClick"]))],64))),128))],2)]),_:2},1032,["title","description","message"]))),128))])],64))}},T3=e=>(Xt("data-v-cb7a75a9"),e=e(),Wt(),e),B3={class:"ect-space-y-4"},D3={class:"ect-w-full ect-bg-white ect-border ect-border-ect-gray-200 ect-rounded-lg"},R3={class:"ect-bg-white ect-border-b ect-border-ect-gray-200 ect-px-4 ect-py-4 ect-sticky ect-top-0 ect-z-[5] ect-overflow-hidden ect-rounded-t-lg"},L3={class:"ect-text-sm ect-font-semibold ect-text-green-700","data-test-id":"configurator-summary-header-title"},F3={class:"ect-bg-white ect-px-4 ect-py-4 ect-pb-3 ect-border-b ect-border-ect-gray-200 ect-top-[53px] ect-z-9 ect-overflow-hidden ect-sticky ect-top-[53px]"},N3={class:"ect-text-sm ect-font-medium ect-text-ect-gray-800","data-test-id":"configurator-summary-section-frame-color"},P3={class:"ect-flex ect-items-center ect-bg-light-bg-x ect-border-b ect-border-ect-gray-200"},M3={class:"ect-flex-1 ect-bg-ect-gray-50 ect-px-8 ect-py-4 ect-min-h-[56px] ect-flex ect-items-center"},q3={class:"ect-text-sm ect-text-font-clr-light","data-test-id":"configurator-summary-item-red"},$3={class:"ect-flex ect-items-center ect-px-8 ect-py-4 ect-gap-5"},j3={class:"ect-flex ect-justify-center ect-min-w-[128px]"},H3=T3(()=>b("div",{class:"ect-border-r ect-w-[1px] ect-border-text-muted-light ect-h-6"},null,-1)),V3={class:"ect-flex ect-justify-center ect-min-w-[100px]"},U3={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-price-red"},z3={key:0,class:"ect-flex ect-items-center ect-bg-light-bg-x ect-px-10 ect-py-3"},K3={class:"ect-flex ect-flex-wrap ect-items-center ect-bg-light-bg-x ect-gap-2"},X3={class:"ect-bg-white ect-px-8 ect-py-4 ect-pr-4 ect-flex ect-justify-end"},W3={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-total"},G3=Le({__name:"ConfiguratorSummaryTab",props:{summary:{type:Array,required:!0}},setup(e){return(n,t)=>(U(),Y("div",B3,[(U(!0),Y(be,null,Me(e.summary,r=>(U(),Y("div",{key:r.key,class:"ect-mb-4"},[b("section",D3,[b("div",R3,[b("h3",L3,xe(r.category),1)]),(U(!0),Y(be,null,Me(r.selectedItemTypes,i=>(U(),Y("div",{key:i.itemTypeId,class:"ect-flex ect-flex-col ect-border-b ect-border-ect-gray-200"},[b("div",F3,[b("h4",N3,xe(i.itemTypeName),1)]),(U(!0),Y(be,null,Me(i.selectedOptions,o=>(U(),Y(be,{key:o.itemId},[b("div",P3,[b("div",M3,[b("span",q3,xe(o.itemName),1)]),b("div",$3,[b("div",j3,[he(Do,{value:o.qty,"onUpdate:value":a=>o.qty=a,min:i.minQuantity,max:i.maxQuantity,"data-test-id":`configurator-summary-counter-${o.itemId}`},null,8,["value","onUpdate:value","min","max","data-test-id"])]),H3,b("div",V3,[b("span",U3,xe(Fe(Pt)(o.price)),1)])])]),o.isAttributes&&o.getTags().length>0?(U(),Y("div",z3,[b("div",K3,[(U(!0),Y(be,null,Me(o.getTags(),a=>(U(),ke(hn,{key:a.attributeId,label:a.label,value:a.value},null,8,["label","value"]))),128))])])):ge("",!0)],64))),128))]))),128)),b("div",X3,[b("span",W3," Total : "+xe(Fe(Pt)(r.totalPrice())),1)])])]))),128))]))}},[["__scopeId","data-v-cb7a75a9"]]),Q3={class:"configurator-page ect-flex ect-flex-col ect-h-full ect-relative","data-test-id":"configurator-page-container"},Z3={"data-test-id":"configurator-tabs-container",class:"ect-bg-white ect-shadow-sm ect-flex-shrink-0 ect-mb-4"},J3={class:"ect-bg-white ect-border-t ect-border-gray-200 ect-flex-shrink-0 ect-absolute ect-bottom-0 ect-left-0 ect-right-0 ect-z-50","data-test-id":"configurator-footer-sticky"},Y3=Le({__name:"ConfiguratorTabs",emits:["scroll"],setup(e,{emit:n}){const t=dn(),r=te("billing-options"),i=me(()=>t.configuration.categoryOptions),o=me(()=>{const l=i.value.map(h=>({key:h.key,title:h.category}));return l.push({key:"summary",title:"Summary"}),l}),a=n,s=me(()=>u.value.get(r.value)),u=me(()=>{const l=new Map;return i.value.forEach(h=>{l.set(h.key,h)}),l}),f=()=>{console.info("Continue");const l=o.value.findIndex(h=>h.key===r.value);if(l<o.value.length-1){const h=o.value[l+1];r.value=h.key}else t.maintainQuoteConfiguration()};Ye(r,l=>{c(l),a("scroll",0)});const c=l=>{r.value=l},v=l=>{const h=l.target.scrollTop;a("scroll",h)};return qn(()=>{r.value=o.value[0].key}),(l,h)=>(U(),Y("div",Q3,[b("div",Z3,[he(M4,{modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=p=>r.value=p),"show-tabs":!0,border:"",tabs:o.value,"data-test-id":"configurator-tabs-container",onTabChange:c},null,8,["modelValue","tabs"])]),r.value!=="summary"?(U(),Y("div",{key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:v},[he(I3,{data:s.value},null,8,["data"])],32)):(U(),Y("div",{key:1,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:v},[he(G3,{summary:Fe(t).summary},null,8,["summary"])],32)),b("div",J3,[he(Q4,{"btn-text":r.value!=="summary"?"Continue":"Save",item:Fe(t).configuration,onContinue:f},null,8,["btn-text","item"])])]))}},[["__scopeId","data-v-89883e06"]]),e7={class:"ect-px-6 ect-pt-4 ect-pb-2 ect-bg-white"},t7={class:"ect-flow-root"},n7=["src","alt"],r7={key:1,class:"ect-mb-2"},i7={class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed ect-transition-all ect-duration-400"},o7={key:0,class:"ect-mt-2"},a7={class:"ect-inline-block ect-mb-2"},s7={key:1,class:"ect-inline-block ect-mb-2"},l7={key:1,class:"ect-mt-2"},c7={__name:"ConfiguratorInfo",props:{config:{type:Object,required:!0},editAttributes:{type:Boolean,required:!0},scroll:{type:Number,default:0}},emits:["edit-attributes"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.config.attributes.map(o=>({label:o.label,value:o.value})).filter(o=>o.value!==null&&o.value!==""));return(o,a)=>(U(),Y("div",e7,[b("div",t7,[e.config.defaultImageURL&&e.scroll<50?(U(),Y("div",{key:0,class:we(["ect-bg-gray-200 ect-rounded-lg ect-overflow-hidden ect-float-left ect-mr-4 ect-mb-2",e.editAttributes?"ect-w-[40px] ect-h-[40px]":"ect-w-[104px] ect-h-[104px]"])},[e.config.defaultImageURL?(U(),Y("img",{key:0,src:e.config.defaultImageURL,alt:e.config.itemName,class:"ect-w-full ect-h-full ect-object-cover"},null,8,n7)):ge("",!0)],2)):ge("",!0),e.scroll<50?(U(),Y("div",r7,[b("p",i7,xe(e.config.description),1)])):ge("",!0),e.config.isAttributes?(U(),Y(be,{key:2},[e.editAttributes?(U(),Y("div",l7,[he(_s,{attributes:e.config.attributes},null,8,["attributes"])])):(U(),Y("div",o7,[i.value.length>0?(U(),Y(be,{key:0},[(U(!0),Y(be,null,Me(i.value,(s,u)=>(U(),Y("span",{key:u,class:"ect-inline-block ect-mr-2 ect-mb-2"},[he(hn,{label:s.label,value:s.value},null,8,["label","value"])]))),128)),b("span",a7,[b("button",{"data-test-id":"configurator-info-button-edit-attributes",onClick:a[0]||(a[0]=s=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})])])],64)):(U(),Y("span",s7,[b("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:a[1]||(a[1]=s=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))]))],64)):ge("",!0)])]))}},u7=["data-test-id"],f7=["placeholder","value","data-test-id"],d7=["data-test-id"],h7=["data-test-id","onClick"],p7=Le({__name:"MoleculeSearch",props:{placeholder:{type:String,default:""},modelValue:{type:String,default:""},height:{type:[Number,String],default:32},size:{type:String,default:"regular"},loading:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},iconPosition:{type:String,default:"right",validator:e=>["left","right"].includes(e)},dataTestId:{type:String,required:!0}},emits:["update:modelValue","optionClick"],setup(e,{emit:n}){const t=e,r=n,i=te(""),o=te(null),a=te(!1),s=te(null),u=te(!0),f=me(()=>u.value?{}:{bottom:"100%",marginTop:"0",marginBottom:"4px"}),c=async()=>{var C;if(await sn(),!s.value)return;const m=s.value.getBoundingClientRect(),_=window.innerHeight-m.bottom,x=Math.min(((C=t.options)==null?void 0:C.length)*40+20,200);u.value=_>=x},v=()=>{o.value=null,r("update:modelValue","")},l=d=>{const m=d.target.value;i.value&&(clearTimeout(i.value),i.value=null),i.value=setTimeout(()=>{r("update:modelValue",m)},500)},h=async()=>{a.value=!0,await c()},p=()=>{setTimeout(()=>{a.value=!1},150)},g=d=>{a.value=!1,i.value&&(clearTimeout(i.value),i.value=null),r("update:modelValue",d.label),r("optionClick",d)};return(d,m)=>{var y;return U(),Y("div",{ref_key:"searchContainer",ref:s,class:we(["molecule-search",{"icon-left":e.iconPosition==="left"}]),"data-test-id":e.dataTestId},[e.loading?(U(),ke(ju,{key:0,size:16,class:"icon ect-top-2 icon-loader","data-test-id":`${e.dataTestId}-loader`},null,8,["data-test-id"])):e.iconPosition==="left"||!e.modelValue?(U(),ke(We,{key:1,class:"icon-search ect-mt-[-1px]",icon:"search",size:14,color:"#5f5f5f","data-test-id":`${e.dataTestId}-search`,onClick:v},null,8,["data-test-id"])):ge("",!0),b("input",{class:we(["search-input-box",{large:e.size==="large"}]),type:"text",style:ze({height:`${e.height}px`}),placeholder:t.placeholder,value:e.modelValue,"data-test-id":`${e.dataTestId}-input`,onInput:l,onFocus:h,onBlur:p},null,46,f7),e.modelValue&&!e.loading?(U(),ke(We,{key:2,class:"close-btn",icon:"close",size:8,color:"#5f5f5f","data-test-id":`${e.dataTestId}-close`,onClick:v},null,8,["data-test-id"])):ge("",!0),((y=e.options)==null?void 0:y.length)>0&&a.value?(U(),Y("div",{key:3,class:we(["search-options",{"dropdown-top":!u.value}]),style:ze(f.value),"data-test-id":`${e.dataTestId}-dropdown`},[(U(!0),Y(be,null,Me(e.options,(_,x)=>(U(),Y("div",{key:_.id,class:"search-option","data-test-id":`${e.dataTestId}-option-${x}`,onClick:mt(C=>g(_),["stop"]),onMousedown:m[0]||(m[0]=mt(()=>{},["prevent"]))},[Ne(xe(_.label)+" ",1),b("span",null,xe(_.subLabel),1)],40,h7))),128))],14,d7)):ge("",!0)],10,u7)}}},[["__scopeId","data-v-6cdaa802"]]),v7=["data-test-id"],g7=Le({__name:"StatePill",props:{text:{type:String,required:!0},state:{type:String,default:"default",validator:e=>["default","draft","review","active","inactive","in draft","active"].includes(e)},dataTestId:{type:String,default:""}},setup(e){const n=e,t=me(()=>({"ect-state-pill--default":n.state==="default","ect-state-pill--draft":n.state==="draft"||n.state==="in draft","ect-state-pill--review":n.state==="review","ect-state-pill--active":n.state==="active","ect-state-pill--inactive":n.state==="inactive"}));return(r,i)=>(U(),Y("span",{class:we(["ect-state-pill",t.value]),"data-test-id":e.dataTestId},xe(e.text),11,v7))}},[["__scopeId","data-v-6be678b8"]]),m7=["data-test-id"],y7=["data-test-id"],x7=["data-test-id"],_7=["data-test-id"],b7=["data-test-id","onClick"],C7=["data-test-id"],w7=Le({__name:"ecBreadcrumbs",props:{links:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"||typeof n.route=="object"))},dataTestId:{type:String,required:!0}},setup(e){const n=fi(),t=r=>{r&&n.push(r)};return(r,i)=>(U(),Y("div",{class:"ect-flex ect-items-center ect-justify-between","data-test-id":e.dataTestId},[b("div",{class:"ect-flex ect-items-center ect-gap-4","data-test-id":`${e.dataTestId}-container`},[b("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-breadcrumbs`},[(U(!0),Y(be,null,Me(e.links,(o,a)=>(U(),Y(be,{key:a},[a>0?(U(),Y("span",{key:0,class:"ect-text-[#828282] ect-text-xs ect-font-semibold","data-test-id":`${e.dataTestId}-separator-${a}`}," / ",8,_7)):ge("",!0),o.route?(U(),Y("button",{key:1,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal hover:ect-text-[#0076D6] hover:ect-underline ect-transition-colors","data-test-id":`${e.dataTestId}-link-${a}`,onClick:s=>t(o.route)},xe(o.text),9,b7)):(U(),Y("span",{key:2,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal","data-test-id":`${e.dataTestId}-text-${a}`},xe(o.text),9,C7))],64))),128))],8,x7)],8,y7)],8,m7))}},[["__scopeId","data-v-151ca816"]]),E7={components:{AppIcon:We},props:{direction:{type:String,default:"top",validator:e=>["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"].includes(e)},content:{type:String,default:null},disabled:{type:Boolean,default:!1},width:{type:Number,default:130},icon:{type:String,default:null},dataTestId:{type:String,default:""}},data(){return{show:!1}},computed:{tooltipClass(){return{tooltip:!0,[`tooltip-${this.direction}`]:!0}},styleObj(){return{width:`${this.width}px !important`}}},methods:{showTooltip(){this.disabled||(this.show=!0)},hideTooltip(){this.show=!1}}},A7=["data-test-id"],k7=["data-test-id"];function O7(e,n,t,r,i,o){const a=er("AppIcon");return t.content?(U(),Y("div",{key:0,class:"tooltip-container","data-test-id":t.dataTestId,onMouseover:n[0]||(n[0]=(...s)=>o.showTooltip&&o.showTooltip(...s)),onMouseleave:n[1]||(n[1]=(...s)=>o.hideTooltip&&o.hideTooltip(...s))},[Je(e.$slots,"default",{},void 0,!0),ln(b("div",{class:we(o.tooltipClass),style:ze(o.styleObj),"data-test-id":`${t.dataTestId}-content`},[t.icon?(U(),ke(a,{key:0,icon:t.icon,color:"#57c046",size:14,"data-test-id":`${t.dataTestId}-icon`},null,8,["icon","data-test-id"])):ge("",!0),Ne(" "+xe(t.content),1)],14,k7),[[xu,i.show]])],40,A7)):Je(e.$slots,"default",{key:1},void 0,!0)}const S7=Le(E7,[["render",O7],["__scopeId","data-v-b36acc62"]]),I7=wt("item",()=>{const e=Qt(),n=te([]),t=te([]),r=te(!1),i=te(0),o=te(1),a=te(""),s=te(20),u=te(null),f=te(!1),c=te(null),v=te(!1),l=te(null),h=te(null),p=te(null),g=te(null),d=te(null),m=te({addedOptionIds:null,eCatalogCount:null,ecatalogs:null,publishVersionId:null,removedOptionIds:null}),y=te([]),_=te({ecatalogIds:[],optionItemsToAdd:[]}),x=te(!1),C=te(null),S=te(0),A=2,I=M=>{!Array.isArray(M)||M.every(V=>{var K;return V.id&&((K=V.itemTypes)==null?void 0:K.every(J=>{var P;return J.id&&((P=J.options)==null?void 0:P.every(X=>X.id))}))})||M.forEach((V,K)=>{V.id||(V.id=`category-${K}-${V.category}`),V.itemTypes&&Array.isArray(V.itemTypes)&&V.itemTypes.forEach((J,P)=>{J.id||(J.id=J.itemTypeId||`itemType-${K}-${P}-${J.itemTypeName||"unnamed"}`),J.options&&Array.isArray(J.options)&&J.options.forEach((X,se)=>{X.id||(X.id=X.itemId||`option-${K}-${P}-${se}-${X.itemName||"unnamed"}`)})})})},B=async(M,H=null)=>{var V;try{v.value=!0;let K={};if(H)K={fileId:H};else{const P=y.value.find(se=>se.status==="Draft"),X=y.value.find(se=>se.status==="Active");X?K={fileId:X.id}:P?K={fileId:P.id}:K={itemId:M}}let J=await window.AdminConfiguratorManager.getItemConfiguration({request:JSON.stringify(K)});return J!=null&&J.errorMessage?(e.handleError(J.errorMessage),null):(J=St(J.data),typeof J.data=="string"&&(J=JSON.parse(J.data)),(V=J==null?void 0:J.productItem)!=null&&V.categoryOptions&&I(J.productItem.categoryOptions),u.value=J,v.value=!1,y.value.length===0&&!r.value&&await ne(),J.data)}catch(K){return v.value=!1,e.handleError("Failed to fetch item configuration. Please try again.",K),null}},O=async(M,H="",V="")=>{try{const K={searchTerm:M,itemTypeId:H,filterType:V};let J=await window.AdminConfiguratorManager.getItemsList({request:JSON.stringify(K)});return J=St(J),J!=null&&J.errorMessage?(e.handleError(J.errorMessage),null):J}catch{return e.handleError("Failed to fetch option list. Please try again."),null}},E=async(M,H)=>{try{const V={productItemId:d.value,optionItemId:M,existingItemType:H};let K=await window.AdminConfiguratorManager.getItemDetails({request:JSON.stringify(V)});return K=St(K),K!=null&&K.errorMessage?(e.handleError(K.errorMessage),null):K}catch{return e.handleError("Failed to fetch option details. Please try again."),null}},k=async()=>{try{const M=await window.AdminConfiguratorManager.getAvailableAttributes();return JSON.parse(M)}catch{e.handleError("Failed to fetch available attributes. Please try again.")}},R=async M=>{try{const H=await window.AdminConfiguratorManager.addAttribute({request:JSON.stringify(M)});return JSON.parse(H)}catch{e.handleError("Failed to fetch item configuration. Please try again.")}},F=async M=>{try{const H=JSON.stringify(M),V=await window.AdminConfiguratorManager.getChildFields({request:H});return JSON.parse(V)}catch(H){throw e.handleError("Failed to fetch child fields. Please try again.",H),H}},q=async()=>{const M={objectApiName:"XX_Base__Item_Type__c",fieldApiName:"XX_Base__Item_Type_Category__c"};try{return(await window.AdminConfiguratorManager.getPicklistValues({request:JSON.stringify(M)})).data}catch(H){throw e.handleError("Failed to fetch picklist values. Please try again.",H),H}},Z=async()=>{var M,H,V;try{const K=(H=(M=u.value)==null?void 0:M.productItem)==null?void 0:H.itemStatus,P={fileId:(V=y.value.find(se=>se.status===K))==null?void 0:V.id,itemId:d.value};let X=await window.AdminConfiguratorManager.activateItemConfig({request:JSON.stringify(P)});return X!=null&&X.error?(D(X==null?void 0:X.error),null):(X=St(X.data),m.value=X,X)}catch{return D(),null}},ee=async()=>{try{const M={productId:"068bn00000Anu0YAAR"};return(await window.AdminConfiguratorManager.getECatalogsForProduct({request:JSON.stringify(M)})).data}catch(M){e.handleError("Failed to fetch e catalogs for product. Please try again.",M)}},ne=async()=>{try{const M={productId:d.value},H=await window.AdminConfiguratorManager.getProductConfigInfo({request:JSON.stringify(M)}),V=JSON.parse(H.data);return y.value=V.data,V}catch(M){e.handleError("Failed to save item configuration. Please try again.",M)}},Q=async()=>{try{const M={ecatalogIds:_.value.ecatalogIds,productItemId:d.value,optionItemsToAdd:_.value.optionItemsToAdd};return(await window.AdminConfiguratorManager.saveItemConfigToCatalog({request:JSON.stringify(M)})).data}catch(M){e.handleError("Failed to save item configuration to catalog. Please try again.",M)}},N=async()=>{var M,H,V;try{const K=(H=(M=u.value)==null?void 0:M.productItem)==null?void 0:H.itemStatus,J={itemId:d.value,fileId:(V=y.value.find(fe=>fe.status===K))==null?void 0:V.id},P=await window.AdminConfiguratorManager.createNewVersion({request:JSON.stringify(J)}),X=JSON.parse(P);await ne(),await B(d.value,X.id);const se=y.value.findIndex(fe=>fe.status==="Draft");return se!==-1?y.value[se]=X:y.value.push(X),X}catch(K){e.handleError("Failed to create new version. Please try again.",K)}},w=async()=>{var K,J;const M=(K=y.value.find(P=>P.status==="Inactive"))==null?void 0:K.id,H=(J=y.value.find(P=>P.status==="Active"))==null?void 0:J.id,V={itemId:d.value,activeVersionId:H,inactiveVersionId:M};try{return(await window.AdminConfiguratorManager.rollbackItemConfig({request:JSON.stringify(V)})).data}catch(P){e.handleError("Failed to rollback item configuration. Please try again.",P)}},D=M=>{M?C.value=M:C.value=null,x.value=!0};return{items:n,loading:r,totalCount:i,currentPage:o,searchTerm:a,itemLimit:s,columns:t,currentItemConfig:u,savingItemConfiguration:f,currentItem:c,configLoader:v,currentItemData:l,currentGroupIndex:h,currentOptionIndex:p,currentOptionData:g,versionInfo:y,activateConfigData:m,activatePayload:_,itemId:d,showActivationErrorModal:x,activationError:C,activationRetryCount:S,maxRetries:A,getItemConfiguration:B,getItemsList:O,getItemDetails:E,getAvailableAttributes:k,addAttribute:R,getChildFields:F,getPicklistValues:q,activateItemConfig:Z,getECatalogsForProduct:ee,getversionInfo:ne,saveItemConfigToCatalog:Q,createNewVersion:N,rollbackItemConfig:w,addCrossSell:async M=>{const H={itemId:M.id||M.itemId,primarySortOrder:M.primarySortOrder};try{const V=await window.AdminConfiguratorManager.addCrossSell({request:JSON.stringify(H)});return JSON.parse(V.data)}catch(V){return e.handleError("Failed to add cross sell. Please try again.",V),null}},saveItemConfiguration:async()=>{var M;if(v.value||r.value||f.value||!((M=u.value)!=null&&M.productItem))return null;if(!(u.value.productItem.itemStatus==="Active"||u.value.productItem.itemStatus==="Inactive"))try{f.value=!0;const H={itemId:d.value,configurationData:u.value},V=await window.AdminConfiguratorManager.saveItemConfiguration({request:JSON.stringify(H)});if(V!=null&&V.errorMessage)return e.handleError(V.errorMessage),null;if(!(V!=null&&V.error)){const K=y.value.findIndex(J=>J.status==="Draft");y.value[K].id=V.data}return V}catch(H){return e.handleError("Failed to save item configuration. Please try again.",H),null}finally{f.value=!1}},showActivationError:D,hideActivationError:()=>{x.value=!1,S.value=0},incrementRetryCount:()=>{S.value+=1,x.value=!0},canRetry:()=>S.value<A,assignStableIds:I}}),T7={class:"app-filters-main-wrapper"},B7={class:"app-filters-wrapper"},D7={class:"app-filters"},R7={class:"left-section"},L7={class:"ect-flex ect-gap-2 ect-items-center"},F7={class:"ect-absolute ect-top-0 ect-right-0 ect-w-full ect-h-full ect-z-10"},N7={class:"right-section"},P7={class:"after-search-wrapper"},M7={class:"buttons-wrapper"},q7={class:"before-button-wrapper"},$7={key:0,class:"action-wrapper"},j7={key:1,class:"button-text ect-font-medium"},H7={key:2,class:"count-badge"},V7=Le({__name:"FilterHeader",props:{title:{type:String,default:""},showSearch:{type:Boolean,default:!1},buttons:{type:Array,default:()=>[],validator:e=>e.every(n=>(n.icon||n.text)&&typeof n.handler=="function")},searchWidth:{type:String,default:"312px"},showBackButton:{type:Boolean,default:!1},statusText:{type:String,default:""},placeholder:{type:String,default:"Search by name"},breadcrumbLinks:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"))},recordLink:{type:String,default:""}},emits:["search","back"],setup(e,{emit:n}){const t=I7(),r=e,i=Xr([]);Nt(()=>{o()});const o=()=>{i.splice(0,i.length),r.buttons&&r.buttons.length>0&&r.buttons.forEach(l=>{i.push({...l})})};Ye(()=>r.buttons,()=>{o()},{deep:!0});const a=l=>{s("search",l)},s=n,u=te(""),f=(l,h)=>{l.supportsToggle&&(l.isActive=!l.isActive),typeof l.handler=="function"&&l.handler(l,l.isActive)},c=()=>{s("back")},v=()=>{if(!r.recordLink)return;let l=r.recordLink;if(!l){let m=t.itemId;if(!m){const y=new URLSearchParams(window.location.search),_=new URLSearchParams(window.location.hash.split("?")[1]);m=y.get("itemId")||_.get("itemId")}l=m}if(!l)return;const p=window.location.href.match(/^(https?:\/\/[^/]+)/);if(!p){console.info("[ERROR]: Unable to extract base domain from current URL");return}const d=`${p[1]}/${l}`;window.open(d,"_blank")};return(l,h)=>(U(),Y("div",T7,[b("div",B7,[b("div",D7,[b("div",R7,[e.breadcrumbLinks&&e.breadcrumbLinks.length>1?(U(),ke(w7,{key:0,links:e.breadcrumbLinks,"data-test-id":"filter-header-breadcrumbs",class:"ect-mb-3"},null,8,["links"])):ge("",!0),b("div",L7,[e.showBackButton?(U(),Y("button",{key:0,class:"back-button","data-test-id":"filter-header-button-back",onClick:c},[he(We,{icon:"arrow",symbol:"",size:16,color:"#198708",class:"ect-relative ect-top-[3px]"})])):ge("",!0),e.title?(U(),Y("p",{key:1,class:we(["ect-relative ect-text-lg ect-font-semibold ect-leading-5 ect-text-[#1F1F1F] ect-transition-colors ect-duration-200",{"hover:ect-text-[#0076D6] ect-cursor-pointer":e.recordLink}]),"data-test-id":"filter-header-title",onClick:h[0]||(h[0]=p=>e.recordLink?v():null)},[Ne(xe(e.title)+" ",1),e.recordLink?(U(),Y(be,{key:0},[he(We,{icon:"open-link",symbol:"",size:16,color:"currentColor",class:"ect-relative ect-top-[3px]"}),b("div",F7,[he(S7,{class:"ect-min-w-full ect-h-full",direction:"top",content:"View Item in Salesforce","data-test-id":"filter-header-tooltip",width:160})])],64)):ge("",!0)],2)):ge("",!0),e.statusText?(U(),ke(g7,{key:2,text:e.statusText,state:e.statusText.toLowerCase(),"data-test-id":"`filter-header-status-pill`"},null,8,["text","state"])):ge("",!0),Je(l.$slots,"after-status",{},void 0,!0)])]),b("div",N7,[e.showSearch?(U(),Y("div",{key:0,class:"search-wrapper",style:ze({width:e.searchWidth})},[he(p7,{modelValue:u.value,"onUpdate:modelValue":[h[1]||(h[1]=p=>u.value=p),a],class:"search-input",placeholder:e.placeholder,"data-test-id":"filter-header-search-input"},null,8,["modelValue","placeholder"])],4)):ge("",!0),b("div",P7,[Je(l.$slots,"afterSearch",{},void 0,!0)]),b("div",M7,[b("div",q7,[Je(l.$slots,"before-button",{},void 0,!0)]),l.$slots.buttons?(U(),Y("div",$7,[Je(l.$slots,"buttons",{},void 0,!0)])):(U(!0),Y(be,{key:1},Me(i,(p,g)=>(U(),Y("div",{key:g,class:"action-wrapper"},[he(Ht,{btype:p.type||"primary","button-style":p.style||"outlined",size:"medium",style:ze({minWidth:p.minWidth||"auto"}),class:we([{active:p.isActive},{"icon-only":p.icon&&!p.text},{"text-button":p.text}]),loading:p.loading,disabled:p.disabled,"data-test-id":`filter-header-button-${p.text?p.text.toLowerCase().replace(/\s+/g,"-"):g}`,onClick:d=>f(p)},{default:Ve(()=>[p.icon?(U(),ke(We,{key:0,icon:p.icon,symbol:"",color:p.color||"#136E05",size:p.size||14},null,8,["icon","color","size"])):ge("",!0),p.text?(U(),Y("span",j7,xe(p.isActive?p.altText:p.text),1)):ge("",!0),p.count?(U(),Y("span",H7,xe(p.count),1)):ge("",!0)]),_:2},1032,["btype","button-style","style","class","loading","disabled","data-test-id","onClick"])]))),128))])])])])]))}},[["__scopeId","data-v-2ea70801"]]),U7=["data-test-id"],z7=["data-test-id"],K7=["data-test-id"],X7=["data-test-id"],W7=["data-test-id"],G7=["data-test-id"],Q7=["data-test-id"],Z7=Le({__name:"ecSwitch",props:Hc({text:{type:[String,Object],required:!1,validator:e=>typeof e=="string"?!0:typeof e=="object"&&e!==null?Object.prototype.hasOwnProperty.call(e,"on")&&Object.prototype.hasOwnProperty.call(e,"off"):!1},subtext:{type:String,required:!1},size:{type:String,default:"regular",validator:e=>["regular","large"].includes(e)},disabled:{type:Boolean,default:!1},dataTestId:{type:String,default:""},leftAlign:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:Hc(["update:modelValue"],["update:modelValue"]),setup(e,{emit:n}){const t=e,r=Y1(e,"modelValue"),i=n,o=me(()=>typeof t.text=="string"?t.text:typeof t.text=="object"&&t.text!==null?r.value?t.text.on:t.text.off:""),a=()=>{t.disabled||i("update:modelValue",!r.value)};return(s,u)=>(U(),Y("div",{class:we(["ec-switch-container",{disabled:e.disabled}]),"data-test-id":e.dataTestId},[e.leftAlign?(U(),Y("span",{key:0,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[Ne(xe(o.value)+" ",1),e.subtext?(U(),Y("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},xe(e.subtext),9,K7)):ge("",!0)],8,z7)):ge("",!0),b("div",{class:we(["ec-switch",{"ec-switch--active":r.value,"ec-switch--large":e.size==="large"}]),"data-test-id":`${e.dataTestId}-switch`,onClick:a},[b("div",{class:"ec-switch__handle","data-test-id":`${e.dataTestId}-handle`},null,8,W7)],10,X7),e.leftAlign?ge("",!0):(U(),Y("span",{key:1,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[Ne(xe(o.value)+" ",1),e.subtext?(U(),Y("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},xe(e.subtext),9,Q7)):ge("",!0)],8,G7))],10,U7))}},[["__scopeId","data-v-cfefad9a"]]),J7={key:0,class:"ect-bg-white ect-h-full ect-flex ect-flex-col ect-overflow-auto"},Y7={class:"ect-sticky ect-top-0 ect-z-50 ect-bg-white","data-test-id":"configurator-header-sticky"},ev={class:"ect-flex ect-flex-col ect-sticky ect-top-0 ect-z-50 ect-bg-white ect-border-b ect-border-gray-200"},tv={key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-bg-light-bg-x","data-test-id":"configurator-content-scrollable"},nv=Le({__name:"ProductConfiguration",props:{qliId:{type:String,required:!1}},setup(e){const n=dn(),t=te(!1),r=te(0),i=me(()=>n.configuration),o=e,a=me(()=>t.value?[{text:"Done",altText:"Done",type:"primary",style:"primary",handler:()=>s()}]:[{text:o.qliId?"Save":"Add To Quote",altText:"Save",type:n.isChangedConfiguration?"primary":"secondary",style:"primary",disabled:!n.isChangedConfiguration,handler:()=>u()}]),s=()=>{t.value=!1},u=()=>{console.info("Save"),n.maintainQuoteConfiguration()};return(f,c)=>Fe(n).configuration?(U(),Y("div",J7,[Fe(n).savedScreen?(U(),ke(B4,{key:1})):(U(),Y(be,{key:0},[b("div",Y7,[b("div",ev,[ge("",!0),he(V7,{title:i.value.itemName,buttons:a.value},{"before-button":Ve(()=>[Fe(n).isYearlyPricingExist?(U(),ke(Z7,{key:0,modelValue:Fe(n).showYearlyPricing,"onUpdate:modelValue":[c[0]||(c[0]=v=>Fe(n).showYearlyPricing=v),Fe(n).changePricingScheme],"left-align":"",class:"ect-text-nowrap",text:{on:"Yearly Price",off:"Monthly Price"},"data-test-id":"configurator-switch-show-yearly-pricing"},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0)]),_:1},8,["title","buttons"])]),b("div",{class:we(t.value?"ect-pb-16":"ect-pb-0")},[he(c7,{config:i.value,"edit-attributes":t.value,scroll:r.value,onEditAttributes:c[1]||(c[1]=v=>t.value=!0)},null,8,["config","edit-attributes","scroll"])],2)]),t.value?ge("",!0):(U(),Y("div",tv,[he(Y3)]))],64))])):ge("",!0)}},[["__scopeId","data-v-053a707f"]]),rv=["data-item-id","data-qli-id"],iv={key:0,class:"ect-flex-1 ect-min-h-0"},ov={key:1,class:"ect-flex-1 ect-min-h-0"},av={__name:"Configurator",props:{itemId:{type:String,required:!0},qliId:{type:String,required:!1}},emits:["ready"],setup(e,{emit:n}){const t=e,r=n,i=te(!0),o=dn();return qn(async()=>{i.value=!0,console.time("CONFIGURATOR ON BEFORE MOUNT"),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","1"),await o.initConfigurator(t.itemId,t.qliId),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","2"),console.timeEnd("CONFIGURATOR ON BEFORE MOUNT"),r("ready"),i.value=!1}),(a,s)=>(U(),Y("div",{class:"ect-h-full ect-flex ect-flex-col","data-item-id":e.itemId,"data-qli-id":e.qliId},[i.value?(U(),Y("div",ov,[he($u)])):(U(),Y("div",iv,[he(nv,{"qli-id":e.qliId},null,8,["qli-id"])]))],8,rv))}},sv=(e=>(Xt("data-v-0be41a52"),e=e(),Wt(),e))(()=>b("div",{class:"dropdowntp"},null,-1)),lv=Le({__name:"ExpediteConfigurator",props:{setupData:{type:Object,required:!0},itemId:{type:String,required:!0},qliId:{type:String,required:!1},quoteId:{type:String,required:!1},apiKey:{type:String,required:!0}},emits:["ready"],setup(e,{emit:n}){const t=D0(),r=go(),i=Qt(),o=dn(),a=e,s=n,u=()=>{s("ready",o.exposeProperties())};return qn(()=>{const{orgType:f,orgId:c,userId:v}=a.setupData;o.initializeController(a.apiKey,f,c,v),t.quoteId=a.quoteId,t.setSetupData(a.setupData)}),(f,c)=>(U(),Y(be,null,[he(I2),he(Ga),Fe(i).errorPopup?(U(),ke(v2,{key:0,data:Fe(i).errorPopup,onClose:c[0]||(c[0]=v=>Fe(i).errorPopup=null)},null,8,["data"])):ge("",!0),Fe(r).unsavedChanges?(U(),ke(y2,{key:1,data:Fe(r).unsavedChanges,onClose:c[1]||(c[1]=v=>Fe(r).unsavedChanges=null)},null,8,["data"])):ge("",!0),sv,he(av,{"item-id":a.itemId,"qli-id":a.qliId,onReady:u},null,8,["item-id","qli-id"])],64))}},[["__scopeId","data-v-0be41a52"]]),cv=wt("mygpt",()=>{const e=te("");async function n(r,i="gpt-3.5-turbo",o=300){var a,s,u;if(!e.value)throw new Error("Secret key is required. Please set it in the store.");try{const f=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.value}`},body:JSON.stringify({model:i,messages:r,max_tokens:Math.min(o,300),temperature:.7})});if(!f.ok){const v=await f.json().catch(()=>({}));throw new Error(((a=v.error)==null?void 0:a.message)||`API Error: ${f.status} ${f.statusText}`)}return((u=(s=(await f.json()).choices[0])==null?void 0:s.message)==null?void 0:u.content)||"No response generated"}catch(f){throw new Error(f.message||"Failed to get response from GPT")}}function t(r){e.value=r}return{secretKey:e,getGptResponse:n,setSecretKey:t}}),xi=e=>(Xt("data-v-46273585"),e=e(),Wt(),e),uv={class:"custom-gpt-container"},fv={class:"gpt-header"},dv=xi(()=>b("h3",{class:"gpt-title"},"GPT Chat",-1)),hv={class:"gpt-response-area"},pv={key:0,class:"loading-indicator"},vv=[xi(()=>b("div",{class:"spinner"},null,-1)),xi(()=>b("span",null,"Thinking...",-1))],gv={key:1,class:"error-message"},mv=xi(()=>b("strong",null,"Error:",-1)),yv={key:2,class:"response-content"},xv={key:3,class:"empty-state"},_v=[xi(()=>b("p",null,"Enter a message below to start a conversation with GPT 5.0",-1))],bv={class:"gpt-input-area"},Cv={class:"input-wrapper"},wv=["placeholder","disabled"],Ev=["disabled"],Av={key:0},kv={key:1},Ov={key:0,class:"warning-message"},Sv=Le({__name:"ExpediteGPT",props:{secretKey:{type:String,required:!1,default:""},model:{type:String,required:!1,default:"gpt-3.5-turbo"},maxTokens:{type:Number,required:!1,default:300},placeholder:{type:String,required:!1,default:"Enter your message..."}},setup(e){const n=e,t=cv(),r=me(()=>n.secretKey||t.secretKey),i=te(""),o=te(""),a=te(!1),s=te(null),u=te([]),f=me(()=>o.value.trim().length>0),c=me(()=>i.value.trim().length>0&&!a.value&&r.value),v=async()=>{if(!c.value)return;const p=i.value.trim();if(p){a.value=!0,s.value=null,i.value="";try{u.value.push({role:"user",content:p});const g=u.value.reduce((y,_)=>y+Math.ceil(_.content.length/4),0);let d=[...u.value];g>n.maxTokens&&(d=u.value.slice(-3));const m=await t.getGptResponse(d,n.model,n.maxTokens);o.value=m,u.value.push({role:"assistant",content:m})}catch(g){s.value=g.message||"Failed to get response from GPT",console.error("GPT API Error:",g)}finally{a.value=!1}}},l=p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),v())},h=()=>{u.value=[],o.value="",s.value=null};return qn(()=>{t.setSecretKey(n.secretKey)}),(p,g)=>(U(),Y("div",uv,[b("div",fv,[dv,f.value||u.value.length>0?(U(),Y("button",{key:0,onClick:h,class:"clear-button",type:"button"}," Clear ")):ge("",!0)]),b("div",hv,[a.value?(U(),Y("div",pv,vv)):s.value?(U(),Y("div",gv,[mv,Ne(" "+xe(s.value),1)])):f.value?(U(),Y("div",yv,xe(o.value),1)):(U(),Y("div",xv,_v))]),b("div",bv,[b("div",Cv,[ln(b("textarea",{"onUpdate:modelValue":g[0]||(g[0]=d=>i.value=d),placeholder:e.placeholder,disabled:a.value||!r.value,onKeypress:l,class:"gpt-input",rows:"3"},null,40,wv),[[li,i.value]]),b("button",{onClick:v,disabled:!c.value,class:"send-button",type:"button"},[a.value?(U(),Y("span",Av,"...")):(U(),Y("span",kv,"Send"))],8,Ev)]),r.value?ge("",!0):(U(),Y("div",Ov," ⚠️ Secret key is required to use this component. Set it via prop or in the store. "))])]))}},[["__scopeId","data-v-46273585"]]),qo="tsocustomer2.expedite1.com",_i="https://csimqu3mn5g6pjhq6mki4qdayu.appsync-api.us-east-1.amazonaws.com/graphql",$o="da2-vag5nadijfegloywmu7rikapfi";var G0={exports:{}};function Iv(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bs={exports:{}};const Tv=L8(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Q0;function qe(){return Q0||(Q0=1,function(e,n){(function(t,r){e.exports=r()})(Se,function(){var t=t||function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Se<"u"&&Se.crypto&&(o=Se.crypto),!o&&typeof Iv=="function")try{o=Tv}catch{}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function y(){}return function(_){var x;return y.prototype=_,x=new y,y.prototype=null,x}}(),u={},f=u.lib={},c=f.Base=function(){return{extend:function(y){var _=s(this);return y&&_.mixIn(y),(!_.hasOwnProperty("init")||this.init===_.init)&&(_.init=function(){_.$super.init.apply(this,arguments)}),_.init.prototype=_,_.$super=this,_},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var _ in y)y.hasOwnProperty(_)&&(this[_]=y[_]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),v=f.WordArray=c.extend({init:function(y,_){y=this.words=y||[],_!=i?this.sigBytes=_:this.sigBytes=y.length*4},toString:function(y){return(y||h).stringify(this)},concat:function(y){var _=this.words,x=y.words,C=this.sigBytes,S=y.sigBytes;if(this.clamp(),C%4)for(var A=0;A<S;A++){var I=x[A>>>2]>>>24-A%4*8&255;_[C+A>>>2]|=I<<24-(C+A)%4*8}else for(var B=0;B<S;B+=4)_[C+B>>>2]=x[B>>>2];return this.sigBytes+=S,this},clamp:function(){var y=this.words,_=this.sigBytes;y[_>>>2]&=4294967295<<32-_%4*8,y.length=r.ceil(_/4)},clone:function(){var y=c.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var _=[],x=0;x<y;x+=4)_.push(a());return new v.init(_,y)}}),l=u.enc={},h=l.Hex={stringify:function(y){for(var _=y.words,x=y.sigBytes,C=[],S=0;S<x;S++){var A=_[S>>>2]>>>24-S%4*8&255;C.push((A>>>4).toString(16)),C.push((A&15).toString(16))}return C.join("")},parse:function(y){for(var _=y.length,x=[],C=0;C<_;C+=2)x[C>>>3]|=parseInt(y.substr(C,2),16)<<24-C%8*4;return new v.init(x,_/2)}},p=l.Latin1={stringify:function(y){for(var _=y.words,x=y.sigBytes,C=[],S=0;S<x;S++){var A=_[S>>>2]>>>24-S%4*8&255;C.push(String.fromCharCode(A))}return C.join("")},parse:function(y){for(var _=y.length,x=[],C=0;C<_;C++)x[C>>>2]|=(y.charCodeAt(C)&255)<<24-C%4*8;return new v.init(x,_)}},g=l.Utf8={stringify:function(y){try{return decodeURIComponent(escape(p.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return p.parse(unescape(encodeURIComponent(y)))}},d=f.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new v.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=g.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var _,x=this._data,C=x.words,S=x.sigBytes,A=this.blockSize,I=A*4,B=S/I;y?B=r.ceil(B):B=r.max((B|0)-this._minBufferSize,0);var O=B*A,E=r.min(O*4,S);if(O){for(var k=0;k<O;k+=A)this._doProcessBlock(C,k);_=C.splice(0,O),x.sigBytes-=E}return new v.init(_,E)},clone:function(){var y=c.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});f.Hasher=d.extend({cfg:c.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var _=this._doFinalize();return _},blockSize:16,_createHelper:function(y){return function(_,x){return new y.init(x).finalize(_)}},_createHmacHelper:function(y){return function(_,x){return new m.HMAC.init(y,x).finalize(_)}}});var m=u.algo={};return u}(Math);return t})}(bs)),bs.exports}var Cs={exports:{}},Z0;function jo(){return Z0||(Z0=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.Base,s=o.WordArray,u=i.x64={};u.Word=a.extend({init:function(f,c){this.high=f,this.low=c}}),u.WordArray=a.extend({init:function(f,c){f=this.words=f||[],c!=r?this.sigBytes=c:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,c=f.length,v=[],l=0;l<c;l++){var h=f[l];v.push(h.high),v.push(h.low)}return s.create(v,this.sigBytes)},clone:function(){for(var f=a.clone.call(this),c=f.words=this.words.slice(0),v=c.length,l=0;l<v;l++)c[l]=c[l].clone();return f}})}(),t})}(Cs)),Cs.exports}var ws={exports:{}},J0;function Bv(){return J0||(J0=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,i=r.lib,o=i.WordArray,a=o.init,s=o.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray<"u"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var f=u.byteLength,c=[],v=0;v<f;v++)c[v>>>2]|=u[v]<<24-v%4*8;a.call(this,c,f)}else a.apply(this,arguments)};s.prototype=o}}(),t.lib.WordArray})}(ws)),ws.exports}var Es={exports:{}},Y0;function Dv(){return Y0||(Y0=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Utf16=a.Utf16BE={stringify:function(u){for(var f=u.words,c=u.sigBytes,v=[],l=0;l<c;l+=2){var h=f[l>>>2]>>>16-l%4*8&65535;v.push(String.fromCharCode(h))}return v.join("")},parse:function(u){for(var f=u.length,c=[],v=0;v<f;v++)c[v>>>1]|=u.charCodeAt(v)<<16-v%2*16;return o.create(c,f*2)}},a.Utf16LE={stringify:function(u){for(var f=u.words,c=u.sigBytes,v=[],l=0;l<c;l+=2){var h=s(f[l>>>2]>>>16-l%4*8&65535);v.push(String.fromCharCode(h))}return v.join("")},parse:function(u){for(var f=u.length,c=[],v=0;v<f;v++)c[v>>>1]|=s(u.charCodeAt(v)<<16-v%2*16);return o.create(c,f*2)}};function s(u){return u<<8&4278255360|u>>>8&16711935}}(),t.enc.Utf16})}(Es)),Es.exports}var As={exports:{}},ef;function fr(){return ef||(ef=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(u){var f=u.words,c=u.sigBytes,v=this._map;u.clamp();for(var l=[],h=0;h<c;h+=3)for(var p=f[h>>>2]>>>24-h%4*8&255,g=f[h+1>>>2]>>>24-(h+1)%4*8&255,d=f[h+2>>>2]>>>24-(h+2)%4*8&255,m=p<<16|g<<8|d,y=0;y<4&&h+y*.75<c;y++)l.push(v.charAt(m>>>6*(3-y)&63));var _=v.charAt(64);if(_)for(;l.length%4;)l.push(_);return l.join("")},parse:function(u){var f=u.length,c=this._map,v=this._reverseMap;if(!v){v=this._reverseMap=[];for(var l=0;l<c.length;l++)v[c.charCodeAt(l)]=l}var h=c.charAt(64);if(h){var p=u.indexOf(h);p!==-1&&(f=p)}return s(u,f,v)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(u,f,c){for(var v=[],l=0,h=0;h<f;h++)if(h%4){var p=c[u.charCodeAt(h-1)]<<h%4*2,g=c[u.charCodeAt(h)]>>>6-h%4*2,d=p|g;v[l>>>2]|=d<<24-l%4*8,l++}return o.create(v,l)}}(),t.enc.Base64})}(As)),As.exports}var ks={exports:{}},tf;function Rv(){return tf||(tf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Base64url={stringify:function(u,f){f===void 0&&(f=!0);var c=u.words,v=u.sigBytes,l=f?this._safe_map:this._map;u.clamp();for(var h=[],p=0;p<v;p+=3)for(var g=c[p>>>2]>>>24-p%4*8&255,d=c[p+1>>>2]>>>24-(p+1)%4*8&255,m=c[p+2>>>2]>>>24-(p+2)%4*8&255,y=g<<16|d<<8|m,_=0;_<4&&p+_*.75<v;_++)h.push(l.charAt(y>>>6*(3-_)&63));var x=l.charAt(64);if(x)for(;h.length%4;)h.push(x);return h.join("")},parse:function(u,f){f===void 0&&(f=!0);var c=u.length,v=f?this._safe_map:this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var h=0;h<v.length;h++)l[v.charCodeAt(h)]=h}var p=v.charAt(64);if(p){var g=u.indexOf(p);g!==-1&&(c=g)}return s(u,c,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function s(u,f,c){for(var v=[],l=0,h=0;h<f;h++)if(h%4){var p=c[u.charCodeAt(h-1)]<<h%4*2,g=c[u.charCodeAt(h)]>>>6-h%4*2,d=p|g;v[l>>>2]|=d<<24-l%4*8,l++}return o.create(v,l)}}(),t.enc.Base64url})}(ks)),ks.exports}var Os={exports:{}},nf;function dr(){return nf||(nf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,f=[];(function(){for(var g=0;g<64;g++)f[g]=r.abs(r.sin(g+1))*4294967296|0})();var c=u.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,d){for(var m=0;m<16;m++){var y=d+m,_=g[y];g[y]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var x=this._hash.words,C=g[d+0],S=g[d+1],A=g[d+2],I=g[d+3],B=g[d+4],O=g[d+5],E=g[d+6],k=g[d+7],R=g[d+8],F=g[d+9],q=g[d+10],Z=g[d+11],ee=g[d+12],ne=g[d+13],Q=g[d+14],N=g[d+15],w=x[0],D=x[1],L=x[2],$=x[3];w=v(w,D,L,$,C,7,f[0]),$=v($,w,D,L,S,12,f[1]),L=v(L,$,w,D,A,17,f[2]),D=v(D,L,$,w,I,22,f[3]),w=v(w,D,L,$,B,7,f[4]),$=v($,w,D,L,O,12,f[5]),L=v(L,$,w,D,E,17,f[6]),D=v(D,L,$,w,k,22,f[7]),w=v(w,D,L,$,R,7,f[8]),$=v($,w,D,L,F,12,f[9]),L=v(L,$,w,D,q,17,f[10]),D=v(D,L,$,w,Z,22,f[11]),w=v(w,D,L,$,ee,7,f[12]),$=v($,w,D,L,ne,12,f[13]),L=v(L,$,w,D,Q,17,f[14]),D=v(D,L,$,w,N,22,f[15]),w=l(w,D,L,$,S,5,f[16]),$=l($,w,D,L,E,9,f[17]),L=l(L,$,w,D,Z,14,f[18]),D=l(D,L,$,w,C,20,f[19]),w=l(w,D,L,$,O,5,f[20]),$=l($,w,D,L,q,9,f[21]),L=l(L,$,w,D,N,14,f[22]),D=l(D,L,$,w,B,20,f[23]),w=l(w,D,L,$,F,5,f[24]),$=l($,w,D,L,Q,9,f[25]),L=l(L,$,w,D,I,14,f[26]),D=l(D,L,$,w,R,20,f[27]),w=l(w,D,L,$,ne,5,f[28]),$=l($,w,D,L,A,9,f[29]),L=l(L,$,w,D,k,14,f[30]),D=l(D,L,$,w,ee,20,f[31]),w=h(w,D,L,$,O,4,f[32]),$=h($,w,D,L,R,11,f[33]),L=h(L,$,w,D,Z,16,f[34]),D=h(D,L,$,w,Q,23,f[35]),w=h(w,D,L,$,S,4,f[36]),$=h($,w,D,L,B,11,f[37]),L=h(L,$,w,D,k,16,f[38]),D=h(D,L,$,w,q,23,f[39]),w=h(w,D,L,$,ne,4,f[40]),$=h($,w,D,L,C,11,f[41]),L=h(L,$,w,D,I,16,f[42]),D=h(D,L,$,w,E,23,f[43]),w=h(w,D,L,$,F,4,f[44]),$=h($,w,D,L,ee,11,f[45]),L=h(L,$,w,D,N,16,f[46]),D=h(D,L,$,w,A,23,f[47]),w=p(w,D,L,$,C,6,f[48]),$=p($,w,D,L,k,10,f[49]),L=p(L,$,w,D,Q,15,f[50]),D=p(D,L,$,w,O,21,f[51]),w=p(w,D,L,$,ee,6,f[52]),$=p($,w,D,L,I,10,f[53]),L=p(L,$,w,D,q,15,f[54]),D=p(D,L,$,w,S,21,f[55]),w=p(w,D,L,$,R,6,f[56]),$=p($,w,D,L,N,10,f[57]),L=p(L,$,w,D,E,15,f[58]),D=p(D,L,$,w,ne,21,f[59]),w=p(w,D,L,$,B,6,f[60]),$=p($,w,D,L,Z,10,f[61]),L=p(L,$,w,D,A,15,f[62]),D=p(D,L,$,w,F,21,f[63]),x[0]=x[0]+w|0,x[1]=x[1]+D|0,x[2]=x[2]+L|0,x[3]=x[3]+$|0},_doFinalize:function(){var g=this._data,d=g.words,m=this._nDataBytes*8,y=g.sigBytes*8;d[y>>>5]|=128<<24-y%32;var _=r.floor(m/4294967296),x=m;d[(y+64>>>9<<4)+15]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,d[(y+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,g.sigBytes=(d.length+1)*4,this._process();for(var C=this._hash,S=C.words,A=0;A<4;A++){var I=S[A];S[A]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}return C},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});function v(g,d,m,y,_,x,C){var S=g+(d&m|~d&y)+_+C;return(S<<x|S>>>32-x)+d}function l(g,d,m,y,_,x,C){var S=g+(d&y|m&~y)+_+C;return(S<<x|S>>>32-x)+d}function h(g,d,m,y,_,x,C){var S=g+(d^m^y)+_+C;return(S<<x|S>>>32-x)+d}function p(g,d,m,y,_,x,C){var S=g+(m^(d|~y))+_+C;return(S<<x|S>>>32-x)+d}i.MD5=s._createHelper(c),i.HmacMD5=s._createHmacHelper(c)}(Math),t.MD5})}(Os)),Os.exports}var Ss={exports:{}},rf;function of(){return rf||(rf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=i.Hasher,s=r.algo,u=[],f=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,v){for(var l=this._hash.words,h=l[0],p=l[1],g=l[2],d=l[3],m=l[4],y=0;y<80;y++){if(y<16)u[y]=c[v+y]|0;else{var _=u[y-3]^u[y-8]^u[y-14]^u[y-16];u[y]=_<<1|_>>>31}var x=(h<<5|h>>>27)+m+u[y];y<20?x+=(p&g|~p&d)+1518500249:y<40?x+=(p^g^d)+1859775393:y<60?x+=(p&g|p&d|g&d)-1894007588:x+=(p^g^d)-899497514,m=d,d=g,g=p<<30|p>>>2,p=h,h=x}l[0]=l[0]+h|0,l[1]=l[1]+p|0,l[2]=l[2]+g|0,l[3]=l[3]+d|0,l[4]=l[4]+m|0},_doFinalize:function(){var c=this._data,v=c.words,l=this._nDataBytes*8,h=c.sigBytes*8;return v[h>>>5]|=128<<24-h%32,v[(h+64>>>9<<4)+14]=Math.floor(l/4294967296),v[(h+64>>>9<<4)+15]=l,c.sigBytes=v.length*4,this._process(),this._hash},clone:function(){var c=a.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=a._createHelper(f),r.HmacSHA1=a._createHmacHelper(f)}(),t.SHA1})}(Ss)),Ss.exports}var Is={exports:{}},af;function Ts(){return af||(af=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,f=[],c=[];(function(){function h(m){for(var y=r.sqrt(m),_=2;_<=y;_++)if(!(m%_))return!1;return!0}function p(m){return(m-(m|0))*4294967296|0}for(var g=2,d=0;d<64;)h(g)&&(d<8&&(f[d]=p(r.pow(g,1/2))),c[d]=p(r.pow(g,1/3)),d++),g++})();var v=[],l=u.SHA256=s.extend({_doReset:function(){this._hash=new a.init(f.slice(0))},_doProcessBlock:function(h,p){for(var g=this._hash.words,d=g[0],m=g[1],y=g[2],_=g[3],x=g[4],C=g[5],S=g[6],A=g[7],I=0;I<64;I++){if(I<16)v[I]=h[p+I]|0;else{var B=v[I-15],O=(B<<25|B>>>7)^(B<<14|B>>>18)^B>>>3,E=v[I-2],k=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;v[I]=O+v[I-7]+k+v[I-16]}var R=x&C^~x&S,F=d&m^d&y^m&y,q=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),Z=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),ee=A+Z+R+c[I]+v[I],ne=q+F;A=S,S=C,C=x,x=_+ee|0,_=y,y=m,m=d,d=ee+ne|0}g[0]=g[0]+d|0,g[1]=g[1]+m|0,g[2]=g[2]+y|0,g[3]=g[3]+_|0,g[4]=g[4]+x|0,g[5]=g[5]+C|0,g[6]=g[6]+S|0,g[7]=g[7]+A|0},_doFinalize:function(){var h=this._data,p=h.words,g=this._nDataBytes*8,d=h.sigBytes*8;return p[d>>>5]|=128<<24-d%32,p[(d+64>>>9<<4)+14]=r.floor(g/4294967296),p[(d+64>>>9<<4)+15]=g,h.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var h=s.clone.call(this);return h._hash=this._hash.clone(),h}});i.SHA256=s._createHelper(l),i.HmacSHA256=s._createHmacHelper(l)}(Math),t.SHA256})}(Is)),Is.exports}var Bs={exports:{}},sf;function Lv(){return sf||(sf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),Ts())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.algo,s=a.SHA256,u=a.SHA224=s.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=s._doFinalize.call(this);return f.sigBytes-=4,f}});r.SHA224=s._createHelper(u),r.HmacSHA224=s._createHmacHelper(u)}(),t.SHA224})}(Bs)),Bs.exports}var Ds={exports:{}},lf;function cf(){return lf||(lf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.Hasher,a=r.x64,s=a.Word,u=a.WordArray,f=r.algo;function c(){return s.create.apply(s,arguments)}var v=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];(function(){for(var p=0;p<80;p++)l[p]=c()})();var h=f.SHA512=o.extend({_doReset:function(){this._hash=new u.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(p,g){for(var d=this._hash.words,m=d[0],y=d[1],_=d[2],x=d[3],C=d[4],S=d[5],A=d[6],I=d[7],B=m.high,O=m.low,E=y.high,k=y.low,R=_.high,F=_.low,q=x.high,Z=x.low,ee=C.high,ne=C.low,Q=S.high,N=S.low,w=A.high,D=A.low,L=I.high,$=I.low,G=B,j=O,W=E,M=k,H=R,V=F,K=q,J=Z,P=ee,X=ne,se=Q,fe=N,ce=w,ie=D,oe=L,le=$,ue=0;ue<80;ue++){var ae,ve,ye=l[ue];if(ue<16)ve=ye.high=p[g+ue*2]|0,ae=ye.low=p[g+ue*2+1]|0;else{var _e=l[ue-15],Ce=_e.high,Ae=_e.low,Ee=(Ce>>>1|Ae<<31)^(Ce>>>8|Ae<<24)^Ce>>>7,$e=(Ae>>>1|Ce<<31)^(Ae>>>8|Ce<<24)^(Ae>>>7|Ce<<25),Te=l[ue-2],Ke=Te.high,dt=Te.low,Xn=(Ke>>>19|dt<<13)^(Ke<<3|dt>>>29)^Ke>>>6,Bt=(dt>>>19|Ke<<13)^(dt<<3|Ke>>>29)^(dt>>>6|Ke<<26),Vt=l[ue-7],it=Vt.high,st=Vt.low,Mt=l[ue-16],qt=Mt.high,kn=Mt.low;ae=$e+st,ve=Ee+it+(ae>>>0<$e>>>0?1:0),ae=ae+Bt,ve=ve+Xn+(ae>>>0<Bt>>>0?1:0),ae=ae+kn,ve=ve+qt+(ae>>>0<kn>>>0?1:0),ye.high=ve,ye.low=ae}var gr=P&se^~P&ce,gn=X&fe^~X&ie,mr=G&W^G&H^W&H,On=j&M^j&V^M&V,yr=(G>>>28|j<<4)^(G<<30|j>>>2)^(G<<25|j>>>7),Wn=(j>>>28|G<<4)^(j<<30|G>>>2)^(j<<25|G>>>7),xr=(P>>>14|X<<18)^(P>>>18|X<<14)^(P<<23|X>>>9),mn=(X>>>14|P<<18)^(X>>>18|P<<14)^(X<<23|P>>>9),_r=v[ue],nn=_r.high,Mr=_r.low,ht=le+mn,Ut=oe+xr+(ht>>>0<le>>>0?1:0),ht=ht+gn,Ut=Ut+gr+(ht>>>0<gn>>>0?1:0),ht=ht+Mr,Ut=Ut+nn+(ht>>>0<Mr>>>0?1:0),ht=ht+ae,Ut=Ut+ve+(ht>>>0<ae>>>0?1:0),br=Wn+On,Cr=yr+mr+(br>>>0<Wn>>>0?1:0);oe=ce,le=ie,ce=se,ie=fe,se=P,fe=X,X=J+ht|0,P=K+Ut+(X>>>0<J>>>0?1:0)|0,K=H,J=V,H=W,V=M,W=G,M=j,j=ht+br|0,G=Ut+Cr+(j>>>0<ht>>>0?1:0)|0}O=m.low=O+j,m.high=B+G+(O>>>0<j>>>0?1:0),k=y.low=k+M,y.high=E+W+(k>>>0<M>>>0?1:0),F=_.low=F+V,_.high=R+H+(F>>>0<V>>>0?1:0),Z=x.low=Z+J,x.high=q+K+(Z>>>0<J>>>0?1:0),ne=C.low=ne+X,C.high=ee+P+(ne>>>0<X>>>0?1:0),N=S.low=N+fe,S.high=Q+se+(N>>>0<fe>>>0?1:0),D=A.low=D+ie,A.high=w+ce+(D>>>0<ie>>>0?1:0),$=I.low=$+le,I.high=L+oe+($>>>0<le>>>0?1:0)},_doFinalize:function(){var p=this._data,g=p.words,d=this._nDataBytes*8,m=p.sigBytes*8;g[m>>>5]|=128<<24-m%32,g[(m+128>>>10<<5)+30]=Math.floor(d/4294967296),g[(m+128>>>10<<5)+31]=d,p.sigBytes=g.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});r.SHA512=o._createHelper(h),r.HmacSHA512=o._createHmacHelper(h)}(),t.SHA512})}(Ds)),Ds.exports}var Rs={exports:{}},uf;function Fv(){return uf||(uf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo(),cf())})(Se,function(t){return function(){var r=t,i=r.x64,o=i.Word,a=i.WordArray,s=r.algo,u=s.SHA512,f=s.SHA384=u.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var c=u._doFinalize.call(this);return c.sigBytes-=16,c}});r.SHA384=u._createHelper(f),r.HmacSHA384=u._createHmacHelper(f)}(),t.SHA384})}(Rs)),Rs.exports}var Ls={exports:{}},ff;function Nv(){return ff||(ff=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.x64,f=u.Word,c=i.algo,v=[],l=[],h=[];(function(){for(var d=1,m=0,y=0;y<24;y++){v[d+5*m]=(y+1)*(y+2)/2%64;var _=m%5,x=(2*d+3*m)%5;d=_,m=x}for(var d=0;d<5;d++)for(var m=0;m<5;m++)l[d+5*m]=m+(2*d+3*m)%5*5;for(var C=1,S=0;S<24;S++){for(var A=0,I=0,B=0;B<7;B++){if(C&1){var O=(1<<B)-1;O<32?I^=1<<O:A^=1<<O-32}C&128?C=C<<1^113:C<<=1}h[S]=f.create(A,I)}})();var p=[];(function(){for(var d=0;d<25;d++)p[d]=f.create()})();var g=c.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var d=this._state=[],m=0;m<25;m++)d[m]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(d,m){for(var y=this._state,_=this.blockSize/2,x=0;x<_;x++){var C=d[m+2*x],S=d[m+2*x+1];C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var A=y[x];A.high^=S,A.low^=C}for(var I=0;I<24;I++){for(var B=0;B<5;B++){for(var O=0,E=0,k=0;k<5;k++){var A=y[B+5*k];O^=A.high,E^=A.low}var R=p[B];R.high=O,R.low=E}for(var B=0;B<5;B++)for(var F=p[(B+4)%5],q=p[(B+1)%5],Z=q.high,ee=q.low,O=F.high^(Z<<1|ee>>>31),E=F.low^(ee<<1|Z>>>31),k=0;k<5;k++){var A=y[B+5*k];A.high^=O,A.low^=E}for(var ne=1;ne<25;ne++){var O,E,A=y[ne],Q=A.high,N=A.low,w=v[ne];w<32?(O=Q<<w|N>>>32-w,E=N<<w|Q>>>32-w):(O=N<<w-32|Q>>>64-w,E=Q<<w-32|N>>>64-w);var D=p[l[ne]];D.high=O,D.low=E}var L=p[0],$=y[0];L.high=$.high,L.low=$.low;for(var B=0;B<5;B++)for(var k=0;k<5;k++){var ne=B+5*k,A=y[ne],G=p[ne],j=p[(B+1)%5+5*k],W=p[(B+2)%5+5*k];A.high=G.high^~j.high&W.high,A.low=G.low^~j.low&W.low}var A=y[0],M=h[I];A.high^=M.high,A.low^=M.low}},_doFinalize:function(){var d=this._data,m=d.words;this._nDataBytes*8;var y=d.sigBytes*8,_=this.blockSize*32;m[y>>>5]|=1<<24-y%32,m[(r.ceil((y+1)/_)*_>>>5)-1]|=128,d.sigBytes=m.length*4,this._process();for(var x=this._state,C=this.cfg.outputLength/8,S=C/8,A=[],I=0;I<S;I++){var B=x[I],O=B.high,E=B.low;O=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,A.push(E),A.push(O)}return new a.init(A,C)},clone:function(){for(var d=s.clone.call(this),m=d._state=this._state.slice(0),y=0;y<25;y++)m[y]=m[y].clone();return d}});i.SHA3=s._createHelper(g),i.HmacSHA3=s._createHmacHelper(g)}(Math),t.SHA3})}(Ls)),Ls.exports}var Fs={exports:{}},df;function Pv(){return df||(df=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){/** @preserve
86
+ or use v-on:ready="onReady(quill)" event instead.`},y=(E,k)=>e.contentType==="html"?S():e.contentType==="text"?x(E,k):t==null?void 0:t.getContents(E,k),_=(E,k="api")=>{const R=E||(e.contentType==="delta"?new G8:"");e.contentType==="html"?A(R):e.contentType==="text"?C(R,k):t==null||t.setContents(R,k),f=s(R)},x=(E,k)=>{var R;return(R=t==null?void 0:t.getText(E,k))!==null&&R!==void 0?R:""},C=(E,k="api")=>{t==null||t.setText(E,k)},S=()=>{var E;return(E=t==null?void 0:t.root.innerHTML)!==null&&E!==void 0?E:""},A=E=>{t&&(t.root.innerHTML=E)},I=(E,k="api")=>{const R=t==null?void 0:t.clipboard.convert(E);R&&(t==null||t.setContents(R,k))},B=()=>{t==null||t.focus()},O=()=>{sn(()=>{var E;!n.slots.toolbar&&t&&((E=t.getModule("toolbar"))===null||E===void 0||E.container.remove()),o()})};return Ye(()=>e.content,E=>{if(!t||!E||c(E))return;const k=t.getSelection();k&&sn(()=>t==null?void 0:t.setSelection(k)),_(E)},{deep:!0}),Ye(()=>e.enable,E=>{t&&t.enable(E)}),{editor:i,getEditor:g,getToolbar:d,getQuill:m,getContents:y,setContents:_,getHTML:S,setHTML:A,pasteHTML:I,focus:B,getText:x,setText:C,reinit:O}},render(){var e,n;return[(n=(e=this.$slots).toolbar)===null||n===void 0?void 0:n.call(e),eh("div",{ref:"editor",...this.$attrs})]}}),Z8={class:"input"},J8=["for","data-test-id"],Y8=["data-test-id"],ep=Le({__name:"RichTextEditor",props:{modelValue:{type:String,default:""},editorOptions:{type:Object,default:()=>({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"})},dataTestId:{type:String,default:""},label:{type:String,default:""},required:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["update:modelValue"],setup(e){const n=e,t=me(()=>typeof n.error=="string"?n.error:n.error===""?!1:n.error===!0?`${n.label||"Field"} is required`:n.error),r=te("");return qn(()=>{r.value=n.modelValue}),(i,o)=>(U(),Y("div",Z8,[e.label?(U(),Y("label",{key:0,class:we({error_color:!!e.error}),for:e.label,"data-test-id":`${e.dataTestId}-label`},[Ne(xe(e.label)+" ",1),e.required?(U(),Y("span",{key:0,class:we({error_color:!!e.error})},"*",2)):ge("",!0)],10,J8)):ge("",!0),he(Fe(Q8),{"content-type":"html",toolbar:e.editorOptions,"model-value":e.modelValue,"data-test-id":e.dataTestId,content:r.value,"onUpdate:content":o[0]||(o[0]=a=>i.$emit("update:modelValue",a))},null,8,["toolbar","model-value","data-test-id","content"]),t.value?(U(),Y("div",{key:1,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${e.dataTestId}-error`},xe(t.value),9,Y8)):ge("",!0)]))}},[["__scopeId","data-v-76aecac0"]]),tp={class:"ect-w-full ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-rounded-md ect-border-1 ect-border-gray-200 md:ect-gap-5 lg:ect-gap-6","data-test-id":"configurator-inputs-container"},np={key:0,class:"ect-text-sm ect-font-regular ect-text-gray-900"},rp={class:"ect-grid ect-grid-cols-1 sm:ect-grid-cols-2 ect-gap-4"},ip={key:0,class:"ect-col-span-2"},op=["data-test-id"],ap=["id","onUpdate:modelValue","disabled","data-test-id"],sp=["for","data-test-id"],lp={key:2,class:"quill-editor-styles"},cp=b("div",{class:"dropdowntp"},null,-1),up=b("div",{id:"modals"},null,-1),W0={__name:"InputsContainer",props:{title:{type:String,default:""},lookup:{type:Object,default:()=>null},attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(e){const n=dn(),t=e,r=te({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"}),i=te(t.lookup),o=me(()=>{const u=t.lookup.relatedFields.map(f=>f.child);return u.push("Name"),u});function a(u,f){const c=f.options.find(v=>v.Id===u);u===null?(f.options=[],f.value=null,f.relatedFields.forEach(v=>{v.value=null})):(f.value=c.Name,f.relatedFields.forEach(v=>{v.value=c[v.child]}))}const s=or(async function(u,f){f.loading=!0;const c={objectType:f.referenceObject,searchText:u||"",lstFields:o.value||[]},v=await n.getRecords(c);f.options=v,f.loading=!1});return(u,f)=>(U(),Y(be,null,[b("div",tp,[e.title?(U(),Y("div",np,xe(e.title),1)):ge("",!0),b("div",rp,[i.value?(U(),Y("div",ip,[he(R0,{modelValue:i.value.referenceRecordId,"onUpdate:modelValue":[f[0]||(f[0]=c=>i.value.referenceRecordId=c),f[1]||(f[1]=c=>a(c,i.value))],"data-test-id":`configurator-inputs-lookup-${i.value.attRecordId??u.index}`,label:i.value.label,options:i.value.options,disabled:!i.value.editable,required:i.value.required,loading:i.value.loading,property:{key:"Id",value:"Name"},lookup:"",search:"",highlight:"",onSearch:f[2]||(f[2]=c=>Fe(s)(c,i.value))},null,8,["modelValue","data-test-id","label","options","disabled","required","loading"])])):ge("",!0),(U(!0),Y(be,null,Me(e.attributes,(c,v)=>(U(),Y("div",{key:v,class:"attribute-input"},[c.dataType==="PICKLIST"||c.dataType==="MULTIPICKLIST"?(U(),ke(R0,{key:0,modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,placeholder:c.label,disabled:!c.editable,options:c.picklistValues.map(l=>({label:l,value:l})),select:"",highlight:"","data-test-id":`configurator-inputs-dropdown-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","placeholder","disabled","options","data-test-id"])):c.dataType==="BOOLEAN"?(U(),Y("div",{key:1,class:"ect-flex ect-items-center ect-gap-3 ect-py-3.5","data-test-id":`configurator-inputs-checkbox-${c.attRecordId??u.index}`},[ln(b("input",{id:`checkbox-${c.attRecordId??u.index}`,"onUpdate:modelValue":l=>c.value=l,type:"checkbox",disabled:!c.editable,class:"ect-w-4 ect-h-4 ect-accent-success ect-border-gray-300 ect-rounded ect-text-text-success focus:ect-ring-green-500","data-test-id":`configurator-inputs-checkbox-input-${c.attRecordId??u.index}`},null,8,ap),[[Va,c.value]]),b("label",{for:`checkbox-${c.attRecordId??u.index}`,class:"ect-text-sm ect-font-medium ect-text-gray-900 ect-cursor-pointer","data-test-id":`configurator-inputs-checkbox-label-${c.attRecordId??u.index}`},xe(c.label),9,sp)],8,op)):c.dataType==="TEXTAREA"?(U(),Y("div",lp,[he(ep,{modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,required:c.required,"editor-options":r.value,"data-test-id":`configurator-inputs-textarea-quill-editor-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","required","editor-options","data-test-id"])])):(U(),ke(c8,{key:3,modelValue:c.value,"onUpdate:modelValue":l=>c.value=l,label:c.label,disabled:!c.editable,highlight:"","data-test-id":`configurator-inputs-custom-${c.attRecordId??u.index}`},null,8,["modelValue","onUpdate:modelValue","label","disabled","data-test-id"]))]))),128))])]),cp,up],64))}},fp={class:"ect-w-full ect-flex ect-flex-col ect-gap-4","data-test-id":"configurator-inputs-container"},dp={class:"ect-bg-white ect-rounded-lg"},_s={__name:"AttributesContainer",props:{attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(e){const n=e,t=te([]),r=te([]),i=te({});return qn(()=>{const o={},a=[...n.attributes];a.forEach(u=>{u.dataType==="REFERENCE"&&(i.value[u.apiName]=["Name"],u.relatedFields=[],o[u.apiName]=u),u.editable=u.editable&&!u.apiName.includes(".")});let s=null;a.forEach(u=>{if(u.referenceObject==="XX_Base__Location__c"&&(s?u.firstLookup="Copy from "+s.label:s=u),u.apiName.includes(".")){const[f,c]=u.apiName.split(".");u.parent=f,u.child=c,i.value[f]!=null&&(i.value[f].push(c),o[f].relatedFields.push(u))}}),r.value=a.filter(u=>u.dataType==="REFERENCE"),t.value=a.filter(u=>!(u.apiName.includes(".")||u.dataType==="REFERENCE"))}),(o,a)=>(U(),Y("div",fp,[b("div",dp,[he(W0,{attributes:t.value},null,8,["attributes"])]),(U(!0),Y(be,null,Me(r.value,s=>(U(),Y("div",{key:s.attRecordId,class:"ect-bg-white ect-rounded-lg"},[he(W0,{title:s.referenceLabel+" Lookup",lookup:s,attributes:s.relatedFields},null,8,["title","lookup","attributes"])]))),128))]))}},hp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},pp=b("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1),vp={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},gp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},mp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},yp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},xp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},_p={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},bp={__name:"AttributesModal",props:{option:{type:Object,required:!0},attributes:{type:Array,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=n,r=e,i=me(()=>JSON.parse(JSON.stringify(r.attributes))),o=()=>{t("close")},a=()=>{t("done",i.value),t("close")};return(s,u)=>(U(),ke(Wa,{header:"",title:"Update Attributes Values",description:"Update the values associated with selected attributes.",footer:"","no-close":"",onClose:o},{content:Ve(()=>[b("header",hp,[pp,b("div",vp,[b("p",gp,xe(e.option.itemName),1),b("p",mp,xe(e.option.qty),1),b("p",yp,xe(e.option.price),1)])]),b("main",xp,[he(_s,{attributes:i.value},null,8,["attributes"])])]),footer:Ve(()=>[b("div",_p,[he(Ht,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"attributes-modal-button-cancel",onClick:u[0]||(u[0]=f=>t("close"))},{default:Ve(()=>[Ne("Cancel")]),_:1}),he(Ht,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"attributes-modal-button-done",onClick:a},{default:Ve(()=>[Ne("Done")]),_:1})])]),_:1}))}},Cp=["data-test-id"],wp=["data-test-id"],Ep=["data-test-id"],Ap={class:"ect-bg-white ect-rounded-xl ect-shadow-sm"},kp={class:"ect-relative ect-w-full ect-border-b ect-border-solid ect-border-b-neutral-200 max-md:ect-max-w-full"},Op={key:0,class:"ect-flex ect-z-0 ect-flex-col ect-gap-4 ect-justify-center ect-py-4 ect-px-6 ect-w-full max-md:ect-px-5 max-md:ect-max-w-full"},Sp={class:"ect-gap-1 ect-w-full max-md:ect-max-w-full"},Ip={class:"ect-text-lg ect-font-semibold ect-leading-5 ect-text-neutral-700 max-md:ect-max-w-full"},Tp={key:0,class:"ect-mt-1 ect-text-sm ect-leading-none ect-text-zinc-600 max-md:ect-max-w-full"},Bp={class:"ect-flex ect-overflow-hidden ect-absolute ect-top-2.5 ect-right-4 ect-z-0 ect-p-1 ect-rounded-lg"},Dp={key:0,class:"ect-flex-1 ect-overflow-y-auto ect-h-[600px] ect-max-h-[70vh]"},Rp={key:1,class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-xs ect-leading-4 ect-text-neutral-700 max-md:ect-px-5 max-md:ect-max-w-full"},Lp={key:2,class:"ect-relative ect-w-full ect-border-t ect-border-solid ect-border-t-neutral-200 max-md:ect-max-w-full"},Fp=Le({__name:"AppModalGen3",props:{title:{type:String,required:!0},description:{type:String,required:!0},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:n}){const t=n;return(r,i)=>(U(),ke(Nu,{to:"modaltp"},{default:Ve(()=>[b("div",{class:"modal-mask","data-test-id":`${r.dataTestId}-mask`},[b("div",{class:"modal-wrapper","data-test-id":`${r.dataTestId}-wrapper`},[b("div",{class:"modal-container",style:ze(r.width?`max-width: ${r.width.includes("calc")?r.width:r.width+"px"}; width: 100%;`:""),"data-test-id":`${r.dataTestId}-container`},[b("div",Ap,[b("div",kp,[e.header?(U(),Y("div",Op,[b("div",Sp,[b("div",Ip,xe(e.title),1),e.description?(U(),Y("div",Tp,xe(e.description),1)):ge("",!0)])])):ge("",!0),b("div",Bp,[b("button",{class:"ect-flex ect-self-stretch ect-my-auto ect-w-6 ect-min-h-6 ect-cursor-pointer hover:ect-bg-gray-100 ect-rounded ect-transition-colors ect-justify-center ect-items-center","aria-label":"Close modal",onClick:i[0]||(i[0]=o=>t("close"))},[he(We,{icon:"close",color:"#000000",size:"11",height:"11"})])])]),r.$slots.content?(U(),Y("div",Dp,[Je(r.$slots,"content",{},void 0,!0)])):(U(),Y("div",Rp,[Je(r.$slots,"default",{},void 0,!0)])),e.footer?(U(),Y("div",Lp,[Je(r.$slots,"footer",{},void 0,!0)])):ge("",!0)])],12,Ep)],8,wp)],8,Cp)]),_:3}))}},[["__scopeId","data-v-41ebff01"]]),ur=e=>(Xt("data-v-395645da"),e=e(),Wt(),e),Np={class:"ect-w-[600px]"},Pp={class:"ect-px-6 ect-pt-4 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},Mp=ur(()=>b("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1)),qp={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},$p={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},jp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Hp={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Vp={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-mt-4 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},Up=ur(()=>b("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-700 ect-mb-3","data-test-id":"conflict-modal-supporting-text"}," Above selection requires a configuration change ",-1)),zp={class:"ect-flex ect-flex-col ect-gap-2"},Kp={key:0,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-add-table"},Xp=ur(()=>b("div",{class:"ect-px-4 ect-py-2"},[b("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-add-header"}," This change will add: ")],-1)),Wp={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-add-product"},Gp={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-add-qty"},Qp={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-add-price"},Zp={key:1,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-remove-table"},Jp=ur(()=>b("div",{class:"ect-px-4 ect-py-2"},[b("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-remove-header"}," This change will remove: ")],-1)),Yp={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-remove-product"},e3={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-remove-qty"},t3={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-remove-price"},n3={class:"ect-flex ect-justify-between ect-items-center ect-px-4 ect-py-1 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-bg-white ect-rounded-md ect-border ect-border-neutral-200 ect-rounded-md"},r3=ur(()=>b("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-price-change-label"}," Price change ",-1)),i3={class:"ect-text-sm ect-font-semibold ect-leading-5","data-test-id":"conflict-modal-price-change-value"},o3={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full"},a3=ur(()=>b("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-500 ect-mb-2","data-test-id":"conflict-modal-summary-supporting-text"}," Price Adjustment Summary ",-1)),s3={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-mt-2 ect-bg-neutral-50","data-test-id":"conflict-modal-summary-table"},l3={class:"ect-flex ect-flex-col ect-gap-2"},c3={class:"ect-flex-1"},u3={class:"font-regular","data-test-id":"conflict-modal-summary-base-price-label"},f3={class:"ect-text-center ect-w-28"},d3={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},h3={class:"ect-text-center ect-w-28"},p3={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},v3={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-px-4 ect-py-1 ect-mt-2","data-test-id":"conflict-modal-summary-total"},g3={class:"ect-flex ect-items-center"},m3=ur(()=>b("div",{class:"ect-flex-1"},[b("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-summary-total-label"}," Total Price change ")],-1)),y3={class:"ect-text-center ect-w-28"},x3={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},_3={class:"ect-text-center ect-w-28"},b3={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},C3={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},w3=Le({__name:"ConflictModal",props:{item:{type:Object,required:!0},data:{type:Object,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=dn(),r=n,i=e,o=me(()=>{const p=t.summaryPrices,g=[];return g.push({label:"Base Price",value:p.basePrice,priceChange:p.basePrice}),g.push({label:"Add Ons",value:p.addOns,priceChange:p.addOns+v.value}),g}),a=me(()=>{const p=t.summaryPrices;return{label:"Total Price",value:p.total,priceChange:p.total+v.value}}),s=me(()=>i.data.inclusions.map(g=>t.optionByPublishKey.get(g))),u=me(()=>s.value.filter(p=>p.itemId!==i.item.itemId)),f=me(()=>i.data.exclusions.map(p=>t.optionByPublishKey.get(p))),c=me(()=>f.value.filter(p=>p.itemId!==i.item.itemId)),v=me(()=>s.value.reduce((p,g)=>p+g.price,0)-f.value.reduce((p,g)=>p+g.price,0)),l=()=>{r("close")},h=()=>{r("done")};return(p,g)=>(U(),ke(Fp,{header:"",title:"Confirm Your Selection",description:"This selection requires a configuration change",footer:"","no-close":"",onClose:l},{content:Ve(()=>[b("div",Np,[b("header",Pp,[Mp,b("div",qp,[b("p",$p,xe(e.item.itemName),1),b("p",jp,xe(e.item.qty),1),b("p",Hp,xe(Fe(Pt)(e.item.price)),1)])]),b("main",Vp,[Up,b("div",zp,[u.value.length>0?(U(),Y("div",Kp,[Xp,(U(!0),Y(be,null,Me(u.value,d=>(U(),Y("div",{key:d.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[b("p",Wp,xe(d.itemName),1),b("p",Gp,xe(d.qty),1),b("p",Qp," + "+xe(Fe(Pt)(d.price)),1)]))),128))])):ge("",!0),c.value.length>0?(U(),Y("div",Zp,[Jp,(U(!0),Y(be,null,Me(c.value,d=>(U(),Y("div",{key:d.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[b("p",Yp,xe(d.itemName),1),b("p",e3,xe(d.qty),1),b("p",t3," - "+xe(Fe(Pt)(d.price)),1)]))),128))])):ge("",!0),b("div",n3,[r3,b("p",i3,xe(Fe(Pt)(v.value)),1)])])]),b("footer",null,[b("div",o3,[a3,b("div",s3,[b("div",l3,[(U(!0),Y(be,null,Me(o.value,(d,m)=>(U(),Y("div",{key:d.label,class:we(["ect-flex ect-px-4 ect-py-1",{"ect-border-t ect-border-neutral-200":m>0}])},[b("div",c3,[b("p",u3,xe(d.label),1)]),b("div",f3,[b("p",d3,xe(Fe(Pt)(d.value)),1)]),b("div",h3,[b("p",p3,xe(Fe(Pt)(d.priceChange)),1)])],2))),128))])]),b("div",v3,[b("div",g3,[m3,b("div",y3,[b("p",x3,xe(Fe(Pt)(a.value.value)),1)]),b("div",_3,[b("p",b3,xe(Fe(Pt)(a.value.priceChange)),1)])])])])])])]),footer:Ve(()=>[b("div",C3,[he(Ht,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"conflict-modal-button-cancel",onClick:g[0]||(g[0]=d=>r("close"))},{default:Ve(()=>[Ne("Cancel")]),_:1}),he(Ht,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"conflict-modal-button-done",onClick:h},{default:Ve(()=>[Ne("Done")]),_:1})])]),_:1}))}},[["__scopeId","data-v-395645da"]]),E3={class:"ect-flex ect-flex-col"},A3=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],k3=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],O3={key:0},S3={key:1,class:"ect-border-t ect-border-gray-200 ect-p-4"},I3={__name:"ConfiguratorTabSections",props:{data:{type:Object,required:!0}},setup(e){const n=dn(),t=e,r=me(()=>t.data.itemTypes||[]),i=me(()=>t.data.showImage||!1),o=te(null),a=te({});let s=te(null),u=te(null);const f=(p,g)=>{p.qty=g},c=(p,g)=>{p.itemName=g},v=()=>{n.configuration.categoryOptions.forEach(p=>{p.itemTypes.forEach(g=>{g.options.forEach(d=>{n.configuration.sysGuidedOptions&&(o.value.hidden.includes(d.publishKey)?d.hidden=!0:d.hidden=!1),o.value.inclusions.includes(d.publishKey)&&!g.selected.includes(d.itemId)&&g.selected.push(d.itemId),o.value.exclusions.includes(d.publishKey)&&g.selected.includes(d.itemId)&&g.selected.splice(g.selected.indexOf(d.itemId),1)})})}),o.value=null,a.value=null},l=async(p,g,d,m)=>{if(p.preventDefault(),p.stopPropagation(),s.value=null,u.value=null,g.calculateRules){m&&m.isRadio?d.includes(g.itemId)?(d.splice(0,d.length),u.value=g.publishKey):(d.splice(0,d.length),d.push(g.itemId),s.value=g.publishKey):d.includes(g.itemId)?(d.splice(d.indexOf(g.itemId),1),u.value=g.publishKey):(d.push(g.itemId),s.value=g.publishKey);const y=u.value?g:null,_=s.value?g:null,x=await n.evaluateConfigSelection(y,_);x.inclusions.length>0||x.exclusions.length>0?(o.value=x,a.value=g,[...x.inclusions,...x.exclusions].includes(g.publishKey)||(s.value&&o.value.exclusions.push(s.value),u.value&&o.value.inclusions.push(u.value))):(o.value=x,s.value&&o.value.exclusions.push(s.value),u.value&&o.value.inclusions.push(u.value),v())}},h=(p,g,d,m)=>{p.target.type==="checkbox"||p.target.type==="radio"||(p.preventDefault(),p.stopPropagation(),m.isRadio?d.includes(g.itemId)?d.splice(0,d.length):(d.splice(0,d.length),d.push(g.itemId)):d.includes(g.itemId)?d.splice(d.indexOf(g.itemId),1):d.push(g.itemId),l(p,g,d,m))};return(p,g)=>(U(),Y(be,null,[o.value?(U(),ke(w3,{key:0,item:a.value,data:o.value,onClose:g[0]||(g[0]=d=>o.value=null),onDone:v},null,8,["item","data"])):ge("",!0),b("div",E3,[(U(!0),Y(be,null,Me(r.value,d=>(U(),ke(o6,{key:d.itemTypeId,title:d.itemTypeName,description:d.description,message:d.isRadio?d.selected?"":d.minMessage:d.selected.length<d.minNumber?d.minMessage:d.selected.length===d.maxNumber?d.maxMessage:""},{default:Ve(()=>[b("div",{class:we([d.numberOfColumns===1?"ect-space-y-3 md:ect-space-y-4 ect-p-2 md:ect-p-4":d.numberOfColumns===2?"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4":"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 lg:ect-grid-cols-3 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4"])},[(U(!0),Y(be,null,Me(d.options||[],m=>(U(),Y(be,{key:m.itemId},[m.hidden?ge("",!0):(U(),ke(Y6,{key:0,item:m,name:m.itemName,description:m.description||"","min-quantity":d.minQuantity,"max-quantity":d.maxQuantity,"show-image":i.value,selected:d.selected.includes(m.itemId),tags:m.getTags(),price:m.price,quantity:m.qty,"image-url":m.defaultImageURL,attributes:m.attributes||[],size:d.numberOfColumns,"item-id":m.itemId,"item-type":d.itemTypeName||"",category:d.category,"relationship-info":m.relationshipInfo||{},option:Fe(n).optionByItemId.get(m.itemId),"is-attributes":m.isAttributes,"show-attributes":d.lightboxAttributes,disabled:m.isDisabled,"onUpdate:quantity":y=>f(m,y),"onUpdate:name":y=>c(m,y),onEditAttributes:y=>m.showAttributesModal=!0,onClick:y=>d.selected.includes(m.itemId)||m.isDisabled?null:h(y,m,d.selected,d)},{"selection-control":Ve(()=>[d.isRadio?ln((U(),Y("input",{key:0,"onUpdate:modelValue":y=>d.selected[0]=y,"data-test-id":`configurator-${d.itemTypeId}-radio-${m.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"radio",value:m.itemId,disabled:m.isDisabled,onClick:g[1]||(g[1]=mt(()=>{},["stop"])),onChange:y=>l(y,m,d.selected,d)},null,40,A3)),[[Su,d.selected[0]]]):ln((U(),Y("input",{key:1,"onUpdate:modelValue":y=>d.selected=y,"data-test-id":`configurator-${d.itemTypeId}-checkbox-${m.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"checkbox",value:m.itemId,disabled:m.isDisabled,onClick:g[2]||(g[2]=mt(()=>{},["stop"])),onChange:y=>l(y,m,d.selected,d)},null,40,k3)),[[Va,d.selected]])]),default:Ve(()=>[d.lightboxAttributes?(U(),Y("div",O3,[m.showAttributesModal?(U(),ke(bp,{key:0,option:m,attributes:m.attributes,onDone:y=>m.attributes=y,onClose:y=>m.showAttributesModal=!1},null,8,["option","attributes","onDone","onClose"])):ge("",!0)])):(U(),Y("div",S3,[he(_s,{attributes:m.attributes},null,8,["attributes"])]))]),_:2},1032,["item","name","description","min-quantity","max-quantity","show-image","selected","tags","price","quantity","image-url","attributes","size","item-id","item-type","category","relationship-info","option","is-attributes","show-attributes","disabled","onUpdate:quantity","onUpdate:name","onEditAttributes","onClick"]))],64))),128))],2)]),_:2},1032,["title","description","message"]))),128))])],64))}},T3=e=>(Xt("data-v-cb7a75a9"),e=e(),Wt(),e),B3={class:"ect-space-y-4"},D3={class:"ect-w-full ect-bg-white ect-border ect-border-ect-gray-200 ect-rounded-lg"},R3={class:"ect-bg-white ect-border-b ect-border-ect-gray-200 ect-px-4 ect-py-4 ect-sticky ect-top-0 ect-z-[5] ect-overflow-hidden ect-rounded-t-lg"},L3={class:"ect-text-sm ect-font-semibold ect-text-green-700","data-test-id":"configurator-summary-header-title"},F3={class:"ect-bg-white ect-px-4 ect-py-4 ect-pb-3 ect-border-b ect-border-ect-gray-200 ect-top-[53px] ect-z-9 ect-overflow-hidden ect-sticky ect-top-[53px]"},N3={class:"ect-text-sm ect-font-medium ect-text-ect-gray-800","data-test-id":"configurator-summary-section-frame-color"},P3={class:"ect-flex ect-items-center ect-bg-light-bg-x ect-border-b ect-border-ect-gray-200"},M3={class:"ect-flex-1 ect-bg-ect-gray-50 ect-px-8 ect-py-4 ect-min-h-[56px] ect-flex ect-items-center"},q3={class:"ect-text-sm ect-text-font-clr-light","data-test-id":"configurator-summary-item-red"},$3={class:"ect-flex ect-items-center ect-px-8 ect-py-4 ect-gap-5"},j3={class:"ect-flex ect-justify-center ect-min-w-[128px]"},H3=T3(()=>b("div",{class:"ect-border-r ect-w-[1px] ect-border-text-muted-light ect-h-6"},null,-1)),V3={class:"ect-flex ect-justify-center ect-min-w-[100px]"},U3={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-price-red"},z3={key:0,class:"ect-flex ect-items-center ect-bg-light-bg-x ect-px-10 ect-py-3"},K3={class:"ect-flex ect-flex-wrap ect-items-center ect-bg-light-bg-x ect-gap-2"},X3={class:"ect-bg-white ect-px-8 ect-py-4 ect-pr-4 ect-flex ect-justify-end"},W3={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-total"},G3=Le({__name:"ConfiguratorSummaryTab",props:{summary:{type:Array,required:!0}},setup(e){return(n,t)=>(U(),Y("div",B3,[(U(!0),Y(be,null,Me(e.summary,r=>(U(),Y("div",{key:r.key,class:"ect-mb-4"},[b("section",D3,[b("div",R3,[b("h3",L3,xe(r.category),1)]),(U(!0),Y(be,null,Me(r.selectedItemTypes,i=>(U(),Y("div",{key:i.itemTypeId,class:"ect-flex ect-flex-col ect-border-b ect-border-ect-gray-200"},[b("div",F3,[b("h4",N3,xe(i.itemTypeName),1)]),(U(!0),Y(be,null,Me(i.selectedOptions,o=>(U(),Y(be,{key:o.itemId},[b("div",P3,[b("div",M3,[b("span",q3,xe(o.itemName),1)]),b("div",$3,[b("div",j3,[he(Do,{value:o.qty,"onUpdate:value":a=>o.qty=a,min:i.minQuantity,max:i.maxQuantity,"data-test-id":`configurator-summary-counter-${o.itemId}`},null,8,["value","onUpdate:value","min","max","data-test-id"])]),H3,b("div",V3,[b("span",U3,xe(Fe(Pt)(o.price)),1)])])]),o.isAttributes&&o.getTags().length>0?(U(),Y("div",z3,[b("div",K3,[(U(!0),Y(be,null,Me(o.getTags(),a=>(U(),ke(hn,{key:a.attributeId,label:a.label,value:a.value},null,8,["label","value"]))),128))])])):ge("",!0)],64))),128))]))),128)),b("div",X3,[b("span",W3," Total : "+xe(Fe(Pt)(r.totalPrice())),1)])])]))),128))]))}},[["__scopeId","data-v-cb7a75a9"]]),Q3={class:"configurator-page ect-flex ect-flex-col ect-h-full ect-relative","data-test-id":"configurator-page-container"},Z3={"data-test-id":"configurator-tabs-container",class:"ect-bg-white ect-shadow-sm ect-flex-shrink-0 ect-mb-4"},J3={class:"ect-bg-white ect-border-t ect-border-gray-200 ect-flex-shrink-0 ect-absolute ect-bottom-0 ect-left-0 ect-right-0 ect-z-50","data-test-id":"configurator-footer-sticky"},Y3=Le({__name:"ConfiguratorTabs",emits:["scroll"],setup(e,{emit:n}){const t=dn(),r=te("billing-options"),i=me(()=>t.configuration.categoryOptions),o=me(()=>{const l=i.value.map(h=>({key:h.key,title:h.category}));return l.push({key:"summary",title:"Summary"}),l}),a=n,s=me(()=>u.value.get(r.value)),u=me(()=>{const l=new Map;return i.value.forEach(h=>{l.set(h.key,h)}),l}),f=()=>{console.info("Continue");const l=o.value.findIndex(h=>h.key===r.value);if(l<o.value.length-1){const h=o.value[l+1];r.value=h.key}else t.maintainQuoteConfiguration()};Ye(r,l=>{c(l),a("scroll",0)});const c=l=>{r.value=l},v=l=>{const h=l.target.scrollTop;a("scroll",h)};return qn(()=>{r.value=o.value[0].key}),(l,h)=>(U(),Y("div",Q3,[b("div",Z3,[he(M4,{modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=p=>r.value=p),"show-tabs":!0,border:"",tabs:o.value,"data-test-id":"configurator-tabs-container",onTabChange:c},null,8,["modelValue","tabs"])]),r.value!=="summary"?(U(),Y("div",{key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:v},[he(I3,{data:s.value},null,8,["data"])],32)):(U(),Y("div",{key:1,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:v},[he(G3,{summary:Fe(t).summary},null,8,["summary"])],32)),b("div",J3,[he(Q4,{"btn-text":r.value!=="summary"?"Continue":"Save",item:Fe(t).configuration,onContinue:f},null,8,["btn-text","item"])])]))}},[["__scopeId","data-v-89883e06"]]),e7={class:"ect-px-6 ect-pt-4 ect-pb-2 ect-bg-white"},t7={class:"ect-flow-root"},n7=["src","alt"],r7={key:1,class:"ect-mb-2"},i7={class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed ect-transition-all ect-duration-400"},o7={key:0,class:"ect-mt-2"},a7={class:"ect-inline-block ect-mb-2"},s7={key:1,class:"ect-inline-block ect-mb-2"},l7={key:1,class:"ect-mt-2"},c7={__name:"ConfiguratorInfo",props:{config:{type:Object,required:!0},editAttributes:{type:Boolean,required:!0},scroll:{type:Number,default:0}},emits:["edit-attributes"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.config.attributes.map(o=>({label:o.label,value:o.value})).filter(o=>o.value!==null&&o.value!==""));return(o,a)=>(U(),Y("div",e7,[b("div",t7,[e.config.defaultImageURL&&e.scroll<50?(U(),Y("div",{key:0,class:we(["ect-bg-gray-200 ect-rounded-lg ect-overflow-hidden ect-float-left ect-mr-4 ect-mb-2",e.editAttributes?"ect-w-[40px] ect-h-[40px]":"ect-w-[104px] ect-h-[104px]"])},[e.config.defaultImageURL?(U(),Y("img",{key:0,src:e.config.defaultImageURL,alt:e.config.itemName,class:"ect-w-full ect-h-full ect-object-cover"},null,8,n7)):ge("",!0)],2)):ge("",!0),e.scroll<50?(U(),Y("div",r7,[b("p",i7,xe(e.config.description),1)])):ge("",!0),e.config.isAttributes?(U(),Y(be,{key:2},[e.editAttributes?(U(),Y("div",l7,[he(_s,{attributes:e.config.attributes},null,8,["attributes"])])):(U(),Y("div",o7,[i.value.length>0?(U(),Y(be,{key:0},[(U(!0),Y(be,null,Me(i.value,(s,u)=>(U(),Y("span",{key:u,class:"ect-inline-block ect-mr-2 ect-mb-2"},[he(hn,{label:s.label,value:s.value},null,8,["label","value"])]))),128)),b("span",a7,[b("button",{"data-test-id":"configurator-info-button-edit-attributes",onClick:a[0]||(a[0]=s=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})])])],64)):(U(),Y("span",s7,[b("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:a[1]||(a[1]=s=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))]))],64)):ge("",!0)])]))}},u7=["data-test-id"],f7=["placeholder","value","data-test-id"],d7=["data-test-id"],h7=["data-test-id","onClick"],p7=Le({__name:"MoleculeSearch",props:{placeholder:{type:String,default:""},modelValue:{type:String,default:""},height:{type:[Number,String],default:32},size:{type:String,default:"regular"},loading:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},iconPosition:{type:String,default:"right",validator:e=>["left","right"].includes(e)},dataTestId:{type:String,required:!0}},emits:["update:modelValue","optionClick"],setup(e,{emit:n}){const t=e,r=n,i=te(""),o=te(null),a=te(!1),s=te(null),u=te(!0),f=me(()=>u.value?{}:{bottom:"100%",marginTop:"0",marginBottom:"4px"}),c=async()=>{var C;if(await sn(),!s.value)return;const m=s.value.getBoundingClientRect(),_=window.innerHeight-m.bottom,x=Math.min(((C=t.options)==null?void 0:C.length)*40+20,200);u.value=_>=x},v=()=>{o.value=null,r("update:modelValue","")},l=d=>{const m=d.target.value;i.value&&(clearTimeout(i.value),i.value=null),i.value=setTimeout(()=>{r("update:modelValue",m)},500)},h=async()=>{a.value=!0,await c()},p=()=>{setTimeout(()=>{a.value=!1},150)},g=d=>{a.value=!1,i.value&&(clearTimeout(i.value),i.value=null),r("update:modelValue",d.label),r("optionClick",d)};return(d,m)=>{var y;return U(),Y("div",{ref_key:"searchContainer",ref:s,class:we(["molecule-search",{"icon-left":e.iconPosition==="left"}]),"data-test-id":e.dataTestId},[e.loading?(U(),ke(ju,{key:0,size:16,class:"icon ect-top-2 icon-loader","data-test-id":`${e.dataTestId}-loader`},null,8,["data-test-id"])):e.iconPosition==="left"||!e.modelValue?(U(),ke(We,{key:1,class:"icon-search ect-mt-[-1px]",icon:"search",size:14,color:"#5f5f5f","data-test-id":`${e.dataTestId}-search`,onClick:v},null,8,["data-test-id"])):ge("",!0),b("input",{class:we(["search-input-box",{large:e.size==="large"}]),type:"text",style:ze({height:`${e.height}px`}),placeholder:t.placeholder,value:e.modelValue,"data-test-id":`${e.dataTestId}-input`,onInput:l,onFocus:h,onBlur:p},null,46,f7),e.modelValue&&!e.loading?(U(),ke(We,{key:2,class:"close-btn",icon:"close",size:8,color:"#5f5f5f","data-test-id":`${e.dataTestId}-close`,onClick:v},null,8,["data-test-id"])):ge("",!0),((y=e.options)==null?void 0:y.length)>0&&a.value?(U(),Y("div",{key:3,class:we(["search-options",{"dropdown-top":!u.value}]),style:ze(f.value),"data-test-id":`${e.dataTestId}-dropdown`},[(U(!0),Y(be,null,Me(e.options,(_,x)=>(U(),Y("div",{key:_.id,class:"search-option","data-test-id":`${e.dataTestId}-option-${x}`,onClick:mt(C=>g(_),["stop"]),onMousedown:m[0]||(m[0]=mt(()=>{},["prevent"]))},[Ne(xe(_.label)+" ",1),b("span",null,xe(_.subLabel),1)],40,h7))),128))],14,d7)):ge("",!0)],10,u7)}}},[["__scopeId","data-v-6cdaa802"]]),v7=["data-test-id"],g7=Le({__name:"StatePill",props:{text:{type:String,required:!0},state:{type:String,default:"default",validator:e=>["default","draft","review","active","inactive","in draft","active"].includes(e)},dataTestId:{type:String,default:""}},setup(e){const n=e,t=me(()=>({"ect-state-pill--default":n.state==="default","ect-state-pill--draft":n.state==="draft"||n.state==="in draft","ect-state-pill--review":n.state==="review","ect-state-pill--active":n.state==="active","ect-state-pill--inactive":n.state==="inactive"}));return(r,i)=>(U(),Y("span",{class:we(["ect-state-pill",t.value]),"data-test-id":e.dataTestId},xe(e.text),11,v7))}},[["__scopeId","data-v-6be678b8"]]),m7=["data-test-id"],y7=["data-test-id"],x7=["data-test-id"],_7=["data-test-id"],b7=["data-test-id","onClick"],C7=["data-test-id"],w7=Le({__name:"ecBreadcrumbs",props:{links:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"||typeof n.route=="object"))},dataTestId:{type:String,required:!0}},setup(e){const n=fi(),t=r=>{r&&n.push(r)};return(r,i)=>(U(),Y("div",{class:"ect-flex ect-items-center ect-justify-between","data-test-id":e.dataTestId},[b("div",{class:"ect-flex ect-items-center ect-gap-4","data-test-id":`${e.dataTestId}-container`},[b("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-breadcrumbs`},[(U(!0),Y(be,null,Me(e.links,(o,a)=>(U(),Y(be,{key:a},[a>0?(U(),Y("span",{key:0,class:"ect-text-[#828282] ect-text-xs ect-font-semibold","data-test-id":`${e.dataTestId}-separator-${a}`}," / ",8,_7)):ge("",!0),o.route?(U(),Y("button",{key:1,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal hover:ect-text-[#0076D6] hover:ect-underline ect-transition-colors","data-test-id":`${e.dataTestId}-link-${a}`,onClick:s=>t(o.route)},xe(o.text),9,b7)):(U(),Y("span",{key:2,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal","data-test-id":`${e.dataTestId}-text-${a}`},xe(o.text),9,C7))],64))),128))],8,x7)],8,y7)],8,m7))}},[["__scopeId","data-v-151ca816"]]),E7={components:{AppIcon:We},props:{direction:{type:String,default:"top",validator:e=>["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"].includes(e)},content:{type:String,default:null},disabled:{type:Boolean,default:!1},width:{type:Number,default:130},icon:{type:String,default:null},dataTestId:{type:String,default:""}},data(){return{show:!1}},computed:{tooltipClass(){return{tooltip:!0,[`tooltip-${this.direction}`]:!0}},styleObj(){return{width:`${this.width}px !important`}}},methods:{showTooltip(){this.disabled||(this.show=!0)},hideTooltip(){this.show=!1}}},A7=["data-test-id"],k7=["data-test-id"];function O7(e,n,t,r,i,o){const a=er("AppIcon");return t.content?(U(),Y("div",{key:0,class:"tooltip-container","data-test-id":t.dataTestId,onMouseover:n[0]||(n[0]=(...s)=>o.showTooltip&&o.showTooltip(...s)),onMouseleave:n[1]||(n[1]=(...s)=>o.hideTooltip&&o.hideTooltip(...s))},[Je(e.$slots,"default",{},void 0,!0),ln(b("div",{class:we(o.tooltipClass),style:ze(o.styleObj),"data-test-id":`${t.dataTestId}-content`},[t.icon?(U(),ke(a,{key:0,icon:t.icon,color:"#57c046",size:14,"data-test-id":`${t.dataTestId}-icon`},null,8,["icon","data-test-id"])):ge("",!0),Ne(" "+xe(t.content),1)],14,k7),[[xu,i.show]])],40,A7)):Je(e.$slots,"default",{key:1},void 0,!0)}const S7=Le(E7,[["render",O7],["__scopeId","data-v-b36acc62"]]),I7=wt("item",()=>{const e=Qt(),n=te([]),t=te([]),r=te(!1),i=te(0),o=te(1),a=te(""),s=te(20),u=te(null),f=te(!1),c=te(null),v=te(!1),l=te(null),h=te(null),p=te(null),g=te(null),d=te(null),m=te({addedOptionIds:null,eCatalogCount:null,ecatalogs:null,publishVersionId:null,removedOptionIds:null}),y=te([]),_=te({ecatalogIds:[],optionItemsToAdd:[]}),x=te(!1),C=te(null),S=te(0),A=2,I=M=>{!Array.isArray(M)||M.every(V=>{var K;return V.id&&((K=V.itemTypes)==null?void 0:K.every(J=>{var P;return J.id&&((P=J.options)==null?void 0:P.every(X=>X.id))}))})||M.forEach((V,K)=>{V.id||(V.id=`category-${K}-${V.category}`),V.itemTypes&&Array.isArray(V.itemTypes)&&V.itemTypes.forEach((J,P)=>{J.id||(J.id=J.itemTypeId||`itemType-${K}-${P}-${J.itemTypeName||"unnamed"}`),J.options&&Array.isArray(J.options)&&J.options.forEach((X,se)=>{X.id||(X.id=X.itemId||`option-${K}-${P}-${se}-${X.itemName||"unnamed"}`)})})})},B=async(M,H=null)=>{var V;try{v.value=!0;let K={};if(H)K={fileId:H};else{const P=y.value.find(se=>se.status==="Draft"),X=y.value.find(se=>se.status==="Active");X?K={fileId:X.id}:P?K={fileId:P.id}:K={itemId:M}}let J=await window.AdminConfiguratorManager.getItemConfiguration({request:JSON.stringify(K)});return J!=null&&J.errorMessage?(e.handleError(J.errorMessage),null):(J=St(J.data),typeof J.data=="string"&&(J=JSON.parse(J.data)),(V=J==null?void 0:J.productItem)!=null&&V.categoryOptions&&I(J.productItem.categoryOptions),u.value=J,v.value=!1,y.value.length===0&&!r.value&&await ne(),J.data)}catch(K){return v.value=!1,e.handleError("Failed to fetch item configuration. Please try again.",K),null}},O=async(M,H="",V="")=>{try{const K={searchTerm:M,itemTypeId:H,filterType:V};let J=await window.AdminConfiguratorManager.getItemsList({request:JSON.stringify(K)});return J=St(J),J!=null&&J.errorMessage?(e.handleError(J.errorMessage),null):J}catch{return e.handleError("Failed to fetch option list. Please try again."),null}},E=async(M,H)=>{try{const V={productItemId:d.value,optionItemId:M,existingItemType:H};let K=await window.AdminConfiguratorManager.getItemDetails({request:JSON.stringify(V)});return K=St(K),K!=null&&K.errorMessage?(e.handleError(K.errorMessage),null):K}catch{return e.handleError("Failed to fetch option details. Please try again."),null}},k=async()=>{try{const M=await window.AdminConfiguratorManager.getAvailableAttributes();return JSON.parse(M)}catch{e.handleError("Failed to fetch available attributes. Please try again.")}},R=async M=>{try{const H=await window.AdminConfiguratorManager.addAttribute({request:JSON.stringify(M)});return JSON.parse(H)}catch{e.handleError("Failed to fetch item configuration. Please try again.")}},F=async M=>{try{const H=JSON.stringify(M),V=await window.AdminConfiguratorManager.getChildFields({request:H});return JSON.parse(V)}catch(H){throw e.handleError("Failed to fetch child fields. Please try again.",H),H}},q=async()=>{const M={objectApiName:"XX_Base__Item_Type__c",fieldApiName:"XX_Base__Item_Type_Category__c"};try{return(await window.AdminConfiguratorManager.getPicklistValues({request:JSON.stringify(M)})).data}catch(H){throw e.handleError("Failed to fetch picklist values. Please try again.",H),H}},Z=async()=>{var M,H,V;try{const K=(H=(M=u.value)==null?void 0:M.productItem)==null?void 0:H.itemStatus,P={fileId:(V=y.value.find(se=>se.status===K))==null?void 0:V.id,itemId:d.value};let X=await window.AdminConfiguratorManager.activateItemConfig({request:JSON.stringify(P)});return X!=null&&X.error?(D(X==null?void 0:X.error),null):(X=St(X.data),m.value=X,X)}catch{return D(),null}},ee=async()=>{try{const M={productId:"068bn00000Anu0YAAR"};return(await window.AdminConfiguratorManager.getECatalogsForProduct({request:JSON.stringify(M)})).data}catch(M){e.handleError("Failed to fetch e catalogs for product. Please try again.",M)}},ne=async()=>{try{const M={productId:d.value},H=await window.AdminConfiguratorManager.getProductConfigInfo({request:JSON.stringify(M)}),V=JSON.parse(H.data);return y.value=V.data,V}catch(M){e.handleError("Failed to save item configuration. Please try again.",M)}},Q=async()=>{try{const M={ecatalogIds:_.value.ecatalogIds,productItemId:d.value,optionItemsToAdd:_.value.optionItemsToAdd};return(await window.AdminConfiguratorManager.saveItemConfigToCatalog({request:JSON.stringify(M)})).data}catch(M){e.handleError("Failed to save item configuration to catalog. Please try again.",M)}},N=async()=>{var M,H,V;try{const K=(H=(M=u.value)==null?void 0:M.productItem)==null?void 0:H.itemStatus,J={itemId:d.value,fileId:(V=y.value.find(fe=>fe.status===K))==null?void 0:V.id},P=await window.AdminConfiguratorManager.createNewVersion({request:JSON.stringify(J)}),X=JSON.parse(P);await ne(),await B(d.value,X.id);const se=y.value.findIndex(fe=>fe.status==="Draft");return se!==-1?y.value[se]=X:y.value.push(X),X}catch(K){e.handleError("Failed to create new version. Please try again.",K)}},w=async()=>{var K,J;const M=(K=y.value.find(P=>P.status==="Inactive"))==null?void 0:K.id,H=(J=y.value.find(P=>P.status==="Active"))==null?void 0:J.id,V={itemId:d.value,activeVersionId:H,inactiveVersionId:M};try{return(await window.AdminConfiguratorManager.rollbackItemConfig({request:JSON.stringify(V)})).data}catch(P){e.handleError("Failed to rollback item configuration. Please try again.",P)}},D=M=>{M?C.value=M:C.value=null,x.value=!0};return{items:n,loading:r,totalCount:i,currentPage:o,searchTerm:a,itemLimit:s,columns:t,currentItemConfig:u,savingItemConfiguration:f,currentItem:c,configLoader:v,currentItemData:l,currentGroupIndex:h,currentOptionIndex:p,currentOptionData:g,versionInfo:y,activateConfigData:m,activatePayload:_,itemId:d,showActivationErrorModal:x,activationError:C,activationRetryCount:S,maxRetries:A,getItemConfiguration:B,getItemsList:O,getItemDetails:E,getAvailableAttributes:k,addAttribute:R,getChildFields:F,getPicklistValues:q,activateItemConfig:Z,getECatalogsForProduct:ee,getversionInfo:ne,saveItemConfigToCatalog:Q,createNewVersion:N,rollbackItemConfig:w,addCrossSell:async M=>{const H={itemId:M.id||M.itemId,primarySortOrder:M.primarySortOrder};try{const V=await window.AdminConfiguratorManager.addCrossSell({request:JSON.stringify(H)});return JSON.parse(V.data)}catch(V){return e.handleError("Failed to add cross sell. Please try again.",V),null}},saveItemConfiguration:async()=>{var M;if(v.value||r.value||f.value||!((M=u.value)!=null&&M.productItem))return null;if(!(u.value.productItem.itemStatus==="Active"||u.value.productItem.itemStatus==="Inactive"))try{f.value=!0;const H={itemId:d.value,configurationData:u.value},V=await window.AdminConfiguratorManager.saveItemConfiguration({request:JSON.stringify(H)});if(V!=null&&V.errorMessage)return e.handleError(V.errorMessage),null;if(!(V!=null&&V.error)){const K=y.value.findIndex(J=>J.status==="Draft");y.value[K].id=V.data}return V}catch(H){return e.handleError("Failed to save item configuration. Please try again.",H),null}finally{f.value=!1}},showActivationError:D,hideActivationError:()=>{x.value=!1,S.value=0},incrementRetryCount:()=>{S.value+=1,x.value=!0},canRetry:()=>S.value<A,assignStableIds:I}}),T7={class:"app-filters-main-wrapper"},B7={class:"app-filters-wrapper"},D7={class:"app-filters"},R7={class:"left-section"},L7={class:"ect-flex ect-gap-2 ect-items-center"},F7={class:"ect-absolute ect-top-0 ect-right-0 ect-w-full ect-h-full ect-z-10"},N7={class:"right-section"},P7={class:"after-search-wrapper"},M7={class:"buttons-wrapper"},q7={class:"before-button-wrapper"},$7={key:0,class:"action-wrapper"},j7={key:1,class:"button-text ect-font-medium"},H7={key:2,class:"count-badge"},V7=Le({__name:"FilterHeader",props:{title:{type:String,default:""},showSearch:{type:Boolean,default:!1},buttons:{type:Array,default:()=>[],validator:e=>e.every(n=>(n.icon||n.text)&&typeof n.handler=="function")},searchWidth:{type:String,default:"312px"},showBackButton:{type:Boolean,default:!1},statusText:{type:String,default:""},placeholder:{type:String,default:"Search by name"},breadcrumbLinks:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"))},recordLink:{type:String,default:""}},emits:["search","back"],setup(e,{emit:n}){const t=I7(),r=e,i=Xr([]);Nt(()=>{o()});const o=()=>{i.splice(0,i.length),r.buttons&&r.buttons.length>0&&r.buttons.forEach(l=>{i.push({...l})})};Ye(()=>r.buttons,()=>{o()},{deep:!0});const a=l=>{s("search",l)},s=n,u=te(""),f=(l,h)=>{l.supportsToggle&&(l.isActive=!l.isActive),typeof l.handler=="function"&&l.handler(l,l.isActive)},c=()=>{s("back")},v=()=>{if(!r.recordLink)return;let l=r.recordLink;if(!l){let m=t.itemId;if(!m){const y=new URLSearchParams(window.location.search),_=new URLSearchParams(window.location.hash.split("?")[1]);m=y.get("itemId")||_.get("itemId")}l=m}if(!l)return;const p=window.location.href.match(/^(https?:\/\/[^/]+)/);if(!p){console.info("[ERROR]: Unable to extract base domain from current URL");return}const d=`${p[1]}/${l}`;window.open(d,"_blank")};return(l,h)=>(U(),Y("div",T7,[b("div",B7,[b("div",D7,[b("div",R7,[e.breadcrumbLinks&&e.breadcrumbLinks.length>1?(U(),ke(w7,{key:0,links:e.breadcrumbLinks,"data-test-id":"filter-header-breadcrumbs",class:"ect-mb-3"},null,8,["links"])):ge("",!0),b("div",L7,[e.showBackButton?(U(),Y("button",{key:0,class:"back-button","data-test-id":"filter-header-button-back",onClick:c},[he(We,{icon:"arrow",symbol:"",size:16,color:"#198708",class:"ect-relative ect-top-[3px]"})])):ge("",!0),e.title?(U(),Y("p",{key:1,class:we(["ect-relative ect-text-lg ect-font-semibold ect-leading-5 ect-text-[#1F1F1F] ect-transition-colors ect-duration-200",{"hover:ect-text-[#0076D6] ect-cursor-pointer":e.recordLink}]),"data-test-id":"filter-header-title",onClick:h[0]||(h[0]=p=>e.recordLink?v():null)},[Ne(xe(e.title)+" ",1),e.recordLink?(U(),Y(be,{key:0},[he(We,{icon:"open-link",symbol:"",size:16,color:"currentColor",class:"ect-relative ect-top-[3px]"}),b("div",F7,[he(S7,{class:"ect-min-w-full ect-h-full",direction:"top",content:"View Item in Salesforce","data-test-id":"filter-header-tooltip",width:160})])],64)):ge("",!0)],2)):ge("",!0),e.statusText?(U(),ke(g7,{key:2,text:e.statusText,state:e.statusText.toLowerCase(),"data-test-id":"`filter-header-status-pill`"},null,8,["text","state"])):ge("",!0),Je(l.$slots,"after-status",{},void 0,!0)])]),b("div",N7,[e.showSearch?(U(),Y("div",{key:0,class:"search-wrapper",style:ze({width:e.searchWidth})},[he(p7,{modelValue:u.value,"onUpdate:modelValue":[h[1]||(h[1]=p=>u.value=p),a],class:"search-input",placeholder:e.placeholder,"data-test-id":"filter-header-search-input"},null,8,["modelValue","placeholder"])],4)):ge("",!0),b("div",P7,[Je(l.$slots,"afterSearch",{},void 0,!0)]),b("div",M7,[b("div",q7,[Je(l.$slots,"before-button",{},void 0,!0)]),l.$slots.buttons?(U(),Y("div",$7,[Je(l.$slots,"buttons",{},void 0,!0)])):(U(!0),Y(be,{key:1},Me(i,(p,g)=>(U(),Y("div",{key:g,class:"action-wrapper"},[he(Ht,{btype:p.type||"primary","button-style":p.style||"outlined",size:"medium",style:ze({minWidth:p.minWidth||"auto"}),class:we([{active:p.isActive},{"icon-only":p.icon&&!p.text},{"text-button":p.text}]),loading:p.loading,disabled:p.disabled,"data-test-id":`filter-header-button-${p.text?p.text.toLowerCase().replace(/\s+/g,"-"):g}`,onClick:d=>f(p)},{default:Ve(()=>[p.icon?(U(),ke(We,{key:0,icon:p.icon,symbol:"",color:p.color||"#136E05",size:p.size||14},null,8,["icon","color","size"])):ge("",!0),p.text?(U(),Y("span",j7,xe(p.isActive?p.altText:p.text),1)):ge("",!0),p.count?(U(),Y("span",H7,xe(p.count),1)):ge("",!0)]),_:2},1032,["btype","button-style","style","class","loading","disabled","data-test-id","onClick"])]))),128))])])])])]))}},[["__scopeId","data-v-2ea70801"]]),U7=["data-test-id"],z7=["data-test-id"],K7=["data-test-id"],X7=["data-test-id"],W7=["data-test-id"],G7=["data-test-id"],Q7=["data-test-id"],Z7=Le({__name:"ecSwitch",props:Hc({text:{type:[String,Object],required:!1,validator:e=>typeof e=="string"?!0:typeof e=="object"&&e!==null?Object.prototype.hasOwnProperty.call(e,"on")&&Object.prototype.hasOwnProperty.call(e,"off"):!1},subtext:{type:String,required:!1},size:{type:String,default:"regular",validator:e=>["regular","large"].includes(e)},disabled:{type:Boolean,default:!1},dataTestId:{type:String,default:""},leftAlign:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:Hc(["update:modelValue"],["update:modelValue"]),setup(e,{emit:n}){const t=e,r=Y1(e,"modelValue"),i=n,o=me(()=>typeof t.text=="string"?t.text:typeof t.text=="object"&&t.text!==null?r.value?t.text.on:t.text.off:""),a=()=>{t.disabled||i("update:modelValue",!r.value)};return(s,u)=>(U(),Y("div",{class:we(["ec-switch-container",{disabled:e.disabled}]),"data-test-id":e.dataTestId},[e.leftAlign?(U(),Y("span",{key:0,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[Ne(xe(o.value)+" ",1),e.subtext?(U(),Y("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},xe(e.subtext),9,K7)):ge("",!0)],8,z7)):ge("",!0),b("div",{class:we(["ec-switch",{"ec-switch--active":r.value,"ec-switch--large":e.size==="large"}]),"data-test-id":`${e.dataTestId}-switch`,onClick:a},[b("div",{class:"ec-switch__handle","data-test-id":`${e.dataTestId}-handle`},null,8,W7)],10,X7),e.leftAlign?ge("",!0):(U(),Y("span",{key:1,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[Ne(xe(o.value)+" ",1),e.subtext?(U(),Y("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},xe(e.subtext),9,Q7)):ge("",!0)],8,G7))],10,U7))}},[["__scopeId","data-v-cfefad9a"]]),J7={key:0,class:"ect-bg-white ect-h-full ect-flex ect-flex-col ect-overflow-auto"},Y7={class:"ect-sticky ect-top-0 ect-z-50 ect-bg-white","data-test-id":"configurator-header-sticky"},ev={class:"ect-flex ect-flex-col ect-sticky ect-top-0 ect-z-50 ect-bg-white ect-border-b ect-border-gray-200"},tv={key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-bg-light-bg-x","data-test-id":"configurator-content-scrollable"},nv=Le({__name:"ProductConfiguration",props:{qliId:{type:String,required:!1}},setup(e){const n=dn(),t=te(!1),r=te(0),i=me(()=>n.configuration),o=e,a=me(()=>t.value?[{text:"Done",altText:"Done",type:"primary",style:"primary",handler:()=>s()}]:[{text:o.qliId?"Save":"Add To Quote",altText:"Save",type:n.isChangedConfiguration?"primary":"secondary",style:"primary",disabled:!n.isChangedConfiguration,handler:()=>u()}]),s=()=>{t.value=!1},u=()=>{console.info("Save"),n.maintainQuoteConfiguration()};return(f,c)=>Fe(n).configuration?(U(),Y("div",J7,[Fe(n).savedScreen?(U(),ke(B4,{key:1})):(U(),Y(be,{key:0},[b("div",Y7,[b("div",ev,[ge("",!0),he(V7,{title:i.value.itemName,buttons:a.value},{"before-button":Ve(()=>[Fe(n).isYearlyPricingExist?(U(),ke(Z7,{key:0,modelValue:Fe(n).showYearlyPricing,"onUpdate:modelValue":[c[0]||(c[0]=v=>Fe(n).showYearlyPricing=v),Fe(n).changePricingScheme],"left-align":"",class:"ect-text-nowrap",text:{on:"Yearly Price",off:"Monthly Price"},"data-test-id":"configurator-switch-show-yearly-pricing"},null,8,["modelValue","onUpdate:modelValue"])):ge("",!0)]),_:1},8,["title","buttons"])]),b("div",{class:we(t.value?"ect-pb-16":"ect-pb-0")},[he(c7,{config:i.value,"edit-attributes":t.value,scroll:r.value,onEditAttributes:c[1]||(c[1]=v=>t.value=!0)},null,8,["config","edit-attributes","scroll"])],2)]),t.value?ge("",!0):(U(),Y("div",tv,[he(Y3)]))],64))])):ge("",!0)}},[["__scopeId","data-v-053a707f"]]),rv=["data-item-id","data-qli-id"],iv={key:0,class:"ect-flex-1 ect-min-h-0"},ov={key:1,class:"ect-flex-1 ect-min-h-0"},av={__name:"Configurator",props:{itemId:{type:String,required:!0},qliId:{type:String,required:!1}},emits:["ready"],setup(e,{emit:n}){const t=e,r=n,i=te(!0),o=dn();return qn(async()=>{i.value=!0,console.time("CONFIGURATOR ON BEFORE MOUNT"),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","1"),await o.initConfigurator(t.itemId,t.qliId),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","2"),console.timeEnd("CONFIGURATOR ON BEFORE MOUNT"),r("ready"),i.value=!1}),(a,s)=>(U(),Y("div",{class:"ect-h-full ect-flex ect-flex-col","data-item-id":e.itemId,"data-qli-id":e.qliId},[i.value?(U(),Y("div",ov,[he($u)])):(U(),Y("div",iv,[he(nv,{"qli-id":e.qliId},null,8,["qli-id"])]))],8,rv))}},sv=(e=>(Xt("data-v-0be41a52"),e=e(),Wt(),e))(()=>b("div",{class:"dropdowntp"},null,-1)),lv=Le({__name:"ExpediteConfigurator",props:{setupData:{type:Object,required:!0},itemId:{type:String,required:!0},qliId:{type:String,required:!1},quoteId:{type:String,required:!1},apiKey:{type:String,required:!0}},emits:["ready"],setup(e,{emit:n}){const t=D0(),r=go(),i=Qt(),o=dn(),a=e,s=n,u=()=>{s("ready",o.exposeProperties())};return qn(()=>{const{orgType:f,orgId:c,userId:v}=a.setupData;o.initializeController(a.apiKey,f,c,v),t.quoteId=a.quoteId,t.setSetupData(a.setupData)}),(f,c)=>(U(),Y(be,null,[he(I2),he(Ga),Fe(i).errorPopup?(U(),ke(v2,{key:0,data:Fe(i).errorPopup,onClose:c[0]||(c[0]=v=>Fe(i).errorPopup=null)},null,8,["data"])):ge("",!0),Fe(r).unsavedChanges?(U(),ke(y2,{key:1,data:Fe(r).unsavedChanges,onClose:c[1]||(c[1]=v=>Fe(r).unsavedChanges=null)},null,8,["data"])):ge("",!0),sv,he(av,{"item-id":a.itemId,"qli-id":a.qliId,onReady:u},null,8,["item-id","qli-id"])],64))}},[["__scopeId","data-v-0be41a52"]]),cv=wt("mygpt",()=>{const e=te("");async function n(r,i="gpt-3.5-turbo",o=300){var a,s,u;if(!e.value)throw new Error("Secret key is required. Please set it in the store.");try{const f=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.value}`},body:JSON.stringify({model:i,messages:r,max_tokens:Math.min(o,300),temperature:.7})});if(!f.ok){const v=await f.json().catch(()=>({}));throw new Error(((a=v.error)==null?void 0:a.message)||`API Error: ${f.status} ${f.statusText}`)}return((u=(s=(await f.json()).choices[0])==null?void 0:s.message)==null?void 0:u.content)||"No response generated"}catch(f){throw new Error(f.message||"Failed to get response from GPT")}}function t(r){e.value=r}return{secretKey:e,getGptResponse:n,setSecretKey:t}}),xi=e=>(Xt("data-v-46273585"),e=e(),Wt(),e),uv={class:"custom-gpt-container"},fv={class:"gpt-header"},dv=xi(()=>b("h3",{class:"gpt-title"},"GPT Chat",-1)),hv={class:"gpt-response-area"},pv={key:0,class:"loading-indicator"},vv=[xi(()=>b("div",{class:"spinner"},null,-1)),xi(()=>b("span",null,"Thinking...",-1))],gv={key:1,class:"error-message"},mv=xi(()=>b("strong",null,"Error:",-1)),yv={key:2,class:"response-content"},xv={key:3,class:"empty-state"},_v=[xi(()=>b("p",null,"Enter a message below to start a conversation with GPT 5.0",-1))],bv={class:"gpt-input-area"},Cv={class:"input-wrapper"},wv=["placeholder","disabled"],Ev=["disabled"],Av={key:0},kv={key:1},Ov={key:0,class:"warning-message"},Sv=Le({__name:"ExpediteGPT",props:{secretKey:{type:String,required:!1,default:""},model:{type:String,required:!1,default:"gpt-3.5-turbo"},maxTokens:{type:Number,required:!1,default:300},placeholder:{type:String,required:!1,default:"Enter your message..."}},setup(e){const n=e,t=cv(),r=me(()=>n.secretKey||t.secretKey),i=te(""),o=te(""),a=te(!1),s=te(null),u=te([]),f=me(()=>o.value.trim().length>0),c=me(()=>i.value.trim().length>0&&!a.value&&r.value),v=async()=>{if(!c.value)return;const p=i.value.trim();if(p){a.value=!0,s.value=null,i.value="";try{u.value.push({role:"user",content:p});const g=u.value.reduce((y,_)=>y+Math.ceil(_.content.length/4),0);let d=[...u.value];g>n.maxTokens&&(d=u.value.slice(-3));const m=await t.getGptResponse(d,n.model,n.maxTokens);o.value=m,u.value.push({role:"assistant",content:m})}catch(g){s.value=g.message||"Failed to get response from GPT",console.error("GPT API Error:",g)}finally{a.value=!1}}},l=p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),v())},h=()=>{u.value=[],o.value="",s.value=null};return qn(()=>{t.setSecretKey(n.secretKey)}),(p,g)=>(U(),Y("div",uv,[b("div",fv,[dv,f.value||u.value.length>0?(U(),Y("button",{key:0,onClick:h,class:"clear-button",type:"button"}," Clear ")):ge("",!0)]),b("div",hv,[a.value?(U(),Y("div",pv,vv)):s.value?(U(),Y("div",gv,[mv,Ne(" "+xe(s.value),1)])):f.value?(U(),Y("div",yv,xe(o.value),1)):(U(),Y("div",xv,_v))]),b("div",bv,[b("div",Cv,[ln(b("textarea",{"onUpdate:modelValue":g[0]||(g[0]=d=>i.value=d),placeholder:e.placeholder,disabled:a.value||!r.value,onKeypress:l,class:"gpt-input",rows:"3"},null,40,wv),[[li,i.value]]),b("button",{onClick:v,disabled:!c.value,class:"send-button",type:"button"},[a.value?(U(),Y("span",Av,"...")):(U(),Y("span",kv,"Send"))],8,Ev)]),r.value?ge("",!0):(U(),Y("div",Ov," ⚠️ Secret key is required to use this component. Set it via prop or in the store. "))])]))}},[["__scopeId","data-v-46273585"]]),qo="tsocustomer2.expedite1.com",_i="https://csimqu3mn5g6pjhq6mki4qdayu.appsync-api.us-east-1.amazonaws.com/graphql",$o="da2-vag5nadijfegloywmu7rikapfi";var G0={exports:{}};function Iv(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bs={exports:{}};const Tv=L8(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Q0;function qe(){return Q0||(Q0=1,function(e,n){(function(t,r){e.exports=r()})(Se,function(){var t=t||function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Se<"u"&&Se.crypto&&(o=Se.crypto),!o&&typeof Iv=="function")try{o=Tv}catch{}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function y(){}return function(_){var x;return y.prototype=_,x=new y,y.prototype=null,x}}(),u={},f=u.lib={},c=f.Base=function(){return{extend:function(y){var _=s(this);return y&&_.mixIn(y),(!_.hasOwnProperty("init")||this.init===_.init)&&(_.init=function(){_.$super.init.apply(this,arguments)}),_.init.prototype=_,_.$super=this,_},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var _ in y)y.hasOwnProperty(_)&&(this[_]=y[_]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),v=f.WordArray=c.extend({init:function(y,_){y=this.words=y||[],_!=i?this.sigBytes=_:this.sigBytes=y.length*4},toString:function(y){return(y||h).stringify(this)},concat:function(y){var _=this.words,x=y.words,C=this.sigBytes,S=y.sigBytes;if(this.clamp(),C%4)for(var A=0;A<S;A++){var I=x[A>>>2]>>>24-A%4*8&255;_[C+A>>>2]|=I<<24-(C+A)%4*8}else for(var B=0;B<S;B+=4)_[C+B>>>2]=x[B>>>2];return this.sigBytes+=S,this},clamp:function(){var y=this.words,_=this.sigBytes;y[_>>>2]&=4294967295<<32-_%4*8,y.length=r.ceil(_/4)},clone:function(){var y=c.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var _=[],x=0;x<y;x+=4)_.push(a());return new v.init(_,y)}}),l=u.enc={},h=l.Hex={stringify:function(y){for(var _=y.words,x=y.sigBytes,C=[],S=0;S<x;S++){var A=_[S>>>2]>>>24-S%4*8&255;C.push((A>>>4).toString(16)),C.push((A&15).toString(16))}return C.join("")},parse:function(y){for(var _=y.length,x=[],C=0;C<_;C+=2)x[C>>>3]|=parseInt(y.substr(C,2),16)<<24-C%8*4;return new v.init(x,_/2)}},p=l.Latin1={stringify:function(y){for(var _=y.words,x=y.sigBytes,C=[],S=0;S<x;S++){var A=_[S>>>2]>>>24-S%4*8&255;C.push(String.fromCharCode(A))}return C.join("")},parse:function(y){for(var _=y.length,x=[],C=0;C<_;C++)x[C>>>2]|=(y.charCodeAt(C)&255)<<24-C%4*8;return new v.init(x,_)}},g=l.Utf8={stringify:function(y){try{return decodeURIComponent(escape(p.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return p.parse(unescape(encodeURIComponent(y)))}},d=f.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new v.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=g.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var _,x=this._data,C=x.words,S=x.sigBytes,A=this.blockSize,I=A*4,B=S/I;y?B=r.ceil(B):B=r.max((B|0)-this._minBufferSize,0);var O=B*A,E=r.min(O*4,S);if(O){for(var k=0;k<O;k+=A)this._doProcessBlock(C,k);_=C.splice(0,O),x.sigBytes-=E}return new v.init(_,E)},clone:function(){var y=c.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});f.Hasher=d.extend({cfg:c.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var _=this._doFinalize();return _},blockSize:16,_createHelper:function(y){return function(_,x){return new y.init(x).finalize(_)}},_createHmacHelper:function(y){return function(_,x){return new m.HMAC.init(y,x).finalize(_)}}});var m=u.algo={};return u}(Math);return t})}(bs)),bs.exports}var Cs={exports:{}},Z0;function jo(){return Z0||(Z0=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.Base,s=o.WordArray,u=i.x64={};u.Word=a.extend({init:function(f,c){this.high=f,this.low=c}}),u.WordArray=a.extend({init:function(f,c){f=this.words=f||[],c!=r?this.sigBytes=c:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,c=f.length,v=[],l=0;l<c;l++){var h=f[l];v.push(h.high),v.push(h.low)}return s.create(v,this.sigBytes)},clone:function(){for(var f=a.clone.call(this),c=f.words=this.words.slice(0),v=c.length,l=0;l<v;l++)c[l]=c[l].clone();return f}})}(),t})}(Cs)),Cs.exports}var ws={exports:{}},J0;function Bv(){return J0||(J0=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,i=r.lib,o=i.WordArray,a=o.init,s=o.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray<"u"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var f=u.byteLength,c=[],v=0;v<f;v++)c[v>>>2]|=u[v]<<24-v%4*8;a.call(this,c,f)}else a.apply(this,arguments)};s.prototype=o}}(),t.lib.WordArray})}(ws)),ws.exports}var Es={exports:{}},Y0;function Dv(){return Y0||(Y0=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Utf16=a.Utf16BE={stringify:function(u){for(var f=u.words,c=u.sigBytes,v=[],l=0;l<c;l+=2){var h=f[l>>>2]>>>16-l%4*8&65535;v.push(String.fromCharCode(h))}return v.join("")},parse:function(u){for(var f=u.length,c=[],v=0;v<f;v++)c[v>>>1]|=u.charCodeAt(v)<<16-v%2*16;return o.create(c,f*2)}},a.Utf16LE={stringify:function(u){for(var f=u.words,c=u.sigBytes,v=[],l=0;l<c;l+=2){var h=s(f[l>>>2]>>>16-l%4*8&65535);v.push(String.fromCharCode(h))}return v.join("")},parse:function(u){for(var f=u.length,c=[],v=0;v<f;v++)c[v>>>1]|=s(u.charCodeAt(v)<<16-v%2*16);return o.create(c,f*2)}};function s(u){return u<<8&4278255360|u>>>8&16711935}}(),t.enc.Utf16})}(Es)),Es.exports}var As={exports:{}},ef;function fr(){return ef||(ef=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(u){var f=u.words,c=u.sigBytes,v=this._map;u.clamp();for(var l=[],h=0;h<c;h+=3)for(var p=f[h>>>2]>>>24-h%4*8&255,g=f[h+1>>>2]>>>24-(h+1)%4*8&255,d=f[h+2>>>2]>>>24-(h+2)%4*8&255,m=p<<16|g<<8|d,y=0;y<4&&h+y*.75<c;y++)l.push(v.charAt(m>>>6*(3-y)&63));var _=v.charAt(64);if(_)for(;l.length%4;)l.push(_);return l.join("")},parse:function(u){var f=u.length,c=this._map,v=this._reverseMap;if(!v){v=this._reverseMap=[];for(var l=0;l<c.length;l++)v[c.charCodeAt(l)]=l}var h=c.charAt(64);if(h){var p=u.indexOf(h);p!==-1&&(f=p)}return s(u,f,v)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(u,f,c){for(var v=[],l=0,h=0;h<f;h++)if(h%4){var p=c[u.charCodeAt(h-1)]<<h%4*2,g=c[u.charCodeAt(h)]>>>6-h%4*2,d=p|g;v[l>>>2]|=d<<24-l%4*8,l++}return o.create(v,l)}}(),t.enc.Base64})}(As)),As.exports}var ks={exports:{}},tf;function Rv(){return tf||(tf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.enc;a.Base64url={stringify:function(u,f){f===void 0&&(f=!0);var c=u.words,v=u.sigBytes,l=f?this._safe_map:this._map;u.clamp();for(var h=[],p=0;p<v;p+=3)for(var g=c[p>>>2]>>>24-p%4*8&255,d=c[p+1>>>2]>>>24-(p+1)%4*8&255,m=c[p+2>>>2]>>>24-(p+2)%4*8&255,y=g<<16|d<<8|m,_=0;_<4&&p+_*.75<v;_++)h.push(l.charAt(y>>>6*(3-_)&63));var x=l.charAt(64);if(x)for(;h.length%4;)h.push(x);return h.join("")},parse:function(u,f){f===void 0&&(f=!0);var c=u.length,v=f?this._safe_map:this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var h=0;h<v.length;h++)l[v.charCodeAt(h)]=h}var p=v.charAt(64);if(p){var g=u.indexOf(p);g!==-1&&(c=g)}return s(u,c,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function s(u,f,c){for(var v=[],l=0,h=0;h<f;h++)if(h%4){var p=c[u.charCodeAt(h-1)]<<h%4*2,g=c[u.charCodeAt(h)]>>>6-h%4*2,d=p|g;v[l>>>2]|=d<<24-l%4*8,l++}return o.create(v,l)}}(),t.enc.Base64url})}(ks)),ks.exports}var Os={exports:{}},nf;function dr(){return nf||(nf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,f=[];(function(){for(var g=0;g<64;g++)f[g]=r.abs(r.sin(g+1))*4294967296|0})();var c=u.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,d){for(var m=0;m<16;m++){var y=d+m,_=g[y];g[y]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var x=this._hash.words,C=g[d+0],S=g[d+1],A=g[d+2],I=g[d+3],B=g[d+4],O=g[d+5],E=g[d+6],k=g[d+7],R=g[d+8],F=g[d+9],q=g[d+10],Z=g[d+11],ee=g[d+12],ne=g[d+13],Q=g[d+14],N=g[d+15],w=x[0],D=x[1],L=x[2],$=x[3];w=v(w,D,L,$,C,7,f[0]),$=v($,w,D,L,S,12,f[1]),L=v(L,$,w,D,A,17,f[2]),D=v(D,L,$,w,I,22,f[3]),w=v(w,D,L,$,B,7,f[4]),$=v($,w,D,L,O,12,f[5]),L=v(L,$,w,D,E,17,f[6]),D=v(D,L,$,w,k,22,f[7]),w=v(w,D,L,$,R,7,f[8]),$=v($,w,D,L,F,12,f[9]),L=v(L,$,w,D,q,17,f[10]),D=v(D,L,$,w,Z,22,f[11]),w=v(w,D,L,$,ee,7,f[12]),$=v($,w,D,L,ne,12,f[13]),L=v(L,$,w,D,Q,17,f[14]),D=v(D,L,$,w,N,22,f[15]),w=l(w,D,L,$,S,5,f[16]),$=l($,w,D,L,E,9,f[17]),L=l(L,$,w,D,Z,14,f[18]),D=l(D,L,$,w,C,20,f[19]),w=l(w,D,L,$,O,5,f[20]),$=l($,w,D,L,q,9,f[21]),L=l(L,$,w,D,N,14,f[22]),D=l(D,L,$,w,B,20,f[23]),w=l(w,D,L,$,F,5,f[24]),$=l($,w,D,L,Q,9,f[25]),L=l(L,$,w,D,I,14,f[26]),D=l(D,L,$,w,R,20,f[27]),w=l(w,D,L,$,ne,5,f[28]),$=l($,w,D,L,A,9,f[29]),L=l(L,$,w,D,k,14,f[30]),D=l(D,L,$,w,ee,20,f[31]),w=h(w,D,L,$,O,4,f[32]),$=h($,w,D,L,R,11,f[33]),L=h(L,$,w,D,Z,16,f[34]),D=h(D,L,$,w,Q,23,f[35]),w=h(w,D,L,$,S,4,f[36]),$=h($,w,D,L,B,11,f[37]),L=h(L,$,w,D,k,16,f[38]),D=h(D,L,$,w,q,23,f[39]),w=h(w,D,L,$,ne,4,f[40]),$=h($,w,D,L,C,11,f[41]),L=h(L,$,w,D,I,16,f[42]),D=h(D,L,$,w,E,23,f[43]),w=h(w,D,L,$,F,4,f[44]),$=h($,w,D,L,ee,11,f[45]),L=h(L,$,w,D,N,16,f[46]),D=h(D,L,$,w,A,23,f[47]),w=p(w,D,L,$,C,6,f[48]),$=p($,w,D,L,k,10,f[49]),L=p(L,$,w,D,Q,15,f[50]),D=p(D,L,$,w,O,21,f[51]),w=p(w,D,L,$,ee,6,f[52]),$=p($,w,D,L,I,10,f[53]),L=p(L,$,w,D,q,15,f[54]),D=p(D,L,$,w,S,21,f[55]),w=p(w,D,L,$,R,6,f[56]),$=p($,w,D,L,N,10,f[57]),L=p(L,$,w,D,E,15,f[58]),D=p(D,L,$,w,ne,21,f[59]),w=p(w,D,L,$,B,6,f[60]),$=p($,w,D,L,Z,10,f[61]),L=p(L,$,w,D,A,15,f[62]),D=p(D,L,$,w,F,21,f[63]),x[0]=x[0]+w|0,x[1]=x[1]+D|0,x[2]=x[2]+L|0,x[3]=x[3]+$|0},_doFinalize:function(){var g=this._data,d=g.words,m=this._nDataBytes*8,y=g.sigBytes*8;d[y>>>5]|=128<<24-y%32;var _=r.floor(m/4294967296),x=m;d[(y+64>>>9<<4)+15]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,d[(y+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,g.sigBytes=(d.length+1)*4,this._process();for(var C=this._hash,S=C.words,A=0;A<4;A++){var I=S[A];S[A]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}return C},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});function v(g,d,m,y,_,x,C){var S=g+(d&m|~d&y)+_+C;return(S<<x|S>>>32-x)+d}function l(g,d,m,y,_,x,C){var S=g+(d&y|m&~y)+_+C;return(S<<x|S>>>32-x)+d}function h(g,d,m,y,_,x,C){var S=g+(d^m^y)+_+C;return(S<<x|S>>>32-x)+d}function p(g,d,m,y,_,x,C){var S=g+(m^(d|~y))+_+C;return(S<<x|S>>>32-x)+d}i.MD5=s._createHelper(c),i.HmacMD5=s._createHmacHelper(c)}(Math),t.MD5})}(Os)),Os.exports}var Ss={exports:{}},rf;function of(){return rf||(rf=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=i.Hasher,s=r.algo,u=[],f=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,v){for(var l=this._hash.words,h=l[0],p=l[1],g=l[2],d=l[3],m=l[4],y=0;y<80;y++){if(y<16)u[y]=c[v+y]|0;else{var _=u[y-3]^u[y-8]^u[y-14]^u[y-16];u[y]=_<<1|_>>>31}var x=(h<<5|h>>>27)+m+u[y];y<20?x+=(p&g|~p&d)+1518500249:y<40?x+=(p^g^d)+1859775393:y<60?x+=(p&g|p&d|g&d)-1894007588:x+=(p^g^d)-899497514,m=d,d=g,g=p<<30|p>>>2,p=h,h=x}l[0]=l[0]+h|0,l[1]=l[1]+p|0,l[2]=l[2]+g|0,l[3]=l[3]+d|0,l[4]=l[4]+m|0},_doFinalize:function(){var c=this._data,v=c.words,l=this._nDataBytes*8,h=c.sigBytes*8;return v[h>>>5]|=128<<24-h%32,v[(h+64>>>9<<4)+14]=Math.floor(l/4294967296),v[(h+64>>>9<<4)+15]=l,c.sigBytes=v.length*4,this._process(),this._hash},clone:function(){var c=a.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=a._createHelper(f),r.HmacSHA1=a._createHmacHelper(f)}(),t.SHA1})}(Ss)),Ss.exports}var Is={exports:{}},af;function Ts(){return af||(af=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,f=[],c=[];(function(){function h(m){for(var y=r.sqrt(m),_=2;_<=y;_++)if(!(m%_))return!1;return!0}function p(m){return(m-(m|0))*4294967296|0}for(var g=2,d=0;d<64;)h(g)&&(d<8&&(f[d]=p(r.pow(g,1/2))),c[d]=p(r.pow(g,1/3)),d++),g++})();var v=[],l=u.SHA256=s.extend({_doReset:function(){this._hash=new a.init(f.slice(0))},_doProcessBlock:function(h,p){for(var g=this._hash.words,d=g[0],m=g[1],y=g[2],_=g[3],x=g[4],C=g[5],S=g[6],A=g[7],I=0;I<64;I++){if(I<16)v[I]=h[p+I]|0;else{var B=v[I-15],O=(B<<25|B>>>7)^(B<<14|B>>>18)^B>>>3,E=v[I-2],k=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;v[I]=O+v[I-7]+k+v[I-16]}var R=x&C^~x&S,F=d&m^d&y^m&y,q=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),Z=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),ee=A+Z+R+c[I]+v[I],ne=q+F;A=S,S=C,C=x,x=_+ee|0,_=y,y=m,m=d,d=ee+ne|0}g[0]=g[0]+d|0,g[1]=g[1]+m|0,g[2]=g[2]+y|0,g[3]=g[3]+_|0,g[4]=g[4]+x|0,g[5]=g[5]+C|0,g[6]=g[6]+S|0,g[7]=g[7]+A|0},_doFinalize:function(){var h=this._data,p=h.words,g=this._nDataBytes*8,d=h.sigBytes*8;return p[d>>>5]|=128<<24-d%32,p[(d+64>>>9<<4)+14]=r.floor(g/4294967296),p[(d+64>>>9<<4)+15]=g,h.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var h=s.clone.call(this);return h._hash=this._hash.clone(),h}});i.SHA256=s._createHelper(l),i.HmacSHA256=s._createHmacHelper(l)}(Math),t.SHA256})}(Is)),Is.exports}var Bs={exports:{}},sf;function Lv(){return sf||(sf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),Ts())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,a=r.algo,s=a.SHA256,u=a.SHA224=s.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=s._doFinalize.call(this);return f.sigBytes-=4,f}});r.SHA224=s._createHelper(u),r.HmacSHA224=s._createHmacHelper(u)}(),t.SHA224})}(Bs)),Bs.exports}var Ds={exports:{}},lf;function cf(){return lf||(lf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo())})(Se,function(t){return function(){var r=t,i=r.lib,o=i.Hasher,a=r.x64,s=a.Word,u=a.WordArray,f=r.algo;function c(){return s.create.apply(s,arguments)}var v=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];(function(){for(var p=0;p<80;p++)l[p]=c()})();var h=f.SHA512=o.extend({_doReset:function(){this._hash=new u.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(p,g){for(var d=this._hash.words,m=d[0],y=d[1],_=d[2],x=d[3],C=d[4],S=d[5],A=d[6],I=d[7],B=m.high,O=m.low,E=y.high,k=y.low,R=_.high,F=_.low,q=x.high,Z=x.low,ee=C.high,ne=C.low,Q=S.high,N=S.low,w=A.high,D=A.low,L=I.high,$=I.low,G=B,j=O,W=E,M=k,H=R,V=F,K=q,J=Z,P=ee,X=ne,se=Q,fe=N,ue=w,ie=D,oe=L,le=$,ce=0;ce<80;ce++){var ae,ve,ye=l[ce];if(ce<16)ve=ye.high=p[g+ce*2]|0,ae=ye.low=p[g+ce*2+1]|0;else{var _e=l[ce-15],Ce=_e.high,Ae=_e.low,Ee=(Ce>>>1|Ae<<31)^(Ce>>>8|Ae<<24)^Ce>>>7,$e=(Ae>>>1|Ce<<31)^(Ae>>>8|Ce<<24)^(Ae>>>7|Ce<<25),Te=l[ce-2],Ke=Te.high,dt=Te.low,Xn=(Ke>>>19|dt<<13)^(Ke<<3|dt>>>29)^Ke>>>6,Bt=(dt>>>19|Ke<<13)^(dt<<3|Ke>>>29)^(dt>>>6|Ke<<26),Vt=l[ce-7],it=Vt.high,st=Vt.low,Mt=l[ce-16],qt=Mt.high,kn=Mt.low;ae=$e+st,ve=Ee+it+(ae>>>0<$e>>>0?1:0),ae=ae+Bt,ve=ve+Xn+(ae>>>0<Bt>>>0?1:0),ae=ae+kn,ve=ve+qt+(ae>>>0<kn>>>0?1:0),ye.high=ve,ye.low=ae}var gr=P&se^~P&ue,gn=X&fe^~X&ie,mr=G&W^G&H^W&H,On=j&M^j&V^M&V,yr=(G>>>28|j<<4)^(G<<30|j>>>2)^(G<<25|j>>>7),Wn=(j>>>28|G<<4)^(j<<30|G>>>2)^(j<<25|G>>>7),xr=(P>>>14|X<<18)^(P>>>18|X<<14)^(P<<23|X>>>9),mn=(X>>>14|P<<18)^(X>>>18|P<<14)^(X<<23|P>>>9),_r=v[ce],nn=_r.high,Mr=_r.low,ht=le+mn,Ut=oe+xr+(ht>>>0<le>>>0?1:0),ht=ht+gn,Ut=Ut+gr+(ht>>>0<gn>>>0?1:0),ht=ht+Mr,Ut=Ut+nn+(ht>>>0<Mr>>>0?1:0),ht=ht+ae,Ut=Ut+ve+(ht>>>0<ae>>>0?1:0),br=Wn+On,Cr=yr+mr+(br>>>0<Wn>>>0?1:0);oe=ue,le=ie,ue=se,ie=fe,se=P,fe=X,X=J+ht|0,P=K+Ut+(X>>>0<J>>>0?1:0)|0,K=H,J=V,H=W,V=M,W=G,M=j,j=ht+br|0,G=Ut+Cr+(j>>>0<ht>>>0?1:0)|0}O=m.low=O+j,m.high=B+G+(O>>>0<j>>>0?1:0),k=y.low=k+M,y.high=E+W+(k>>>0<M>>>0?1:0),F=_.low=F+V,_.high=R+H+(F>>>0<V>>>0?1:0),Z=x.low=Z+J,x.high=q+K+(Z>>>0<J>>>0?1:0),ne=C.low=ne+X,C.high=ee+P+(ne>>>0<X>>>0?1:0),N=S.low=N+fe,S.high=Q+se+(N>>>0<fe>>>0?1:0),D=A.low=D+ie,A.high=w+ue+(D>>>0<ie>>>0?1:0),$=I.low=$+le,I.high=L+oe+($>>>0<le>>>0?1:0)},_doFinalize:function(){var p=this._data,g=p.words,d=this._nDataBytes*8,m=p.sigBytes*8;g[m>>>5]|=128<<24-m%32,g[(m+128>>>10<<5)+30]=Math.floor(d/4294967296),g[(m+128>>>10<<5)+31]=d,p.sigBytes=g.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});r.SHA512=o._createHelper(h),r.HmacSHA512=o._createHmacHelper(h)}(),t.SHA512})}(Ds)),Ds.exports}var Rs={exports:{}},uf;function Fv(){return uf||(uf=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo(),cf())})(Se,function(t){return function(){var r=t,i=r.x64,o=i.Word,a=i.WordArray,s=r.algo,u=s.SHA512,f=s.SHA384=u.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var c=u._doFinalize.call(this);return c.sigBytes-=16,c}});r.SHA384=u._createHelper(f),r.HmacSHA384=u._createHmacHelper(f)}(),t.SHA384})}(Rs)),Rs.exports}var Ls={exports:{}},ff;function Nv(){return ff||(ff=1,function(e,n){(function(t,r,i){e.exports=r(qe(),jo())})(Se,function(t){return function(r){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.x64,f=u.Word,c=i.algo,v=[],l=[],h=[];(function(){for(var d=1,m=0,y=0;y<24;y++){v[d+5*m]=(y+1)*(y+2)/2%64;var _=m%5,x=(2*d+3*m)%5;d=_,m=x}for(var d=0;d<5;d++)for(var m=0;m<5;m++)l[d+5*m]=m+(2*d+3*m)%5*5;for(var C=1,S=0;S<24;S++){for(var A=0,I=0,B=0;B<7;B++){if(C&1){var O=(1<<B)-1;O<32?I^=1<<O:A^=1<<O-32}C&128?C=C<<1^113:C<<=1}h[S]=f.create(A,I)}})();var p=[];(function(){for(var d=0;d<25;d++)p[d]=f.create()})();var g=c.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var d=this._state=[],m=0;m<25;m++)d[m]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(d,m){for(var y=this._state,_=this.blockSize/2,x=0;x<_;x++){var C=d[m+2*x],S=d[m+2*x+1];C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var A=y[x];A.high^=S,A.low^=C}for(var I=0;I<24;I++){for(var B=0;B<5;B++){for(var O=0,E=0,k=0;k<5;k++){var A=y[B+5*k];O^=A.high,E^=A.low}var R=p[B];R.high=O,R.low=E}for(var B=0;B<5;B++)for(var F=p[(B+4)%5],q=p[(B+1)%5],Z=q.high,ee=q.low,O=F.high^(Z<<1|ee>>>31),E=F.low^(ee<<1|Z>>>31),k=0;k<5;k++){var A=y[B+5*k];A.high^=O,A.low^=E}for(var ne=1;ne<25;ne++){var O,E,A=y[ne],Q=A.high,N=A.low,w=v[ne];w<32?(O=Q<<w|N>>>32-w,E=N<<w|Q>>>32-w):(O=N<<w-32|Q>>>64-w,E=Q<<w-32|N>>>64-w);var D=p[l[ne]];D.high=O,D.low=E}var L=p[0],$=y[0];L.high=$.high,L.low=$.low;for(var B=0;B<5;B++)for(var k=0;k<5;k++){var ne=B+5*k,A=y[ne],G=p[ne],j=p[(B+1)%5+5*k],W=p[(B+2)%5+5*k];A.high=G.high^~j.high&W.high,A.low=G.low^~j.low&W.low}var A=y[0],M=h[I];A.high^=M.high,A.low^=M.low}},_doFinalize:function(){var d=this._data,m=d.words;this._nDataBytes*8;var y=d.sigBytes*8,_=this.blockSize*32;m[y>>>5]|=1<<24-y%32,m[(r.ceil((y+1)/_)*_>>>5)-1]|=128,d.sigBytes=m.length*4,this._process();for(var x=this._state,C=this.cfg.outputLength/8,S=C/8,A=[],I=0;I<S;I++){var B=x[I],O=B.high,E=B.low;O=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,A.push(E),A.push(O)}return new a.init(A,C)},clone:function(){for(var d=s.clone.call(this),m=d._state=this._state.slice(0),y=0;y<25;y++)m[y]=m[y].clone();return d}});i.SHA3=s._createHelper(g),i.HmacSHA3=s._createHmacHelper(g)}(Math),t.SHA3})}(Ls)),Ls.exports}var Fs={exports:{}},df;function Pv(){return df||(df=1,function(e,n){(function(t,r){e.exports=r(qe())})(Se,function(t){/** @preserve
87
87
  (c) 2012 by Cédric Mesnil. All rights reserved.
88
88
 
89
89
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -165,4 +165,4 @@
165
165
  query SalesforceActions($action: String!, $data: SalesforceData) {
166
166
  salesforceActions(action: $action, data: $data)
167
167
  }
168
- `,Ho="https://d2pgvmpph8dmlo.cloudfront.net";function Pf(e,n,t){return e?e==null?void 0:e.map(r=>cg(r,n,t)):[]}function cg(e,n,t){const{url:r,staticResource:i}=e;if(!r)return null;if(r.includes("/resource/")&&!r.includes("://")&&i){const o=r.split("/"),a=o[o.length-1];return`${Ho}/${t}/static/${a}.${n}`}else return r}const Mf=wt("blockLegacy",()=>{const e=hr(),n=te(null),t=te(null),r=te(!1),i=te(null);async function o(f,c=!0){var h,p;if(console.info("fetchBlockInformation templateId:",f),!f)return;c&&(n.value=[],r.value=!1);const v={storefrontId:e.orgWithStorefrontId,templateId:f};console.log("fetchBlockInformation variables",JSON.stringify(v)),console.log("fetchBlockInformation getTemplateBlock",Nf);const l=await Ff(Nf,v);if(t.value=f,c)(h=l.content)!=null&&h.blocks?n.value=a(JSON.parse(l.content.blocks)):n.value=[],r.value=!0;else return((p=l==null?void 0:l.content)==null?void 0:p.blocks)||[]}function a(f){const c=e.salesforceOrgId;return f==null||f.forEach(v=>{v.blocks=v.blocks?JSON.parse(v.blocks):[],v.blocks.forEach(l=>{var h,p;Object.assign(l,JSON.parse(l.contentJSON)),l.contentJSON=null,l.id=l.blockId||l.Id,(l.componentName==="catalogBlock"||l.componentName==="relatedProducts")&&(s(l.fields.productCard.actions),l.fields.noFriendlyURL=!0,l.fields.productCard.friendlyURL=null,l.fields.productCard.friendlyURLFields=null,(h=l.configuration)!=null&&h.productTemplateId?l.fields.productCard.url="/product/"+((p=l.configuration)==null?void 0:p.productTemplateId):l.fields.productCard.url=null),l.componentName==="productSummary"&&(console.log("block.fields.actions",l.fields.actions),s(l.fields.actions)),l.customJS&&(l.customJS=Pf(l.customJS,"js",c)),l.customCSS&&(l.customCSS=Pf(l.customCSS,"css",c))})}),f}function s(f){f.forEach(c=>{c.action==="CUSTOM_ACTION"&&(c.action="CUSTOM",c.name=c.label.title,c.value=c.url.field||c.url.title,c.newTab=c.openInNewTab)})}return{metaInfo:i,currentPageId:t,pageBlocks:n,blockLoaded:r,fetchBlockInformation:o,getFormattedSectionBlocks:f=>me(()=>{const c=[];return n.value&&n.value.length>0&&n.value.forEach(v=>{const l=v.blocks;l&&l.length>0&&l.forEach(h=>{if(h.id=h.blockId,f){const p=["checkoutAccount","shippingAddress","shippingMethod","customForm","termsAndPayment","quoteSummary","customCode"];console.log("section.sectionName",v.sectionName,h.componentName),h&&h.configuration&&(p.includes(h.componentName)||h.configuration.isCheckoutBlock)&&c.push(h)}else h&&h.configuration&&!f&&c.push(h)})}),c})}}),hr=wt("composableCatalog",()=>{const e=Mf();bi();const n=Qt(),t=te(!0),r=te({accountId:"",contactId:"",userType:"",domain:"",locale:"en-US"}),i=te({}),o=te(""),a=te(""),s=te(""),u=te(""),f=te(""),c=te(""),v=te(null),l=te(!1),h=me(()=>u.value+"::"+f.value);async function p(){v.value=null,l.value=!0;try{const A={domain:qo,templateBlocksFilter:{templateId:{eq:"wrapperDefault"}}},I=Date.now().toString(),B=await Ge.post(`${_i}?t=${I}`,{query:sg,variables:A},{headers:{"Content-Type":"application/json","x-api-key":$o,"Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0","X-Cache-Bust":I},withCredentials:!1});console.log("[COMPOSABLECATALOG:fetchDomainDetails] response",B);const O=B&&B.data?B.data:null;console.log("[COMPOSABLECATALOG:fetchDomainDetails] payload",O);const E=O&&O.data&&O.data.dataByDomain&&Array.isArray(O.data.dataByDomain.items)?O.data.dataByDomain.items:[],k=E.length?E[0]:null;return console.log("[COMPOSABLECATALOG:fetchDomainDetails] item",k),console.log("[COMPOSABLECATALOG:fetchDomainDetails] storefrontDetails",i.value),i.value=k,r.value={accountId:k.guestAccountId,contactId:"",userType:"AWSGuest",domain:k.domain,locale:"en-US"},u.value=k.organization.salesforceOrgId,f.value=k.storefrontId,k}catch(A){throw console.info("[COMPOSABLECATALOG:fetchDomainDetails] Error fetching domain",A),v.value=A&&A.message?A.message:"Unknown error",A}finally{l.value=!1}}function g(A){a.value=(A==null?void 0:A.templateId)??"",s.value=(A==null?void 0:A.quoteId)??"",c.value=(A==null?void 0:A.userId)??""}function d(A){A.value=A}function m(A){i.value=A}async function y(){try{await e.fetchBlockInformation(a.value,!0)}catch(A){n.handleError(A,"getBlockInformation")}}const _=async()=>{var A,I;if(console.log("[COMPOSABLECATALOG:getTheme]"),!!f.value)try{const B=await Ff(lg,{storefrontId:f.value,filter:{key:{eq:"theme"},templateId:{eq:"wrapper"}}});return console.log("[COMPOSABLECATALOG:getTheme] themeData",B),((I=(A=B.content)==null?void 0:A.items)==null?void 0:I[0])??null}catch(B){console.log("[COMPOSABLECATALOG:getTheme] Error getting theme data",B)}},x=()=>{if(typeof document>"u")return;const A=u.value,I=f.value;if(!A||!I)return;const B=`${Ho}/${A}/${I}/css/theme_${I}.css`;let O=!1;if(typeof window<"u"&&window.VueExpediteComponents&&typeof window.VueExpediteComponents.applyThemeToShadows=="function")try{window.VueExpediteComponents.applyThemeToShadows(B),O=!0}catch(q){console.warn("[COMPOSABLECATALOG:setThemeData] shadow injection failed; will inject in head",q)}let E="";try{E=new URL(_i).origin}catch{}const k=typeof window<"u"?window.location.href:"",R=(q,Z={})=>{const ee=document.head||document.getElementsByTagName("head")[0];if(!ee)return;let ne=document.getElementById(q);ne||(ne=document.createElement("link"),ne.id=q,ee.appendChild(ne)),Object.entries(Z).forEach(([Q,N])=>{N!=null&&ne.setAttribute(Q,String(N))})};((q,Z,ee=!0)=>{const ne=document.head||document.getElementsByTagName("head")[0];if(!ne||document.getElementById(q))return;const Q=document.createElement("script");Q.id=q,Q.src=Z,ee&&(Q.async=!0),ne.appendChild(Q)})("ec-webfont-loader","https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js",!0),R("ec-preconnect-fonts",{rel:"preconnect",href:"https://fonts.gstatic.com"}),E&&R("ec-preconnect-appsync",{rel:"preconnect",href:E}),O||R("ec-theme-stylesheet",{rel:"stylesheet",href:B}),R("ec-google-fonts",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Round|Material+Symbols+Outlined|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|Montserrat:300,400,500,600,700,800|Roboto:300,400,500,600,700,800|Abel|Caveat:400,700|Titillium+Web:400,600,700"}),k&&R("ec-canonical",{rel:"canonical",href:k}),R("ec-favicon",{rel:"icon",type:"image/x-icon",href:`${Ho}/expedite/Expedite_Favicon.ico`})};function C(){return!0}function S(){a.value="",s.value="",u.value="",f.value="",c.value=""}return{templateId:a,isLoading:t,activeStorefrontInfo:r,quoteAccount:o,storefrontDetails:i,salesforceOrgId:u,storefrontId:f,userId:c,orgWithStorefrontId:h,useVisiblity:C,fetchDomainDetails:p,setData:g,setQuoteId:d,setStorefrontDetails:m,getBlockInformation:y,getTheme:_,setThemeData:x,reset:S}}),tn=async(e,n=null,t="",r=!1)=>{const i=_i,o=$o;let a=200,s;const u=qo,f=hr();try{const c=n;let v="";f.activeStorefrontInfo&&f.activeStorefrontInfo.accountId&&!v&&(v=f.activeStorefrontInfo.accountId),c.data&&f.activeStorefrontInfo&&!e.includes("CognitoActions")&&!e.includes("query listUsers")&&(c.data.userType=f.activeStorefrontInfo.userType,c.data.accountId=v,c.data.domain=u);const l=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":o},body:JSON.stringify({query:e,variables:c})});if(s=await(l==null?void 0:l.json()),s=s.data,t)s=JSON.parse(s[t]),a=Number(s.statusCode),s=s.content,a===401&&console.info("401",e,JSON.stringify(n));else if(e.includes("SalesforceActions")){let h=s;h=JSON.parse(s.salesforceActions),h.statusCode==="401"&&console.info("401",e,JSON.stringify(n),s)}}catch(c){console.log(c),a=400,s=c}return{statusCode:a,response:s}},ug=["Needs Configuration","Suggests Configuration","Upload Configuration"],fg=["Upload","Upload Add","Upload Configuration"],dg=["No Configuration","Suggests Configuration","Upload Add","",null,void 0],hg=["CONFIGURE","UPLOAD","ADD_TO_CART"],pg=new Map([["Full","Full"],["FULL","Full"],["INSTALL_BASE","InstallBase"],["ECATALOG_ACCOUNT_PRIMARY","Default"],["ECATALOG_ACCOUNT_CUSTOM","Alternate"],["ECATALOG_OVERRIDE","Override"]]),vg=new Map([["Full","Item"],["FULL","Item"],["INSTALL_BASE","InstallBase"],["ECATALOG_ACCOUNT_PRIMARY","eCatalog"],["ECATALOG_ACCOUNT_CUSTOM","eCatalog"],["ECATALOG_OVERRIDE","eCatalog"]]),An=(e,n,t=!1)=>{const r=Qt();let i,o,a;return t?(o=e.statusCode,a=e.content):(i=JSON.parse(e.response.salesforceActions),o=i.statusCode,a=i.content),Number(o)===200&&a&&a.message&&typeof a.message=="string"&&a.message.startsWith("ERROR:")?(r.handleError(a.message,"useExtractContent"),!1):Number(o)!==200||e.statusCode!==200||typeof a=="string"&&a.includes("ERROR:")||typeof a=="string"&&a.includes("Error:")||a.errorCode==="APEX_ERROR"?(a.errorCode==="APEX_ERROR"?r.handleError(a.message,"useExtractContent"):n||r.handleError(a,"useExtractContent"),!1):a},bi=wt("catalog",()=>{const e=hr(),n=te(!1),t=te(0),r=te(null),i=te(null),o=te([]),a=te({}),s=te({}),u=te(null),f=te(null),c=te(!1),v=te({search:""}),l=te({qliRecords:!0,quoteCreate:!1,quoteDetails:!1}),h=me(()=>e.activeStorefrontInfo.accountId),p=me(()=>({domain:e.activeStorefrontInfo.domain,accountId:h.value,userType:e.activeStorefrontInfo.userType}));function g(F="true"){w2(`qreset-${r.value}`,F)}async function d(F){const q={action:"makeCall",data:{...p.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=deleteLineItems&ut="+e.activeStorefrontInfo.userType,payload:JSON.stringify(F)}},Z=await tn(en,q,void 0,!0),ee=An(Z);ee&&(t.value--,I(!0),console.log("[CATALOG:deleteLineItems] content",ee)),g()}async function m(F){var w,D;if(!F.qty)return;const q=e.quoteId;if(!q)return;F.retry=1;const Z={...F,quoteid:q},ee={action:"makeCall",data:{...p.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=updateQLI&ut="+e.activeStorefrontInfo.userType,payload:JSON.stringify(Z)}},ne=await tn(en,ee,void 0,!0),Q=(D=(w=ne.response)==null?void 0:w.salesforceActions)==null?void 0:D.toLowerCase();(Q.includes("record currently unavailable")||Q.includes("unable_to_lock_row"))&&F.retry<3&&setTimeout(()=>{F.retry+=1,m(F)},500),An(ne)&&I(!0),g()}async function y(F){const q=e.quoteId;if(!q)return;Array.isArray(F)&&(F=F[0]);const Z={quoteId:q,itemId:F.itemID,eCatalogItemId:F.eCatalogItemID,quantity:F.qty,accountId:h.value,offerId:F.offerId,offerType:F.offerType,offerDiscount:F.offerDiscount,appliedOnField:F.appliedOnField,rpId:F.rpId,qtyTierAmt:F.qtyTierAmt,isAddToCartFromIB:F.isAddToCartFromIB},ee={action:"makeCall",data:{...p.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=saveItemToQuoteBlink&ut="+e.activeStorefrontInfo.userType,payload:JSON.stringify(Z)}},ne=await tn(en,ee,void 0,!0),Q=An(ne);if(Q){t.value++,I(!0);const N=JSON.parse(Q);N.quoteId&&N.quoteId!==q&&(r.value=N.quoteId,e.setQuoteId(r.value))}g()}async function _(F,q,Z){var D,L,$;const ee=Z==="Item",ne=[],Q=((F==null?void 0:F.searchText)||"").toString().trim(),N=Array.isArray(F==null?void 0:F.fields)?F.fields:[];Array.isArray(F==null?void 0:F.filters)&&F.filters,F==null||F.filterLogic;const w={searchPL:Q,origin:"genesis_ai",userId:(e==null?void 0:e.userId)||"",orgId:(e==null?void 0:e.salesforceOrgId)||"",orgType:"Production",requestId:ar(),quoteId:(e==null?void 0:e.quoteId)||"",accountId:((D=e==null?void 0:e.activeStorefrontInfo)==null?void 0:D.accountId)||"",numberOfRecords:(F==null?void 0:F.numberOfRecords)||(F==null?void 0:F.rowLimit)||10,fields:N,filters:(F==null?void 0:F.whereCondition)||[]};try{const j=await fetch("https://ec-apigw.blink.expedite1.com/getCatalogProducts",{method:"POST",headers:{"x-api-key":"Y:GPb{M&0*v:C%])A(+i9acGu4aY)A=%","Content-Type":"application/json"},body:JSON.stringify(w)}),W=await j.json();if(!j.ok||!(W!=null&&W.isSuccess)||!((L=W==null?void 0:W.data)!=null&&L.selected_products))return;const M=W.data.selected_products,H=Object.values(M).map(K=>{var J;return(J=K==null?void 0:K.catalogResponse)==null?void 0:J.productInfo}).filter(Boolean);H.forEach(K=>{var se,fe,ce,ie;const J=JSON.parse(JSON.stringify(q)),P=rt(K,ee?"XX_ORD1__Friendly_URL__c":"XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c"),X=rt(K,ee?"XX_ORD1__SYS_Requires_Configuration__c":"XX_ORD1__Item__r.XX_ORD1__SYS_Requires_Configuration__c");ee?J.itemId=K.Id:(J.itemId=K.XX_ORD1__Item__c,J.catalogItemId=K.Id),J.thumbnail.value=J.thumbnail.field&&!J.thumbnail.isStatic?rt(K,J.thumbnail.field):"",J.title.value=J.title.field&&!J.title.isStatic?rt(K,J.title.field):"",J.description.value=J.description.field&&!J.description.isStatic?rt(K,J.description.field):"",(se=J.attributes)==null||se.forEach(oe=>{oe.value.field&&(oe.value.value=rt(K,oe.value.field,oe.value.dataType)||"-"),oe.label.field&&(oe.label.value=rt(K,oe.label.field,oe.label.dataType)||"-")}),J.actions=J.actions.filter(({action:oe})=>oe==="ADD_TO_CART"&&dg.includes(X)||oe==="CONFIGURE"&&ug.includes(X)||oe==="UPLOAD"&&fg.includes(X)||!hg.includes(oe)),(fe=J.actions)==null||fe.forEach(oe=>{if(oe.action==="CUSTOM"){const{url:le,label:ue}=oe;le.isStatic||(le.value=rt(K,le.field)),ue.isStatic||(ue.value=rt(K,ue.field))}}),((ce=J.friendlyURLFields)==null?void 0:ce.length)>0&&P?((ie=J.friendlyURLFields)==null||ie.forEach(oe=>{J.friendlyURL=J.friendlyURL.replace(`{!${oe}}`,rt(K,oe))}),J.friendlyURL="/"+J.friendlyURL+"/"+P):J.url&&(J.friendlyURL=J.url+"/"+K.Id),J.friendlyURL&&(J.friendlyURL=J.friendlyURL.replace(/\/{2,}/g,"/")),ne.push(J)});const V=Number((($=W==null?void 0:W.data)==null?void 0:$.totalCount)||H.length)||0;return{items:ne,count:V>2e3?2e3:V}}catch(G){console.log("[CATALOG:getProductItems] new API error",G);return}}async function x(F){var ne;console.log("[CATALOG:getEcatalogDetails] jsonData",F),F.accountID=e.activeStorefrontInfo.accountId;const q={action:"makeCall",data:{...p.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getEcatalogDetails&ut=${e.activeStorefrontInfo.userType}`,payload:JSON.stringify(F)}},Z=await tn(en,q),ee=An(Z);if(ee!==!1)return(ne=JSON.parse(ee))==null?void 0:ne.recordData}async function C(F,q=()=>{}){F.accountID=e.activeStorefrontInfo.accountId;const Z={action:"makeCall",data:{...p.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getCatalogGroupCounts&ut=${e.activeStorefrontInfo.userType}`,payload:JSON.stringify(F)}},ee=await tn(en,Z,void 0,!0),ne=JSON.parse(JSON.parse(ee.response.salesforceActions).content);return q(ne),ne}async function S(F,q=()=>{}){const Z={action:"makeCall",data:{...p.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getCatalogPicklistGroupCounts&ut=${e.activeStorefrontInfo.userType}`,payload:JSON.stringify(F)}},ee=await tn(en,Z,void 0,!0);return q(JSON.parse(JSON.parse(ee.response.salesforceActions).content)),JSON.parse(JSON.parse(ee.response.salesforceActions).content)}async function A(){var ne,Q,N,w,D,L;console.log("[CATALOG:getObjectDetails] start",{currentQuoteId:r.value,payload:p.value});const F=e.quoteId;if(console.log("[CATALOG:getObjectDetails] qtId",F),F)console.log("[CATALOG:getObjectDetails] Quote found!"+F),console.log("[CATALOG:getObjectDetails] Quote found",F);else{console.log("[CATALOG:getObjectDetails] No quote found!"),console.warn("[CATALOG:getObjectDetails] No quote found, aborting");return}const q={action:"makeCall",data:{...p.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getFormattedObjectDetails&objectapi=XX_ORD1__Quote__c&objectid=${F}`}};console.log("[CATALOG:getObjectDetails] request",q.data.endpoint),l.quoteDetails=!0,console.log("[CATALOG:getObjectDetails] loading.quoteDetails -> true");const Z=await tn(en,q,void 0,!0);console.log("[CATALOG:getObjectDetails] response received",{hasResponse:!!(Z!=null&&Z.response),len:String(((ne=Z==null?void 0:Z.response)==null?void 0:ne.salesforceActions)||"").length});const ee=An(Z,!0);return console.log("[CATALOG:getObjectDetails] extracted content",{hasContent:!!ee}),l.quoteDetails=!1,console.log("[CATALOG:getObjectDetails] loading.quoteDetails -> false"),ee?(a.value=JSON.parse(ee),console.log("[CATALOG:getObjectDetails] quoteRecord set",{id:(Q=a.value)==null?void 0:Q.Id,accountName:(N=a.value)==null?void 0:N.XX_ORD1__Account_Name__c,checkedOut:(w=a.value)==null?void 0:w.XX_ORD1__Checked_Out__c}),e.quoteAccount=(D=a.value)==null?void 0:D.XX_ORD1__Account_Name__c,a.value.XX_ORD1__Checked_Out__c?(console.warn("[CATALOG:getObjectDetails] Quote is already checked out, resetting quoteId"),n.value=!0,console.log("[CATALOG:getObjectDetails] end (checked out) -> false"),!1):(console.log("[CATALOG:getObjectDetails] end (success)",{id:(L=a.value)==null?void 0:L.Id}),a.value)):(console.warn("[CATALOG:getObjectDetails] no content returned, resetting quoteId",{qtId:F}),console.log("[CATALOG:getObjectDetails] end (no content) -> false"),!1)}const I=or(B,500);async function B(F=!1){var Q,N;console.log("[CATALOG:getQuoteItems] start",{noLoad:F}),l.value.qliRecords=!F;const q=e.quoteId;if(console.log("[CATALOG:getQuoteItems] qtId",q),!q){console.log("[CATALOG:getQuoteItems] No quote found!"),l.value.qliRecords=!1,console.warn("[CATALOG:getQuoteItems] No quote found, aborting");return}const Z={action:"makeCall",data:{...p.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getQuoteItems&ut=${e.activeStorefrontInfo.userType}&quoteid=${q}`}};console.log("[CATALOG:getQuoteItems] request",Z.data.endpoint);const ee=await tn(en,Z,void 0,!0);console.log("[CATALOG:getQuoteItems] response received",{hasResponse:!!(ee!=null&&ee.response),len:String(((Q=ee==null?void 0:ee.response)==null?void 0:Q.salesforceActions)||"").length});const ne=An(ee);if(console.log("[CATALOG:getQuoteItems] extracted content",{hasContent:!!ne}),l.value.qliRecords=!1,console.log("[CATALOG:getQuoteItems] loading.qliRecords -> false"),ne){const w={};o.value=JSON.parse(ne),console.log("[CATALOG:getQuoteItems] qliRecords set",{count:(N=o.value)==null?void 0:N.length}),o.value.forEach(D=>{w[D.XX_ORD1__Item__c]=D}),s.value=w,t.value=o.value.length,console.log("[CATALOG:getQuoteItems] qliRecords",o.value),console.log("[CATALOG:getQuoteItems] end (success)",{cartCount:t.value})}else console.warn("[CATALOG:getQuoteItems] end (no content)")}async function O(F){console.log("[CATALOG:getSavedFilter] ecfr",F);const q={action:"makeCall",data:{...p.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getSavedFilter&ut=${e.activeStorefrontInfo.userType}&ecfr=${F}`}},Z=await tn(en,q,void 0,!0),ee=An(Z);return ee?(console.log("[CATALOG:getSavedFilter] Saved Filters",ee),JSON.parse(ee)):!1}async function E(F,q){const Z={action:"makeCall",data:{...p.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=exportToCSV&ut=${e.activeStorefrontInfo.userType}`,payload:JSON.stringify(F)}},ee=await tn(en,Z,void 0,!0),ne=An(ee);ne&&q(ne)}async function k(){var ee;console.log("[CATALOG:calculateAvaTax]"),f.value=null;const F=e.quoteId;if(!F)return;(ee=a.value)!=null&&ee.Id||await A();const q=a.value;if(q.XX_ORD1__Shipping_Address__c&&q.XX_ORD1__Shipping_City__c&&q.XX_ORD1__Shipping_Country__c&&q.XX_ORD1__Shipping_State__c&&q.XX_ORD1__Shipping_Zip__c){const ne={recordId:F,isCommit:!1},Q={action:"makeCall",data:{...p.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=calculateAvaTax&ut=${e.activeStorefrontInfo.userType}`,payload:JSON.stringify(ne)}};c.value=!0;const N=await tn(en,Q,void 0,!0),w=An(N);if(w)console.log("[CATALOG:calculateAvaTax] content",w);else{const D=JSON.parse(N.response.salesforceActions).content;f.value=D}c.value=!1}else console.log("[CATALOG:calculateAvaTax] Shipping address not found so tax can not be calculated")}function R(F,q,Z=!0){const ee=q.qtyTiers;if(!ee)return null;const ne=ee.find(Q=>Q.ev===null?F>=Q.sv:F>=Q.sv&&F<=Q.ev);return ne?Z?ne.formattedOfferPrice:ne.originalPrice:null}return{quoteCheckedOut:n,avaTaxError:f,avaTaxLoading:c,cartCount:t,cartUpdated:g,quoteId:r,loading:l,filter:v,quoteRecord:a,secondQuoteId:i,qliRecords:o,savedItems:s,savedFilter:u,exportToCSV:E,getObjectDetails:A,getSavedFilter:O,saveToCart:y,deleteLineItems:d,getPicklistFilterData:S,getQuoteItems:B,updateCart:m,getFilterData:C,getProductItems:_,calculateAvaTax:k,getEcatalogDetails:x,getVolumePrice:R}});function qf(e,n,t){const{itemId:r,catalogItemId:i,offer:o,isAddToCartFromIB:a}=n,{offerId:s,offerType:u,offerDiscount:f,appliedOnField:c,rpId:v}=o||{};return{qty:e.value,itemID:r,eCatalogItemID:i,offerId:s,offerType:u,offerDiscount:f,appliedOnField:c,rpId:v,isAddToCartFromIB:a,qtyTierAmt:o?t.getVolumePrice(e.value,o,!1):null}}const gg={KNOWLEDGE_DETAIL:"knowledgeDetail"},$f={"Catalog Price":"XX_ORD1__Negotiated_Price__c","List Price":"XX_ORD1__List_Price2__c"},mg={name:"SkeletonLoader"},yg={class:"skeleton-loader"};function xg(e,n,t,r,i,o){return U(),Y("div",yg)}const vn=Le(mg,[["render",xg],["__scopeId","data-v-d79c3985"]]),pr=Le({__name:"AtomCustomTag",props:{tag:{type:String,default:null},text:{type:[String,Number,Boolean],default:"-"},type:{type:String,default:null},method:{type:String,default:null},style:{type:Object,default:()=>({})},secStyle:{type:Object,default:()=>({})},cssStyle:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},inherit:{type:[Array,String],default:()=>[]}},setup(e){const n=e,t={h1:"ecb-header-lvl-1",h2:"ecb-header-lvl-2",h3:"ecb-header-lvl-3",h4:"ecb-header-lvl-4",h5:"ecb-header-lvl-5",h6:"ecb-header-lvl-6",p:"ecb-text-regular",span:"ecb-text-small",strong:"ecb-text-strong",large:"ecb-text-large"},r=te(!1),i=me(()=>{if(n.text===null||n.text===void 0)return"";const u=String(n.text);return(u==null?void 0:u.replace(/\r\n|\n/g,"<br>"))||""}),o=me(()=>{var f,c;const u=n.tag||((f=n.style)==null?void 0:f.tag)||((c=n.secStyle)==null?void 0:c.tag)||"p";return u==="large"||u==="strong"?"div":u}),a=me(()=>{var f;const u=n.tag||((f=n.style)==null?void 0:f.tag)||"p";return t[u]||"ecb-text-regular"}),s=me(()=>{var f,c;const u={};if(n.style&&((f=n.style)!=null&&f.overrite)){const{bold:v,color:l,italic:h,underline:p,strikethrough:g,strikeThrough:d,size:m,family:y,lineHeight:_}=n.style;v&&(u.fontWeight="700"),l&&(u.color=l),h&&(u.fontStyle="italic"),y&&(u.fontFamily=y),_&&(u.lineHeight=_),p?u.textDecoration="underline":(g||d)&&(u.textDecoration="line-through"),m&&(u.fontSize=m)}if(n.secStyle&&((c=n.secStyle)!=null&&c.overrite)){const{bold:v,color:l,italic:h,underline:p,strikethrough:g,strikeThrough:d,size:m,family:y,lineHeight:_}=n.secStyle;v&&(u.fontWeight="700"),l&&(u.color=l),h&&(u.fontStyle="italic"),y&&(u.fontFamily=y),_&&(u.lineHeight=_),p?u.textDecoration="underline":(g||d)&&(u.textDecoration="line-through"),m&&(u.fontSize=m)}for(const v of n.inherit)u[v]="inherit";return u});return(u,f)=>e.loading?(U(),Y("div",{key:0,style:ze(e.cssStyle),class:"custom-tag-skeletion"},[he(vn)],4)):(U(),ke(Wi(o.value),ao({key:1},u.$attrs,{type:e.method,disabled:e.disabled,style:s.value,class:a.value,onMouseover:f[0]||(f[0]=c=>r.value=!0),onMouseout:f[1]||(f[1]=c=>r.value=!1),innerHTML:i.value}),null,16,["type","disabled","style","class","innerHTML"]))}},[["__scopeId","data-v-075625ac"]]),_g={key:1,class:"field-label"},bg={class:"ect-flex ect-flex-col ect-justify-start"},Cg={key:0,class:"ect-pr-5"},wg={key:1,class:"field-value ect-pr-5"},Eg={key:1,class:"field-value"},jf=Le({__name:"AtomFieldAttribute",props:{tag:{type:String,default:"span"},field:{type:String,default:""},value:{type:Object,default:()=>({})},label:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1},offer:{type:Object,default:()=>({})},itemCount:{type:Number,default:1},appliedOnOfferMatchingField:{type:Boolean,default:!1},showOfferDescription:{type:Boolean,default:!1},isProductSummary:{type:Boolean,default:!1},index:{type:Number,default:0},parentWidth:{type:Number,default:0}},setup(e){const n=bi(),t=e,r=me(()=>!1),i=me(()=>{var l;return t.offer.offerValue.offerId&&t.offer.offerValue.formattedOfferPrice||t.offer.offerValue.rpId&&((l=t.offer.offerValue.qtyTiers)==null?void 0:l.length)>0?!!t.appliedOnOfferMatchingField:!1}),o=me(()=>t.offer.offerDetails.styles.offerValue.textStyles.tag),a=me(()=>t.offer.offerDetails.styles.offerDescription.textStyles),s=me(()=>{var v,l;return(v=t.offer.offerValue)!=null&&v.qtyTiers?n.getVolumePrice(t.itemCount>0?t.itemCount:1,t.offer.offerValue):(l=t.offer.offerValue)==null?void 0:l.formattedOfferPrice}),u=me(()=>({"ect-flex ect-line-through":r.value&&t.offer.offerValue&&i.value})),f=me(()=>t.value&&(t.value.isStatic||!t.loading)),c=me(()=>(r.value&&!t.isProductSummary||t.isProductSummary&&t.index===0)&&t.showOfferDescription&&t.appliedOnOfferMatchingField);return(v,l)=>{var h,p;return U(),Y("div",{class:we([e.field,"field ect-gap-1 ect-flex ect-flex-col"])},[e.label?(U(),ke(pr,{key:0,tag:(h=e.label.style)==null?void 0:h.tag,text:e.label.value,style:ze(e.label.style),class:we(`${e.field}_label`)},null,8,["tag","text","style","class"])):(U(),Y("div",_g,[he(vn)])),b("div",bg,[r.value&&t.offer.offerValue&&i.value?(U(),Y("div",Cg,[he(pr,{tag:o.value,text:s.value,style:ze(e.offer.offerDetails.styles.offerValue.textStyles),class:we(`${e.field}_value`)},null,8,["tag","text","style","class"])])):r.value&&!t.offer.offerValue?(U(),Y("div",wg,[he(vn)])):ge("",!0),b("div",{class:we(u.value)},[f.value?(U(),ke(pr,{key:0,tag:(p=e.value.style)==null?void 0:p.tag,text:e.value.value,style:ze(e.value.style),class:we(`${e.field}_value`)},null,8,["tag","text","style","class"])):(U(),Y("div",Eg,[he(vn)]))],2)]),c.value?(U(),Y("div",{key:2,class:"field-description ect-left-0 ect-w-max ect-pt-2",style:ze({maxWidth:e.parentWidth?e.parentWidth+"px":void 0})},[he(pr,{tag:a.value.tag,text:t.offer.offerValue.offerDescShort,style:ze(a.value),class:we(e.field+"_value")},null,8,["tag","text","style","class"])],4)):ge("",!0)],2)}}},[["__scopeId","data-v-7a78d3c9"]]),Ag={key:1,class:"filter"},kg={class:"filter-title"},Og={key:0,class:"filter-desc"},Sg={key:1,class:"filter-desc"},Ig={key:2,class:"filter-desc"},Hf=Le({__name:"AtomProductText",props:{title:{type:Object,default:()=>({})},description:{type:Object,default:null},loading:{type:Boolean,default:!1},url:{type:String,default:null}},setup(e){const n=fi(),t=e;function r(){t.url&&!t.loading&&n.push(t.url)}return(i,o)=>e.loading?(U(),Y("div",Ag,[b("div",kg,[he(vn)]),e.description?(U(),Y("div",Og,[he(vn)])):ge("",!0),e.description?(U(),Y("div",Sg,[he(vn)])):ge("",!0),e.description?(U(),Y("div",Ig,[he(vn)])):ge("",!0)])):(U(),Y(be,{key:0},[e.title?(U(),ke(pr,{key:0,class:we({"ect-cursor-pointer":e.url}),text:e.title.value,style:ze(e.title.style),onClick:r},null,8,["class","text","style"])):ge("",!0),e.description?(U(),ke(pr,{key:1,text:e.description.value,style:ze(e.description.style)},null,8,["text","style"])):ge("",!0)],64))}},[["__scopeId","data-v-f0d3c54f"]]),Tg={name:"Spinner"},Bg={class:"spinner"};function Dg(e,n,t,r,i,o){return U(),Y("div",Bg)}const Ci=Le(Tg,[["render",Dg],["__scopeId","data-v-83f8c910"]]),Rg={name:"AtomSkeletonWidget",components:{AtomSkeletonLoader:vn,AtomSpinner:Ci},props:{rows:{type:Number,default:4},type:{type:String,default:"full"},className:{type:String,default:""}},data(){return{SKELETON_TYPE:gg}}},ol=e=>(Xt("data-v-617229a3"),e=e(),Wt(),e),Lg={key:0,class:"page"},Fg=ol(()=>b("div",{class:"page-header"},null,-1)),Ng={class:"page-body"},Pg={class:"page-body_board"},Mg={key:1,class:"field"},qg={key:2,class:"filter"},$g={class:"filter-option_inner"},jg={key:3,class:"full"},Hg={key:4,class:"shuttle"},Vg={class:"shuttle-full"},Ug={class:"shuttle-full"},zg={class:"shuttle-half"},Kg={class:"shuttle-half"},Xg={class:"shuttle-button"},Wg={key:5,class:"shuttle2"},Gg={class:"shuttle2-full"},Qg=ol(()=>b("span",null,"Processing payment",-1)),Zg={key:6,class:"shuttle2"},Jg={class:"shuttle2-full"},Yg=ol(()=>b("span",null,"Processing order",-1)),em={key:10,class:"skeleton-shipping"},tm={class:"skeleton-shipping-full"},nm={class:"skeleton-shipping-half"},rm={key:11,class:"skeleton-terms"},im={class:"skeleton-terms-half"},om={class:"skeleton-terms-full"},am={class:"skeleton-terms-full"},sm={key:12,class:""},lm={class:"skeleton-terms-half"},cm={key:13,class:""},um={class:"skeleton-terms-half"},fm={key:14,class:"product"},dm={class:"product-image"},hm={class:"product-texts"},pm={class:"product-description"},vm={class:"product-action"},gm={class:"product-button"},mm={key:15,class:""};function ym(e,n,t,r,i,o){const a=er("AtomSkeletonLoader"),s=er("AtomSpinner");return t.type==="page"?(U(),Y("div",Lg,[Fg,b("div",Ng,[b("div",Pg,[he(a)])])])):t.type==="fieldattribute"?(U(),Y("div",Mg,[he(a)])):t.type==="filteroptions"?(U(),Y("div",qg,[(U(!0),Y(be,null,Me(t.rows,u=>(U(),Y("div",{key:u,class:"filter-option"},[b("div",$g,[he(a)])]))),128))])):t.type==="full"?(U(),Y("div",jg,[he(a)])):t.type==="shuttle"?(U(),Y("div",Hg,[b("div",Vg,[he(a)]),b("div",Ug,[he(a)]),b("div",zg,[he(a)]),b("div",Kg,[he(a)]),b("div",Xg,[he(a)])])):t.type==="shuttle-done"?(U(),Y("div",Wg,[b("div",Gg,[he(s,{class:"shuttle2-spinner"}),Ne(),Qg])])):t.type==="order-processing"?(U(),Y("div",Zg,[b("div",Jg,[he(s,{class:"shuttle2-spinner"}),Ne(),Yg])])):t.type==="enhanceFilter"?(U(),Y("div",{key:7,class:we(t.className)},[he(a)],2)):t.type==="offers"?(U(),Y("div",{key:8,class:we(t.className)},[he(a)],2)):t.type==="detailPage"?(U(),Y("div",{key:9,class:we(t.className)},[he(a)],2)):t.type==="shippingAddress"?(U(),Y("div",em,[b("div",tm,[he(a)]),b("div",nm,[he(a)])])):t.type==="termsAndPayment"?(U(),Y("div",rm,[b("div",im,[he(a)]),b("div",om,[he(a)]),b("div",am,[he(a)])])):t.type==="accordian-title"?(U(),Y("div",sm,[b("div",lm,[he(a)])])):t.type==="imageDiv"?(U(),Y("div",cm,[b("div",um,[he(a)])])):t.type==="product-detail"?(U(),Y("div",fm,[b("div",dm,[he(a)]),b("div",hm,[he(a)]),b("div",pm,[he(a)]),b("div",vm,[(U(!0),Y(be,null,Me(t.rows,u=>(U(),Y("div",{key:u,class:"product-action_item"},[he(a)]))),128))]),b("div",gm,[he(a)])])):t.type===i.SKELETON_TYPE.KNOWLEDGE_DETAIL?(U(),Y("div",mm,[he(a,{class:we(t.className)},null,8,["class"])])):ge("",!0)}const xm=Le(Rg,[["render",ym],["__scopeId","data-v-617229a3"]]),_m=["src"],bm={__name:"AtomImage",props:{src:{type:String,default:""},resourcesDomain:{type:String,default:""},placeholder:{type:String,default:""},height:{type:Number,default:200},width:{type:Number,default:200},loading:{type:Boolean,default:!1},sizes:{type:String}},setup(e){const n=e,t=me(()=>n.src.includes("/resource/")&&!n.src.includes("://")&&n.resourcesDomain?n.resourcesDomain+n.src:n.src.includes("/servlet/servlet.ImageServer")&&!n.src.includes("://")&&n.resourcesDomain?n.resourcesDomain+"/"+n.src:n.src);return(r,i)=>e.loading?(U(),ke(xm,{key:0,type:"full"})):e.src?(U(),Y("img",{key:1,src:t.value,placeholder:[30,20],class:"rounded",sizes:"props.sizes"},null,8,_m)):ge("",!0)}},Cm=e=>(Xt("data-v-eca105b8"),e=e(),Wt(),e),wm={class:"counter"},Em=["disabled"],Am={class:"material-icons-outlined counter-icon"},km={key:0,class:"counter-spinner"},Om=["max","disabled","value"],Sm=["disabled"],Im=[Cm(()=>b("span",{class:"material-icons-outlined counter-icon"}," add ",-1))],Vf=Le({__name:"AtomButtonCounter",props:{min:{type:Number,default:0},max:{type:Number,default:999},modelValue:{type:Number,default:1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},decimal:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.disabled||t.loading),o=or(function(f){f.target.value?r("update:modelValue",Number(f.target.value)):r("update:modelValue",0)}),a=f=>{(f.key==="."||f.key==="e"||f.key==="E")&&!f.ctrlKey&&!f.metaKey&&t.decimal&&f.preventDefault()};function s(){t.modelValue<t.max&&r("update:modelValue",t.modelValue+1)}function u(){t.modelValue>t.min&&r("update:modelValue",t.modelValue-1)}return(f,c)=>(U(),Y("div",wm,[b("button",{disabled:e.modelValue<=e.min||i.value,onClick:u},[b("span",Am,xe(e.modelValue>1?"remove":"close"),1)],8,Em),e.loading?(U(),Y("div",km,[he(Ci,{class:"item-button_spinner"})])):(U(),Y("input",{key:1,type:"number",min:"0",max:e.max,disabled:i.value,value:e.modelValue,step:"1",onInput:c[0]||(c[0]=(...v)=>Fe(o)&&Fe(o)(...v)),onKeydown:a},null,40,Om)),b("button",{disabled:e.modelValue>=e.max||i.value,onClick:s},Im,8,Sm)]))}},[["__scopeId","data-v-eca105b8"]]),Uf=te(!1),zf=te(!1),Kf=te(!1),Xf=te(!1),Tm=()=>{if(typeof window<"u"){const e=()=>{const n=window.innerWidth;zf.value=n<768,Kf.value=n>=768&&n<1024,Xf.value=n>=1024};Nt(()=>{Uf.value||(Uf.value=!0,window.addEventListener("resize",e),e())})}return{isMobile:zf,isTablet:Kf,isDesktop:Xf}},Bm=["disabled"],Dm=["disabled"],Rm={class:"ect-w-max"},Lm={class:"button-header-icon"},Fm=["onClick"],Nm={key:0,class:"button-options_item-icon"},Pm=["disabled"],Mm={class:"ect-w-max"},qm={class:"button-header-icon"},$m=["onClick"],jm={key:0,class:"button-options_item-icon"},Wf=Le({__name:"AtomButtonMenu",props:{icon:{type:String,default:null},select:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:{type:String,default:null},options:{type:Array,default:()=>[]}},emits:["selected"],setup(e,{emit:n}){const t=e,r=Tm(),i=te(!1),o=te(null),a=te({}),s=te(!1),u=n;function f(g){g.stopPropagation(),i.value=!i.value}function c(g){g.stopPropagation(),i.value=!i.value,s.value=te(i.value)}function v(g){u("selected",g),i.value=!1}function l(){!r.isMobile.value&&!t.disabled&&(i.value=!0)}function h(){!r.isMobile.value&&!s.value&&(i.value=!1)}function p(g){i.value&&(i.value=!1,s.value=!1)}return Nt(()=>{document.addEventListener("click",p)}),Ji(()=>{document.removeEventListener("click",p)}),(g,d)=>{var m;return e.options.length===1?(U(),Y("button",{key:0,class:"esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",disabled:e.disabled,onClick:d[0]||(d[0]=y=>g.$emit("selected",e.options[0]))},[b("span",null,xe(((m=e.options[0].label)==null?void 0:m.value)||e.options[0].name),1)],8,Bm)):e.options.length>1?(U(),Y(be,{key:1},[Fe(r).isMobile.value?(U(),Y(be,{key:0},[b("button",{class:"button-menu esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",disabled:e.disabled,onClick:mt(f,["stop"])},[b("span",Rm,xe(e.name||e.options[0].name),1),b("div",Lm,[he(We,{icon:"arrow_drop_down",class:"ect-relative ect-top-0.5 ect-ml-2",color:"#ffffff",size:"14"})])],8,Dm),!e.disabled&&e.options.length&&i.value?(U(),Y("div",{key:0,class:"button-options",onClick:d[2]||(d[2]=mt(()=>{},["stop"]))},[b("div",{class:"button-options_grow",onClick:d[1]||(d[1]=y=>i.value=!1)}),(U(!0),Y(be,null,Me(e.options,y=>(U(),Y("div",{key:y,class:"button-options_item",onClick:_=>v(y)},[y.selected&&e.select?(U(),Y("div",Nm,[he(We,{icon:"done",size:20,color:"black"})])):ge("",!0),Ne(" "+xe(y.name),1)],8,Fm))),128))])):ge("",!0)],64)):(U(),Y("div",{key:1,class:"button-container",onMouseenter:l,onMouseleave:h},[b("button",{class:"button-menu esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",ref_key:"btnmenu",ref:o,disabled:e.disabled,onClick:mt(c,["stop"])},[b("span",Mm,xe(e.name||e.options[0].name),1),b("div",qm,[he(We,{class:"ect-relative ect-top-0.5 ect-ml-2",icon:"arrow_drop_down",color:"#ffffff",size:"14"})])],8,Pm),!e.disabled&&e.options.length&&i.value?(U(),Y("div",{key:0,style:ze(a.value),class:"button-options",onClick:d[3]||(d[3]=mt(()=>{},["stop"]))},[(U(!0),Y(be,null,Me(e.options,y=>{var _;return U(),Y("div",{key:y,class:"button-options_item",onClick:x=>g.$emit("selected",y)},[y.selected&&e.select?(U(),Y("div",jm,[he(We,{icon:"done",size:20,color:"black"})])):ge("",!0),Ne(" "+xe(((_=y.label)==null?void 0:_.value)||y.name),1)],8,$m)}),128))],4)):ge("",!0)],32))],64)):ge("",!0)}}},[["__scopeId","data-v-cfcf21a3"]]),Hm={class:"ect-flex ect-flex-col ect-w-full"},Vm={key:0,class:"ect-h-[20px] ect-w-[150px]"},Um={key:1,class:"ect-flex ect-flex-col ect-gap-1"},zm=Le({__name:"MoleculeProductItem",props:{title:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]},description:{type:Object,default:()=>({})},thumbnail:{type:Object,default:()=>({})},attributes:{type:Array,default:()=>[]},itemId:{type:String,default:null},mode:{type:String,default:"vertical"},catalogItemId:{type:String,default:null},loading:{type:Boolean,default:!1},templateId:{type:String,default:null},url:{type:String,default:null},applyOffer:{type:Boolean,default:!1},offerSetting:{type:Object,default:null}},setup(e){var m,y;const n=hr(),t=bi(),r=e,i=te(((y=(m=t.savedItems)==null?void 0:m[r.itemId])==null?void 0:y.XX_ORD1__QTY__c)||0),o=te(!1),a=te(null),s=te(!1),u=te(!1),f=me(()=>r.actions&&r.actions.length>0),c=me(()=>r.actions.some(_=>_.action==="ADD_TO_CART")),v=me(()=>{var _,x,C;return(_=r.offer)!=null&&_.appliedOnField?$f[(x=r.offer)==null?void 0:x.appliedOnField]===((C=r.offerSetting.value)==null?void 0:C.field):!0});Ye(()=>t.savedItems,_=>{var x,C;_[r.itemId]&&!u.value&&((x=_[r.itemId])==null?void 0:x.XX_ORD1__QTY__c)!==i.value&&(i.value=((C=_[r.itemId])==null?void 0:C.XX_ORD1__QTY__c)||0,u.value=!0)},{deep:!0});function l(_){var x;u.value=!0,_===0&&((x=t.savedItems)!=null&&x[r.itemId])?p():d()}const h=_=>{var x;_.action==="ADD_TO_CART"?(u.value=!0,i.value=1,g()):_.action==="CONFIGURE"||(_.action==="CUSTOM"?window.open(((x=_.url)==null?void 0:x.value)||_.value,_.newTab?"_blank":"_self"):_.action==="ORDER_PARTS"||_.action)},p=async function(){o.value=!0,a.value=null;const _=[t.savedItems[r.itemId].Id];await t.deleteLineItems(_),o.value=!1},g=async function(){if(o.value=!0,t.loading.quoteCreate)setTimeout(()=>{g()},1e3);else{a.value=null;const x=[qf(i,r,t)];await t.saveToCart(x),o.value=!1}},d=or(async function(){s.value=!0;const _={qty:i.value,itemID:r.itemId};await t.updateCart(_),s.value=!1});return(_,x)=>{var C,S;return U(),Y("div",{class:we("item ecb-theme-card "+e.mode)},[b("div",{class:we(`item-image ${e.mode}-image`)},[he(bm,{src:e.thumbnail.value,loading:e.loading,"resources-domain":Fe(n).storefrontDetails.resourcesDomain},null,8,["src","loading","resources-domain"])],2),b("div",{class:we(`item-text ${e.mode}-text`)},[he(Hf,{title:e.title,loading:e.loading,description:e.description},null,8,["title","loading","description"])],2),b("div",Hm,[b("div",{class:we(`item-attributes ${e.mode}-attributes`)},[(U(!0),Y(be,null,Me(r.attributes,(A,I)=>(U(),ke(jf,{key:I,class:we(`item-attributes_field ${e.mode}-attributes_field`),loading:e.loading,value:A.value,label:A.label,field:A.value.field,offer:{applyOffer:A.applyOffer,offerDetails:A.offerDetails,offerValue:r.offer},"item-count":i.value,"applied-on-offer-matching-field":v.value},null,8,["class","loading","value","label","field","offer","item-count","applied-on-offer-matching-field"]))),128))],2),r.offerSetting&&v.value&&((C=r.offer)!=null&&C.offerDescShort)?(U(),Y("div",{key:0,class:we(`${e.mode}-offer-banner`)},[he(pr,{tag:e.offerSetting.offerDetails.styles.offerDescription.textStyles.tag,text:(S=r.offer)==null?void 0:S.offerDescShort,style:ze(e.offerSetting.offerDetails.styles.offerDescription.textStyles),class:we(_.field+"_value")},null,8,["tag","text","style","class"])],2)):ge("",!0)]),f.value?(U(),Y("div",{key:0,class:we([`item-button ${e.mode}-button`,"ect-flex ect-flex-col ect-gap-2"])},[e.loading||e.applyOffer&&!r.offer?(U(),Y("div",Vm,[he(vn)])):(U(),Y(be,{key:1},[o.value?(U(),ke(Ci,{key:0,class:"item-button_spinner"})):(U(),Y("div",Um,[i.value>0&&!e.loading&&c.value?(U(),ke(Vf,{key:0,modelValue:i.value,"onUpdate:modelValue":[x[0]||(x[0]=A=>i.value=A),l],loading:s.value},null,8,["modelValue","loading"])):(U(),ke(Wf,{key:1,icon:"arrow_drop_down",disabled:e.loading,options:e.actions,onSelected:x[1]||(x[1]=A=>h(A))},null,8,["disabled","options"]))]))],64))],2)):ge("",!0)],2)}}},[["__scopeId","data-v-f6e7697b"]]),Km={class:"item"},Xm={class:"item-text"},Wm={class:"item-attributes"},Gm={key:0,class:"item-button"},Qm={key:1,class:"ect-flex ect-flex-col ect-gap-1"},Zm=Le({__name:"MoleculeProductItemTable",props:{title:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]},description:{type:Object,default:()=>({})},thumbnail:{type:Object,default:()=>({})},attributes:{type:Array,default:()=>[]},itemId:{type:String,default:null},mode:{type:String,default:"vertical"},catalogItemId:{type:String,default:null},loading:{type:Boolean,default:!1},templateId:{type:String,default:null},url:{type:String,default:null},applyOffer:{type:Boolean,default:!1},offerSetting:{type:Object,default:null},offer:{type:Object,default:null}},setup(e){var g,d;const n=bi(),t=e,r=te(((d=(g=n.savedItems)==null?void 0:g[t.itemId])==null?void 0:d.XX_ORD1__QTY__c)||0),i=te(!1),o=te(!1),a=te(!1),s=me(()=>t.actions&&t.actions.length>0),u=me(()=>t.actions.some(m=>m.action==="ADD_TO_CART")),f=me(()=>{var m,y,_;return(m=t.offer)!=null&&m.appliedOnField?$f[(y=t.offer)==null?void 0:y.appliedOnField]===((_=t.offerSetting.value)==null?void 0:_.field):!0});Ye(()=>n.savedItems,m=>{var y,_;m[t.itemId]&&!o.value&&((y=m[t.itemId])==null?void 0:y.XX_ORD1__QTY__c)!==r.value&&(r.value=((_=m[t.itemId])==null?void 0:_.XX_ORD1__QTY__c)||0,o.value=!0)},{deep:!0});function c(m){var y;o.value=!0,m===0&&((y=n.savedItems)!=null&&y[t.itemId])?l():p()}const v=m=>{var y;m.action==="ADD_TO_CART"?(o.value=!0,r.value=1,h()):m.action==="CONFIGURE"||(m.action==="CUSTOM"?window.open(((y=m.url)==null?void 0:y.value)||m.value,m.newTab?"_blank":"_self"):m.action==="ORDER_PARTS"||m.action)},l=async function(){i.value=!0;const m=[n.savedItems[t.itemId].Id];await n.deleteLineItems(m),delete n.savedItems[t.itemId],i.value=!1},h=async function(){if(i.value=!0,n.loading.quoteCreate)setTimeout(()=>{h()},1e3);else{const y=[qf(r,t,n)];await n.saveToCart(y),n.savedItems[t.itemId]=r.value,i.value=!1}},p=or(async function(){a.value=!0;const m={qty:r.value,itemID:t.itemId};await n.updateCart(m),n.savedItems[t.itemId]=r.value,a.value=!1},800);return(m,y)=>(U(),Y("div",Km,[b("div",Xm,[he(Hf,{url:e.url,title:e.title,loading:e.loading},null,8,["url","title","loading"])]),b("div",Wm,[(U(!0),Y(be,null,Me(t.attributes,_=>{var x;return U(),ke(jf,{key:_.field,class:we(`item-attributes_field ${e.mode}-attributes_field`),loading:e.loading,value:_.value,label:_.label,offer:{applyOffer:_.applyOffer,offerDetails:_.offerDetails,offerValue:t.offer},"item-count":r.value,"applied-on-offer-matching-field":f.value,"show-offer-description":!!((x=t.offer)!=null&&x.offerDescShort)},null,8,["class","loading","value","label","offer","item-count","applied-on-offer-matching-field","show-offer-description"])}),128))]),s.value?(U(),Y("div",Gm,[i.value?(U(),ke(Ci,{key:0,class:"item-button_spinner"})):(U(),Y("div",Qm,[r.value>0&&!e.loading&&u.value?(U(),ke(Vf,{key:0,modelValue:r.value,"onUpdate:modelValue":[y[0]||(y[0]=_=>r.value=_),c],loading:a.value},null,8,["modelValue","loading"])):(U(),ke(Wf,{key:1,icon:"arrow_drop_down",disabled:e.loading,options:e.actions,onSelected:y[1]||(y[1]=_=>v(_))},null,8,["disabled","options"]))]))])):ge("",!0)]))}},[["__scopeId","data-v-22a3ac6d"]]),Jm=["placeholder"],Ym={key:0,class:"srch-error"},ey={class:"srch-option_lst-main"},ty={class:"italic"},ny={class:"srch-option_lst-sugg"},ry={class:"italic"},iy={class:"srch-option_lst-main"},oy={class:"italic"},ay={class:"srch-option_lst-sugg"},sy={class:"italic"},ly={class:"srch-option_lst-main"},cy={class:"italic"},uy={class:"srch-option_lst-sugg"},fy={class:"italic"},dy={key:1,class:"search1"},hy={class:"search-container_header"},py={class:"search-container_header_input ectheme-input-box"},vy=["placeholder","value"],gy=Le({__name:"BlinkMoleculeSearch",props:{placeholder:{type:String,default:""},modelValue:{type:String,default:""},suggestion:{type:Boolean,default:!1},showSearchIconAlways:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},enableSearchClick:{type:Boolean,default:!1}},emits:["update:modelValue","enter"],setup(e,{emit:n}){const t=n;let r;const i=te(""),o=te(!1),a=te(!1),s=te(null),u=()=>{s.value=null,i.value="",t("update:modelValue",""),t("enter")},f=g=>{i.value.length>1?(g.target.blur(),v(i.value+"*")):s.value="Search text must be more than one character.",o.value=!1},c=()=>{a.value||(s.value=null,i.value.length>1?v(i.value+"*"):i.value.length===1&&(s.value="Search text must be more than one character."),o.value=!1)},v=g=>{t("update:modelValue",g),o.value=!1,a.value=!1},l=g=>{const d=g.target.value;s.value=null,d.length||t("update:modelValue","")},h=()=>{t("enter")},p=g=>{var m;r&&(clearTimeout(r),r=null);const d=((m=g==null?void 0:g.target)==null?void 0:m.value)??"";r=setTimeout(()=>{t("update:modelValue",d)},500)};return(g,d)=>e.suggestion?(U(),Y("div",{key:0,class:"srch",tabindex:"0",onFocusin:d[6]||(d[6]=m=>o.value=!0),onFocusout:c,onKeydown:ir(f,["enter"])},[b("div",{class:we(["srch-inp",{"srch-error-border":s.value}])},[ln(b("input",{"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),type:"search",placeholder:e.placeholder,onInput:l},null,40,Jm),[[li,i.value]]),he(We,{icon:i.value?"close":"search",size:14,color:s.value?"red":"#acacac",onClick:u},null,8,["icon","color"])],2),s.value?(U(),Y("div",Ym,[b("span",null,xe(s.value),1)])):ge("",!0),i.value.length>1&&o.value?(U(),Y("div",{key:1,class:"srch-option",onMouseover:d[4]||(d[4]=m=>a.value=!0),onMouseout:d[5]||(d[5]=m=>a.value=!1)},[b("div",{class:"srch-option_lst",onClick:d[1]||(d[1]=m=>v(i.value+"*"))},[b("div",ey,[Ne(" Search for "),b("span",ty,xe(i.value)+"*",1)]),b("div",ny,[Ne(" word that starts with "),b("span",ry,xe(i.value)+"*",1)])]),b("div",{class:"srch-option_lst",onClick:d[2]||(d[2]=m=>v(i.value))},[b("div",iy,[Ne(" Search for "),b("span",oy,'"'+xe(i.value)+'"',1)]),b("div",ay,[Ne(" search exactly for "),b("span",sy,'"'+xe(i.value)+'"',1)])]),b("div",{class:"srch-option_lst",onClick:d[3]||(d[3]=m=>v("*"+i.value+"*"))},[b("div",ly,[Ne(" Search for "),b("span",cy,"*"+xe(i.value)+"*",1)]),b("div",uy,[Ne(" word that includes "),b("span",fy,"*"+xe(i.value)+"*",1)])])],32)):ge("",!0)],32)):(U(),Y("div",dy,[b("div",hy,[b("div",py,[b("input",{class:"",type:"search",placeholder:e.placeholder,value:e.modelValue,onInput:p,onKeyup:ir(h,["enter"])},null,40,vy),e.loading?(U(),ke(Ci,{key:0})):ge("",!0),e.modelValue?(U(),ke(We,{key:1,icon:"close",size:12,color:"#acacac",onClick:u})):ge("",!0),e.enableSearchClick||!e.modelValue?(U(),ke(We,{key:2,class:"ect-relative ect-top-[-1px]",icon:"search",size:14,color:"#acacac",onClick:h})):ge("",!0)])])]))}},[["__scopeId","data-v-31366d17"]]),Gf=e=>(Xt("data-v-f5574cfa"),e=e(),Wt(),e),my=["id"],yy={key:0,class:"product-search"},xy={key:1,class:"product-not-found"},_y=Gf(()=>b("span",{class:"product-not-found_icon material-symbols-outlined"}," error ",-1)),by=Gf(()=>b("span",{class:"product-not-found_text"},"No results found",-1)),Cy={key:2,class:"product-item"},wy=20,Ey=Le({__name:"MoleculeProductBlock",props:{configuration:{type:Object,required:!0,default:()=>({})},request:{type:Object,required:!0,default:()=>({})},fields:{type:Object,required:!0,default:()=>({})},catalogType:{type:String,required:!0},blockId:{type:String,default:""},accountId:{type:String,default:null},searchText:{type:String,default:""},onCountUpdate:{type:Function,default:null},hideHeader:{type:Boolean,default:!1},initialItems:{type:Array,default:()=>[]}},setup(e,{expose:n}){const t=["vertical","horizontal","square","table"],r=e,i=te(Math.floor(Math.random()*1e9)),o=te(null),a=bi(),s=te(1),u=te(!0),f=te(!0);te(!1);const c=te([]),v=te(0),l=te(r.request);let h=200;const p=te(r.searchText||""),g=me(()=>r.initialItems||[]),d=me(()=>!!(p.value||r.searchText));function m(Q,N,w){const D=w==="Item",L=[];return Q.forEach($=>{var j,W;const G=JSON.parse(JSON.stringify(N));try{D?G.itemId=$.Id:(G.itemId=$.XX_ORD1__Item__c,G.catalogItemId=$.Id);const{description:M,thumbnail:H,title:V,attributes:K,actions:J}=G;H!=null&&H.field&&!H.isStatic&&(H.value=rt($,H.field)),V!=null&&V.field&&!V.isStatic&&(V.value=rt($,V.field)),M!=null&&M.field&&!M.isStatic&&(M.value=rt($,M.field)),(K||[]).forEach(X=>{var se,fe;(se=X==null?void 0:X.value)!=null&&se.field&&!X.value.isStatic&&(X.value.value=rt($,X.value.field,X.value.dataType)||"-"),(fe=X==null?void 0:X.label)!=null&&fe.field&&!X.label.isStatic&&(X.label.value=rt($,X.label.field,X.label.dataType)||"-")}),(J||[]).forEach(X=>{X.action==="CUSTOM"&&(X.url&&!X.url.isStatic&&(X.url.value=rt($,X.url.field)),X.label&&!X.label.isStatic&&(X.label.value=rt($,X.label.field)))});const P=D?rt($,"XX_ORD1__Friendly_URL__c"):rt($,"XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c");((j=G.friendlyURLFields)==null?void 0:j.length)>0&&P?((W=G.friendlyURLFields)==null||W.forEach(X=>{G.friendlyURL=(G.friendlyURL||"").replace(`{!${X}}`,rt($,X))}),G.friendlyURL="/"+(G.friendlyURL||"")+"/"+P):G.url&&(G.friendlyURL=G.url+"/"+(($==null?void 0:$.Id)||"")),G.friendlyURL&&(G.friendlyURL=G.friendlyURL.replace(/\/{2,}/g,"/"))}catch{}L.push(G)}),L}const y=te(null),_=te(null),x=me(()=>{}),C=me(()=>{var Q;return(Q=r.fields)==null?void 0:Q.header});me(()=>{var Q;return((Q=C.value)==null?void 0:Q.mainHeading)||{}}),me(()=>{var Q;return((Q=C.value)==null?void 0:Q.subHeading)||{}});const S=me(()=>{var Q;return c.value.length>0?c.value:Array(A.value).fill((Q=r.fields)==null?void 0:Q.productCard)}),A=me(()=>Number(r.configuration.displaySettings.itemsPerPage||wy)),I=me(()=>Number(r.configuration.displaySettings.lazyLoadBatch)),B=me(()=>{var Q;return((Q=r.configuration.productItemOrientation)==null?void 0:Q.toLowerCase())||"vertical"}),O=te(t.includes(B.value)?y.value||B.value:"vertical"),E=me(()=>c.value.length<1&&!f.value),k=me(()=>`product-${O.value} width-${_.value?_.value:r.configuration.displaySettings.columns||1}`),R=me(()=>r.configuration.displaySettings.enableSearch),F=te(null),q=te(!1),Z=te({});Ye(s,(Q,N)=>{Q!==N&&(console.log("[fetchProducts] 1"),ee(!0))}),Ye(F,Q=>{Q!==null&&r.onCountUpdate&&r.onCountUpdate(Q)}),Ye(p,()=>{s.value=1,console.log("[fetchProducts] 2"),ee(!0)}),Ye(()=>r.searchText,(Q,N)=>{Q!==N&&(p.value=Q||"")});const ee=or(async function(Q){var $;if(h=600,g.value&&g.value.length>0&&!d.value){const G=m(g.value,($=r.fields)==null?void 0:$.productCard,r.catalogType);c.value=G,F.value=G.length,f.value=!1,Q&&o.value&&o.value.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"});return}f.value=!0;let w=A.value;I.value<w&&I.value>0&&(w=I.value);const D={...l.value,accountID:r.accountId,rowLimit:w,searchText:p.value||r.searchText,rowOffSet:A.value*(s.value-1)};Q&&o.value.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"});const L=await a.getProductItems(D,r.fields.productCard,r.catalogType);L&&(u.value=L.items.length===w,F.value=L.count,c.value=L.items,v.value=Math.ceil(L.count/A.value)),console.log("[MOLECULEPRODUCTBLOCK:fetchProducts] prodData",L),f.value=!1},h);async function ne(){const{mainHeading:Q,subHeading:N}=r.fields.header;if(!Q.isStatic&&Q.field||!N.isStatic&&N.field){const w=[];Q.isStatic?Q.value=Q.title:w.push(Q.field),N.isStatic?N.value=N.title:w.push(N.field);const D={...l.value,accountID:r.accountId,fields:w},L=await a.getEcatalogDetails(D);Q.isStatic||(Q.value=L[Q.field],Q.isStatic=!0),N.isStatic||(N.value=L[N.field],N.isStatic=!0)}else Q.value=Q.title,N.value=N.title}return n({currentPage:s,fetchProducts:ee}),Nt(()=>{ee(),ne()}),(Q,N)=>(U(),Y("div",{id:i.value,ref_key:"productBlock",ref:o,class:"product"},[R.value&&x.value===void 0&&!e.hideHeader?(U(),Y("div",yy,[he(gy,{modelValue:p.value,"onUpdate:modelValue":N[0]||(N[0]=w=>p.value=w),placeholder:"Search products..."},null,8,["modelValue"])])):ge("",!0),Je(Q.$slots,"default",{},void 0,!0),E.value?(U(),Y("div",xy,[_y,Ne(),by])):(U(),Y("div",Cy,[O.value==="table"?(U(!0),Y(be,{key:0},Me(S.value,w=>(U(),Y("div",{key:(w==null?void 0:w.catalogItemId)||(w==null?void 0:w.itemId),class:"product-item_table"},[he(Zm,{class:"ecb-theme-card","item-id":w==null?void 0:w.itemId,"catalog-item-id":w==null?void 0:w.catalogItemId,loading:f.value,mode:O.value,title:w==null?void 0:w.title,attributes:w==null?void 0:w.attributes,actions:w==null?void 0:w.actions,thumbnail:{value:w==null?void 0:w.thumbnail.value},description:w==null?void 0:w.description,url:w==null?void 0:w.friendlyURL,"template-id":e.configuration.productTemplateId,"ecatalog-id":w==null?void 0:w.eCatalogId,"apply-offer":q.value,"offer-setting":Z.value,offer:w==null?void 0:w.offer},null,8,["item-id","catalog-item-id","loading","mode","title","attributes","actions","thumbnail","description","url","template-id","ecatalog-id","apply-offer","offer-setting","offer"])]))),128)):(U(!0),Y(be,{key:1},Me(S.value,w=>(U(),Y("div",{key:(w==null?void 0:w.catalogItemId)||(w==null?void 0:w.itemId),class:we(["product-item_record",k.value])},[he(zm,{"item-id":w==null?void 0:w.itemId,"catalog-item-id":w==null?void 0:w.catalogItemId,loading:f.value,mode:O.value,title:w==null?void 0:w.title,attributes:w==null?void 0:w.attributes,actions:w==null?void 0:w.actions,thumbnail:{value:w==null?void 0:w.thumbnail.value},description:w==null?void 0:w.description,url:w==null?void 0:w.friendlyURL,"template-id":e.configuration.productTemplateId,"ecatalog-id":w==null?void 0:w.eCatalogId,"apply-offer":q.value,"offer-setting":Z.value,offer:w==null?void 0:w.offer},null,8,["item-id","catalog-item-id","loading","mode","title","attributes","actions","thumbnail","description","url","template-id","ecatalog-id","apply-offer","offer-setting","offer"])],2))),128))]))],8,my))}},[["__scopeId","data-v-f5574cfa"]]),Qf=e=>(Xt("data-v-3951668d"),e=e(),Wt(),e),Ay={class:"catalog ect-flex ect-flex-col ect-gap-0 md:ect-flex-row"},ky={class:"catalog-product md:ect-grow"},Oy={class:"catalog-filter-mobile ect-flex ect-justify-between m-show"},Sy=Qf(()=>b("h3",null,"Filter Products",-1)),Iy=Qf(()=>b("span",null," OPEN FILTERS",-1)),Zf=Le({__name:"OrganismsCatalogBlock",props:{configuration:{type:Object,required:!0,default:()=>({})},fields:{type:Object,required:!0,default:()=>({})},id:{type:String,default:""},searchTerm:{type:String,default:""},onCountUpdate:{type:Function,default:null},initialItems:{type:Array,default:()=>[]}},setup(e){var l,h,p,g,d,m,y,_,x,C,S;const n=hr(),t=e,r=te(!1),i=te(((l=t.configuration.dynamicFilters)==null?void 0:l.length)>0&&((h=t.configuration.displaySettings)==null?void 0:h.displayDynamicFilters)&&!t.searchTerm),o=te(t.configuration.displaySettings),a=me(()=>vg.get(t.configuration.catalogType)),s=me(()=>{let A=f.value.searchText;return A&&!A.endsWith("*")&&(A+="*"),A||""}),u=me(()=>{var F;const A=[],{description:I,thumbnail:B,title:O,attributes:E,actions:k}=t.fields.productCard,R=[I,B,O];return E.forEach(q=>{R.push(q.value),R.push(q.label)}),(k==null?void 0:k.length)>0&&k.forEach(q=>{q.action==="CUSTOM"&&(R.push(q.url),R.push(q.label))}),R.forEach(q=>{!q.isStatic&&q.field?A.push(q.field):q.value=q.title||"-"}),a.value==="eCatalog"?(A.push("XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c"),A.push("XX_ORD1__Item__r.XX_ORD1__SYS_Requires_Configuration__c")):(A.push("XX_ORD1__Friendly_URL__c"),A.push("XX_ORD1__SYS_Requires_Configuration__c")),((F=t.fields.productCard.friendlyURLFields)==null?void 0:F.length)>0&&A.push(...t.fields.productCard.friendlyURLFields),A}),f=te({blockId:t.id,catalogType:pg.get(t.configuration.catalogType)||"Full",checkcurrency:(p=o.value)==null?void 0:p.checkCurrency,eCatalogIDs:t.configuration.catalogType==="ECATALOG_OVERRIDE"&&t.configuration.catalogId?[t.configuration.catalogId]:null,fields:u.value,alternateFieldName:t.configuration.catalogCustomField,searchText:"",whereCondition:t.configuration.staticFilters,sortByField:((d=(g=t.configuration.sort)==null?void 0:g.primary)==null?void 0:d.field)||"Name",sortOrder:(y=(m=t.configuration.sort)==null?void 0:m.primary)==null?void 0:y.direction,secondarySortByField:(x=(_=t.configuration.sort)==null?void 0:_.secondary)==null?void 0:x.field,secondarySortOrder:(S=(C=t.configuration.sort)==null?void 0:C.secondary)==null?void 0:S.direction}),c=te(null),v=te(null);return Ye(()=>r.value,A=>{A&&window.scrollTo(0,0)}),Nt(()=>{f.value.searchText=t.searchTerm||""}),Ye(f,A=>{v.value&&v.value.fetchFilterList(),c.value&&(c.value.currentPage=1,console.log("[fetchProducts] 4"),c.value.fetchProducts())},{deep:!0}),Ye(()=>t.searchTerm,A=>{typeof A=="string"&&(f.value.searchText=A)}),(A,I)=>(U(),Y("div",Ay,[b("div",ky,[he(Ey,{ref_key:"product",ref:c,"block-id":e.id,"account-id":Fe(n).activeStorefrontInfo.accountId,configuration:e.configuration,"catalog-type":a.value,request:f.value,fields:e.fields,"search-text":s.value,"initial-items":t.initialItems,"hide-header":!!t.searchTerm,"on-count-update":t.onCountUpdate},{default:Ve(()=>[ln(b("div",Oy,[Sy,b("div",{class:"ect-flex ect-items-center ect-gap-2 m-show",onClick:I[0]||(I[0]=B=>r.value=!0)},[he(We,{class:"filter-product_icon",icon:"tune",color:"#acacac",size:20}),Iy])],512),[[xu,!r.value&&i.value]])]),_:1},8,["block-id","account-id","configuration","catalog-type","request","fields","search-text","initial-items","hide-header","on-count-update"])])]))}},[["__scopeId","data-v-3951668d"]]),Ty=function(e,n){const t={};t.sectionStyle={},t.blockStyle={};const{visiblity:r}=e;t.visibility=r;const{layout:i}=e;if(t.blockStyle=By(i,n),i&&(i!=null&&i.padding)){const{top:s,bottom:u,left:f,right:c}=i.padding;s&&(t.sectionStyle.paddingTop=`${s}px`),u&&(t.sectionStyle.paddingBottom=`${u}px`),f&&(t.sectionStyle.paddingLeft=`${f}px`),c&&(t.sectionStyle.paddingRight=`${c}px`)}i!=null&&i.gap&&(t.sectionStyle.gap=`${i.gap}px`);const{styling:o}=e;o&&(o.verticalAlignment&&(t.sectionStyle.alignItems=o.verticalAlignment),o.radius&&(t.sectionStyle.borderRadius=o.radius),o.borderStyle&&(t.sectionStyle.borderStyle=o.borderStyle));const{Background:a}=e;return a&&a.style==="Solid"&&(t.sectionStyle.backgroundColor=a.color),a&&a.opacity==="100%"&&(t.sectionStyle.opacity=1),a&&a.image&&a.image!=="sampleImage.png"&&(t.sectionStyle.backgroundImage=`url(${a.image})`,a.imageSize&&(t.sectionStyle.backgroundSize=a.imageSize)),a&&a.repeat==="no-repeat"&&(t.sectionStyle.backgroundRepeat=a.repeat),a&&(a.horizontalAlignment||a.verticalAlignment)&&(t.sectionStyle.backgroundPosition=a.horizontalAlignment+" "+a.verticalAlignment),t};function By(e,n){if(!e)return[{}];const{columnSize:t,columns:r}=e;if(n)return Array(r).fill({display:"flex",flexDirection:"column",width:"100%"});if(!t)return Array(r).fill({});const i=t.split("/");return typeof r=="string"&&i.length!==parseInt(r)?Array(r).fill({}):typeof r=="number"&&i.length!==r?Array(r).fill({}):i.map(o=>({flexBasis:`${o}`}))}const wi=e=>(Xt("data-v-d8d63f41"),e=e(),Wt(),e),Dy={class:"ect-composable-catalog-wrapper"},Ry=["href"],Ly=wi(()=>b("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons","data-name":"ec-material-icons"},null,-1)),Fy=wi(()=>b("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons+Outlined","data-name":"ec-material-icons-outlined"},null,-1)),Ny=wi(()=>b("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons+Round","data-name":"ec-material-icons-round"},null,-1)),Py=wi(()=>b("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200","data-name":"ec-material-symbols-outlined"},null,-1)),My={class:"ect-flex ect-flex-col md:ect-flex-row"},qy=["data-bid","data-bname"],$y={key:0,class:"ect-flex ect-items-center ect-justify-center ect-min-h-[50vh]"},jy=[wi(()=>b("div",{class:"ect-flex ect-flex-col ect-items-center ect-gap-3"},[b("div",{class:"ect-spinner","aria-label":"Loading"}),b("div",{class:"ect-text-sm ect-text-gray-500"},"Loading catalog…")],-1))],Hy={key:1,class:"ect-composable-catalog ectheme"},Vy=["data-sid","data-sname"],Uy=["data-bid","data-bname"],zy=Le({__name:"ExpediteCatalog",props:{templateId:{type:String,required:!0},quoteId:{type:String,default:null},userId:{type:String,required:!0},searchTerm:{type:String,default:""},onCatalogCountUpdate:{type:Function,default:null},previewData:{type:Object,default:()=>({})},initialData:{type:Array,default:()=>[]}},setup(e){const n=e,t=Mf(),r=hr(),i=te(!1),o=te(!1),a=te(""),s=te(""),u=me(()=>t.pageBlocks||[]),f=me(()=>{var l;const v=[];return(l=u.value)==null||l.forEach(h=>{var m;const p={...h},g=typeof h.contentJSON=="string"?JSON.parse(h.contentJSON):h.contentJSON;let d={};g&&(d=Ty(g,i.value),p.styleObject=h.hideStyle?{}:d.sectionStyle,p.visibility=d.visibility,(m=p.blocks)==null||m.forEach((y,_)=>{y.styleObject=d.blockStyle[_]})),v.push(p)}),v}),c=()=>{i.value=window.innerWidth<=768};return Nt(async()=>{var h,p,g;window.addEventListener("resize",c),c(),o.value=!0,await r.fetchDomainDetails(),r.setData({templateId:n.templateId,quoteId:n.quoteId,userId:n.userId});const v=cu(),l=(h=v==null?void 0:v.proxy)==null?void 0:h.$el;l&&typeof l.getRootNode=="function"&&l.getRootNode(),r.getTheme().then(d=>{d&&d.value&&(a.value=d.value);try{r.setThemeData()}catch{}});try{const d=((p=r.salesforceOrgId)==null?void 0:p.value)??r.salesforceOrgId,m=((g=r.storefrontId)==null?void 0:g.value)??r.storefrontId;if(d&&m&&typeof d=="string"&&typeof m=="string"){const y=Date.now(),_=`${Ho}/${d}/${m}/css/theme_${m}.css?t=${y}`;s.value=_}}catch{}await r.getBlockInformation(),o.value=!1}),(v,l)=>{var h,p,g,d,m,y,_;return U(),Y("div",Dy,[a.value?(U(),ke(Wi("style"),{key:0,"data-name":"template-theme"},{default:Ve(()=>[Ne(xe(a.value),1)]),_:1})):ge("",!0),s.value?(U(),Y("link",{key:1,rel:"stylesheet",href:s.value,"data-name":"ec-theme-stylesheet-link"},null,8,Ry)):ge("",!0),Ly,Fy,Ny,Py,Object.keys(e.previewData).length>0?(U(),Y(be,{key:2},[he(Ga),b("div",My,[b("div",{class:"ect-w-full",style:ze((h=e.previewData)==null?void 0:h.styleObject),"data-bid":(p=e.previewData)==null?void 0:p.blockId,"data-bname":(g=e.previewData)==null?void 0:g.blockName},[he(Zf,{id:(d=e.previewData)==null?void 0:d.Id,mode:"preview",configuration:(m=e.previewData)==null?void 0:m.configuration,fields:(y=e.previewData)==null?void 0:y.fields,"search-term":(_=e.previewData)==null?void 0:_.searchTerm,"on-count-update":e.onCatalogCountUpdate},null,8,["id","configuration","fields","search-term","on-count-update"])],12,qy)])],64)):(U(),Y(be,{key:3},[he(Ga),o.value?(U(),Y("div",$y,jy)):(U(),Y("div",Hy,[(U(!0),Y(be,null,Me(f.value,x=>(U(),Y(be,{key:x.id},[Fe(r).useVisiblity(x.visibility)?(U(),Y("div",{key:0,style:ze(x.styleObject),class:"ect-flex ect-flex-col md:ect-flex-row","data-sid":x.sectionId,"data-sname":x.sectionName},[(U(!0),Y(be,null,Me(x.blocks,C=>(U(),Y(be,{key:C.id},[(C==null?void 0:C.blockFormat)==="catalog"?(U(),Y("div",{key:0,class:"ect-w-full",style:ze(C.styleObject),"data-bid":C.blockId,"data-bname":C.blockName},[he(Zf,{id:C.Id,configuration:C.configuration,fields:C.fields,"search-term":e.searchTerm||C.searchTerm,"on-count-update":e.onCatalogCountUpdate,"initial-items":e.initialData},null,8,["id","configuration","fields","search-term","on-count-update","initial-items"])],12,Uy)):ge("",!0)],64))),128))],12,Vy)):ge("",!0)],64))),128))]))],64))])}}},[["__scopeId","data-v-d8d63f41"]]);let Vo=null;if(typeof window<"u"){try{Vo=Rh()}catch{}Vo||(Vo=Lh(),ci(Vo))}let Uo=null,zo=null;const al=new Set;let vr=null;const sl=new Map;async function Ky(e){if(!e)return"";if(sl.has(e))return sl.get(e);try{const n=await fetch(e,{credentials:"omit",cache:"no-cache"});if(n.ok){const t=await n.text();return sl.set(e,t),t}}catch(n){console.warn("[ExpediteComponents] Failed to fetch theme CSS:",n)}return""}async function ll(e,n){if(!e||!n)return;const t=e.querySelector("style[data-vue-expedite-theme]");t&&t.remove();try{const r=await Ky(n);if(r){const i=document.createElement("style");i.setAttribute("data-vue-expedite-theme","true"),i.textContent=r,e.prepend(i)}}catch(r){console.warn("[ExpediteComponents] Failed to inject theme CSS:",r)}}function cl(e){vr=e||null,vr&&al.forEach(n=>{n&&n.shadowRoot&&ll(n.shadowRoot,vr)})}async function Xy(){return Uo||zo||(zo=(async()=>{try{const e=new URL("./style.css",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Bn&&Bn.src||new URL("vue-expedite-components.umd.cjs",document.baseURI).href).href,n=await fetch(e);if(n.ok)return Uo=await n.text(),Uo}catch(e){console.warn("[ExpediteComponents] Failed to load CSS:",e)}return null})(),zo)}const ul=e=>class extends e{async connectedCallback(){if(super.connectedCallback&&super.connectedCallback(),al.add(this),!!this.shadowRoot){if(this.shadowRoot.querySelector("style[data-vue-expedite-style]")){vr&&ll(this.shadowRoot,vr);return}try{const n=await Xy();if(n){const t=document.createElement("style");t.setAttribute("data-vue-expedite-style","true"),t.textContent=n,this.shadowRoot.prepend(t)}else{const t=new URL("./style.css",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Bn&&Bn.src||new URL("vue-expedite-components.umd.cjs",document.baseURI).href).href,r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("data-vue-expedite-style","true"),r.href=t,this.shadowRoot.prepend(r)}vr&&ll(this.shadowRoot,vr)}catch(n){console.warn("[ExpediteComponents] Failed to inject CSS:",n)}}}disconnectedCallback(){al.delete(this),super.disconnectedCallback&&super.disconnectedCallback()}},Jf=ul(ja(lv)),Yf=ul(ja(Sv)),ed=ul(ja(zy));function fl(){typeof window<"u"&&(customElements.get("vue-expedite-configurator")||customElements.define("vue-expedite-configurator",Jf),customElements.get("vue-expedite-gpt")||customElements.define("vue-expedite-gpt",Yf),customElements.get("vue-expedite-catalog")||customElements.define("vue-expedite-catalog",ed))}typeof window<"u"&&fl();const Wy={register:fl,applyThemeToShadows:cl};typeof window<"u"&&(window.VueExpediteComponents=Object.assign(window.VueExpediteComponents||{},{applyThemeToShadows:cl})),zt.ExpediteCatalogElement=ed,zt.ExpediteConfiguratorElement=Jf,zt.ExpediteGPTElement=Yf,zt.applyThemeToShadows=cl,zt.default=Wy,zt.registerWebComponents=fl,Object.defineProperties(zt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
168
+ `,Ho="https://d2pgvmpph8dmlo.cloudfront.net";function Pf(e,n,t){return e?e==null?void 0:e.map(r=>cg(r,n,t)):[]}function cg(e,n,t){const{url:r,staticResource:i}=e;if(!r)return null;if(r.includes("/resource/")&&!r.includes("://")&&i){const o=r.split("/"),a=o[o.length-1];return`${Ho}/${t}/static/${a}.${n}`}else return r}const Mf=wt("blockLegacy",()=>{const e=hr(),n=te(null),t=te(null),r=te(!1),i=te(null);async function o(f,c=!0){var h,p;if(console.info("fetchBlockInformation templateId:",f),!f)return;c&&(n.value=[],r.value=!1);const v={storefrontId:e.orgWithStorefrontId,templateId:f};console.log("fetchBlockInformation variables",JSON.stringify(v)),console.log("fetchBlockInformation getTemplateBlock",Nf);const l=await Ff(Nf,v);if(t.value=f,c)(h=l.content)!=null&&h.blocks?n.value=a(JSON.parse(l.content.blocks)):n.value=[],r.value=!0;else return((p=l==null?void 0:l.content)==null?void 0:p.blocks)||[]}function a(f){const c=e.salesforceOrgId;return f==null||f.forEach(v=>{v.blocks=v.blocks?JSON.parse(v.blocks):[],v.blocks.forEach(l=>{var h,p;Object.assign(l,JSON.parse(l.contentJSON)),l.contentJSON=null,l.id=l.blockId||l.Id,(l.componentName==="catalogBlock"||l.componentName==="relatedProducts")&&(s(l.fields.productCard.actions),l.fields.noFriendlyURL=!0,l.fields.productCard.friendlyURL=null,l.fields.productCard.friendlyURLFields=null,(h=l.configuration)!=null&&h.productTemplateId?l.fields.productCard.url="/product/"+((p=l.configuration)==null?void 0:p.productTemplateId):l.fields.productCard.url=null),l.componentName==="productSummary"&&(console.log("block.fields.actions",l.fields.actions),s(l.fields.actions)),l.customJS&&(l.customJS=Pf(l.customJS,"js",c)),l.customCSS&&(l.customCSS=Pf(l.customCSS,"css",c))})}),f}function s(f){f.forEach(c=>{c.action==="CUSTOM_ACTION"&&(c.action="CUSTOM",c.name=c.label.title,c.value=c.url.field||c.url.title,c.newTab=c.openInNewTab)})}return{metaInfo:i,currentPageId:t,pageBlocks:n,blockLoaded:r,fetchBlockInformation:o,getFormattedSectionBlocks:f=>me(()=>{const c=[];return n.value&&n.value.length>0&&n.value.forEach(v=>{const l=v.blocks;l&&l.length>0&&l.forEach(h=>{if(h.id=h.blockId,f){const p=["checkoutAccount","shippingAddress","shippingMethod","customForm","termsAndPayment","quoteSummary","customCode"];console.log("section.sectionName",v.sectionName,h.componentName),h&&h.configuration&&(p.includes(h.componentName)||h.configuration.isCheckoutBlock)&&c.push(h)}else h&&h.configuration&&!f&&c.push(h)})}),c})}}),hr=wt("composableCatalog",()=>{const e=Mf();bi();const n=Qt(),t=te(!0),r=te({accountId:"",contactId:"",userType:"",domain:"",locale:"en-US"}),i=te({}),o=te(""),a=te(""),s=te(""),u=te(""),f=te(""),c=te(""),v=te(null),l=te(!1),h=me(()=>u.value+"::"+f.value);async function p(){v.value=null,l.value=!0;try{const A={domain:qo,templateBlocksFilter:{templateId:{eq:"wrapperDefault"}}},I=Date.now().toString(),B=await Ge.post(`${_i}?t=${I}`,{query:sg,variables:A},{headers:{"Content-Type":"application/json","x-api-key":$o,"Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0","X-Cache-Bust":I},withCredentials:!1});console.log("[COMPOSABLECATALOG:fetchDomainDetails] response",B);const O=B&&B.data?B.data:null;console.log("[COMPOSABLECATALOG:fetchDomainDetails] payload",O);const E=O&&O.data&&O.data.dataByDomain&&Array.isArray(O.data.dataByDomain.items)?O.data.dataByDomain.items:[],k=E.length?E[0]:null;return console.log("[COMPOSABLECATALOG:fetchDomainDetails] item",k),console.log("[COMPOSABLECATALOG:fetchDomainDetails] storefrontDetails",i.value),i.value=k,r.value={accountId:k.guestAccountId,contactId:"",userType:"AWSGuest",domain:k.domain,locale:"en-US"},u.value=k.organization.salesforceOrgId,f.value=k.storefrontId,k}catch(A){throw console.info("[COMPOSABLECATALOG:fetchDomainDetails] Error fetching domain",A),v.value=A&&A.message?A.message:"Unknown error",A}finally{l.value=!1}}function g(A){a.value=(A==null?void 0:A.templateId)??"",s.value=(A==null?void 0:A.quoteId)??"",c.value=(A==null?void 0:A.userId)??""}function d(A){A.value=A}function m(A){i.value=A}async function y(){try{await e.fetchBlockInformation(a.value,!0)}catch(A){n.handleError(A,"getBlockInformation")}}const _=async()=>{var A,I;if(console.log("[COMPOSABLECATALOG:getTheme]"),!!f.value)try{const B=await Ff(lg,{storefrontId:f.value,filter:{key:{eq:"theme"},templateId:{eq:"wrapper"}}});return console.log("[COMPOSABLECATALOG:getTheme] themeData",B),((I=(A=B.content)==null?void 0:A.items)==null?void 0:I[0])??null}catch(B){console.log("[COMPOSABLECATALOG:getTheme] Error getting theme data",B)}},x=()=>{if(typeof document>"u")return;const A=u.value,I=f.value;if(!A||!I)return;const B=`${Ho}/${A}/${I}/css/theme_${I}.css`;let O=!1;if(typeof window<"u"&&window.VueExpediteComponents&&typeof window.VueExpediteComponents.applyThemeToShadows=="function")try{window.VueExpediteComponents.applyThemeToShadows(B),O=!0}catch(q){console.warn("[COMPOSABLECATALOG:setThemeData] shadow injection failed; will inject in head",q)}let E="";try{E=new URL(_i).origin}catch{}const k=typeof window<"u"?window.location.href:"",R=(q,Z={})=>{const ee=document.head||document.getElementsByTagName("head")[0];if(!ee)return;let ne=document.getElementById(q);ne||(ne=document.createElement("link"),ne.id=q,ee.appendChild(ne)),Object.entries(Z).forEach(([Q,N])=>{N!=null&&ne.setAttribute(Q,String(N))})};((q,Z,ee=!0)=>{const ne=document.head||document.getElementsByTagName("head")[0];if(!ne||document.getElementById(q))return;const Q=document.createElement("script");Q.id=q,Q.src=Z,ee&&(Q.async=!0),ne.appendChild(Q)})("ec-webfont-loader","https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js",!0),R("ec-preconnect-fonts",{rel:"preconnect",href:"https://fonts.gstatic.com"}),E&&R("ec-preconnect-appsync",{rel:"preconnect",href:E}),O||R("ec-theme-stylesheet",{rel:"stylesheet",href:B}),R("ec-google-fonts",{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Round|Material+Symbols+Outlined|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|Montserrat:300,400,500,600,700,800|Roboto:300,400,500,600,700,800|Abel|Caveat:400,700|Titillium+Web:400,600,700"}),k&&R("ec-canonical",{rel:"canonical",href:k}),R("ec-favicon",{rel:"icon",type:"image/x-icon",href:`${Ho}/expedite/Expedite_Favicon.ico`})};function C(){return!0}function S(){a.value="",s.value="",u.value="",f.value="",c.value=""}return{templateId:a,isLoading:t,activeStorefrontInfo:r,quoteAccount:o,storefrontDetails:i,salesforceOrgId:u,storefrontId:f,userId:c,orgWithStorefrontId:h,useVisiblity:C,fetchDomainDetails:p,setData:g,setQuoteId:d,setStorefrontDetails:m,getBlockInformation:y,getTheme:_,setThemeData:x,reset:S}}),tn=async(e,n=null,t="",r=!1)=>{const i=_i,o=$o;let a=200,s;const u=qo,f=hr();try{const c=n;let v="";f.activeStorefrontInfo&&f.activeStorefrontInfo.accountId&&!v&&(v=f.activeStorefrontInfo.accountId),c.data&&f.activeStorefrontInfo&&!e.includes("CognitoActions")&&!e.includes("query listUsers")&&(c.data.userType=f.activeStorefrontInfo.userType,c.data.accountId=v,c.data.domain=u);const l=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":o},body:JSON.stringify({query:e,variables:c})});if(s=await(l==null?void 0:l.json()),s=s.data,t)s=JSON.parse(s[t]),a=Number(s.statusCode),s=s.content,a===401&&console.info("401",e,JSON.stringify(n));else if(e.includes("SalesforceActions")){let h=s;h=JSON.parse(s.salesforceActions),h.statusCode==="401"&&console.info("401",e,JSON.stringify(n),s)}}catch(c){console.log(c),a=400,s=c}return{statusCode:a,response:s}},ug=["Needs Configuration","Suggests Configuration","Upload Configuration"],fg=["Upload","Upload Add","Upload Configuration"],dg=["No Configuration","Suggests Configuration","Upload Add","",null,void 0],hg=["CONFIGURE","UPLOAD","ADD_TO_CART"],pg=new Map([["Full","Full"],["FULL","Full"],["INSTALL_BASE","InstallBase"],["ECATALOG_ACCOUNT_PRIMARY","Default"],["ECATALOG_ACCOUNT_CUSTOM","Alternate"],["ECATALOG_OVERRIDE","Override"]]),vg=new Map([["Full","Item"],["FULL","Item"],["INSTALL_BASE","InstallBase"],["ECATALOG_ACCOUNT_PRIMARY","eCatalog"],["ECATALOG_ACCOUNT_CUSTOM","eCatalog"],["ECATALOG_OVERRIDE","eCatalog"]]),An=(e,n,t=!1)=>{const r=Qt();let i,o,a;return t?(o=e.statusCode,a=e.content):(i=JSON.parse(e.response.salesforceActions),o=i.statusCode,a=i.content),Number(o)===200&&a&&a.message&&typeof a.message=="string"&&a.message.startsWith("ERROR:")?(r.handleError(a.message,"useExtractContent"),!1):Number(o)!==200||e.statusCode!==200||typeof a=="string"&&a.includes("ERROR:")||typeof a=="string"&&a.includes("Error:")||a.errorCode==="APEX_ERROR"?(a.errorCode==="APEX_ERROR"?r.handleError(a.message,"useExtractContent"):n||r.handleError(a,"useExtractContent"),!1):a},bi=wt("catalog",()=>{const e=hr(),n=te(!1),t=te(0),r=te(null),i=te(null),o=te([]),a=te({}),s=te({}),u=te(null),f=te(null),c=te(!1),v=te({search:""}),l=te({qliRecords:!0,quoteCreate:!1,quoteDetails:!1}),h=me(()=>e.activeStorefrontInfo.accountId),p=me(()=>({domain:e.activeStorefrontInfo.domain,accountId:h.value,userType:e.activeStorefrontInfo.userType}));function g(F="true"){w2(`qreset-${r.value}`,F)}async function d(F){const q={action:"makeCall",data:{...p.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=deleteLineItems&ut="+e.activeStorefrontInfo.userType,payload:JSON.stringify(F)}},Z=await tn(en,q,void 0,!0),ee=An(Z);ee&&(t.value--,I(!0),console.log("[CATALOG:deleteLineItems] content",ee)),g()}async function m(F){var w,D;if(!F.qty)return;const q=e.quoteId;if(!q)return;F.retry=1;const Z={...F,quoteid:q},ee={action:"makeCall",data:{...p.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=updateQLI&ut="+e.activeStorefrontInfo.userType,payload:JSON.stringify(Z)}},ne=await tn(en,ee,void 0,!0),Q=(D=(w=ne.response)==null?void 0:w.salesforceActions)==null?void 0:D.toLowerCase();(Q.includes("record currently unavailable")||Q.includes("unable_to_lock_row"))&&F.retry<3&&setTimeout(()=>{F.retry+=1,m(F)},500),An(ne)&&I(!0),g()}async function y(F){const q=e.quoteId;if(!q)return;Array.isArray(F)&&(F=F[0]);const Z={quoteId:q,itemId:F.itemID,eCatalogItemId:F.eCatalogItemID,quantity:F.qty,accountId:h.value,offerId:F.offerId,offerType:F.offerType,offerDiscount:F.offerDiscount,appliedOnField:F.appliedOnField,rpId:F.rpId,qtyTierAmt:F.qtyTierAmt,isAddToCartFromIB:F.isAddToCartFromIB},ee={action:"makeCall",data:{...p.value,callType:"POST",endpoint:"/services/apexrest/XX_ORD1/ecommerce?type=saveItemToQuoteBlink&ut="+e.activeStorefrontInfo.userType,payload:JSON.stringify(Z)}},ne=await tn(en,ee,void 0,!0),Q=An(ne);if(Q){t.value++,I(!0);const N=JSON.parse(Q);N.quoteId&&N.quoteId!==q&&(r.value=N.quoteId,e.setQuoteId(r.value))}g()}async function _(F,q,Z){var D,L,$;const ee=Z==="Item",ne=[],Q=((F==null?void 0:F.searchText)||"").toString().trim(),N=Array.isArray(F==null?void 0:F.fields)?F.fields:[];Array.isArray(F==null?void 0:F.filters)&&F.filters,F==null||F.filterLogic;const w={searchPL:Q,origin:"genesis_ai",userId:(e==null?void 0:e.userId)||"",orgId:(e==null?void 0:e.salesforceOrgId)||"",orgType:"Production",requestId:ar(),quoteId:(e==null?void 0:e.quoteId)||"",accountId:((D=e==null?void 0:e.activeStorefrontInfo)==null?void 0:D.accountId)||"",numberOfRecords:(F==null?void 0:F.numberOfRecords)||(F==null?void 0:F.rowLimit)||10,fields:N,filters:(F==null?void 0:F.whereCondition)||[]};try{const j=await fetch("https://ec-apigw.blink.expedite1.com/getCatalogProducts",{method:"POST",headers:{"x-api-key":"Y:GPb{M&0*v:C%])A(+i9acGu4aY)A=%","Content-Type":"application/json"},body:JSON.stringify(w)}),W=await j.json();if(!j.ok||!(W!=null&&W.isSuccess)||!((L=W==null?void 0:W.data)!=null&&L.selected_products))return;const M=W.data.selected_products,H=Object.values(M).map(K=>{var J;return(J=K==null?void 0:K.catalogResponse)==null?void 0:J.productInfo}).filter(Boolean);H.forEach(K=>{var se,fe,ue,ie;const J=JSON.parse(JSON.stringify(q)),P=rt(K,ee?"XX_ORD1__Friendly_URL__c":"XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c"),X=rt(K,ee?"XX_ORD1__SYS_Requires_Configuration__c":"XX_ORD1__Item__r.XX_ORD1__SYS_Requires_Configuration__c");ee?J.itemId=K.Id:(J.itemId=K.XX_ORD1__Item__c,J.catalogItemId=K.Id),J.thumbnail.value=J.thumbnail.field&&!J.thumbnail.isStatic?rt(K,J.thumbnail.field):"",J.title.value=J.title.field&&!J.title.isStatic?rt(K,J.title.field):"",J.description.value=J.description.field&&!J.description.isStatic?rt(K,J.description.field):"",(se=J.attributes)==null||se.forEach(oe=>{oe.value.field&&(oe.value.value=rt(K,oe.value.field,oe.value.dataType)||"-"),oe.label.field&&(oe.label.value=rt(K,oe.label.field,oe.label.dataType)||"-")}),J.actions=J.actions.filter(({action:oe})=>oe==="ADD_TO_CART"&&dg.includes(X)||oe==="CONFIGURE"&&ug.includes(X)||oe==="UPLOAD"&&fg.includes(X)||!hg.includes(oe)),(fe=J.actions)==null||fe.forEach(oe=>{if(oe.action==="CUSTOM"){const{url:le,label:ce}=oe;le.isStatic||(le.value=rt(K,le.field)),ce.isStatic||(ce.value=rt(K,ce.field))}}),((ue=J.friendlyURLFields)==null?void 0:ue.length)>0&&P?((ie=J.friendlyURLFields)==null||ie.forEach(oe=>{J.friendlyURL=J.friendlyURL.replace(`{!${oe}}`,rt(K,oe))}),J.friendlyURL="/"+J.friendlyURL+"/"+P):J.url&&(J.friendlyURL=J.url+"/"+K.Id),J.friendlyURL&&(J.friendlyURL=J.friendlyURL.replace(/\/{2,}/g,"/")),ne.push(J)});const V=Number((($=W==null?void 0:W.data)==null?void 0:$.totalCount)||H.length)||0;return{items:ne,count:V>2e3?2e3:V}}catch(G){console.log("[CATALOG:getProductItems] new API error",G);return}}async function x(F){var ne;console.log("[CATALOG:getEcatalogDetails] jsonData",F),F.accountID=e.activeStorefrontInfo.accountId;const q={action:"makeCall",data:{...p.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getEcatalogDetails&ut=${e.activeStorefrontInfo.userType}`,payload:JSON.stringify(F)}},Z=await tn(en,q),ee=An(Z);if(ee!==!1)return(ne=JSON.parse(ee))==null?void 0:ne.recordData}async function C(F,q=()=>{}){F.accountID=e.activeStorefrontInfo.accountId;const Z={action:"makeCall",data:{...p.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getCatalogGroupCounts&ut=${e.activeStorefrontInfo.userType}`,payload:JSON.stringify(F)}},ee=await tn(en,Z,void 0,!0),ne=JSON.parse(JSON.parse(ee.response.salesforceActions).content);return q(ne),ne}async function S(F,q=()=>{}){const Z={action:"makeCall",data:{...p.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getCatalogPicklistGroupCounts&ut=${e.activeStorefrontInfo.userType}`,payload:JSON.stringify(F)}},ee=await tn(en,Z,void 0,!0);return q(JSON.parse(JSON.parse(ee.response.salesforceActions).content)),JSON.parse(JSON.parse(ee.response.salesforceActions).content)}async function A(){var ne,Q,N,w,D,L;console.log("[CATALOG:getObjectDetails] start",{currentQuoteId:r.value,payload:p.value});const F=e.quoteId;if(console.log("[CATALOG:getObjectDetails] qtId",F),F)console.log("[CATALOG:getObjectDetails] Quote found!"+F),console.log("[CATALOG:getObjectDetails] Quote found",F);else{console.log("[CATALOG:getObjectDetails] No quote found!"),console.warn("[CATALOG:getObjectDetails] No quote found, aborting");return}const q={action:"makeCall",data:{...p.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getFormattedObjectDetails&objectapi=XX_ORD1__Quote__c&objectid=${F}`}};console.log("[CATALOG:getObjectDetails] request",q.data.endpoint),l.quoteDetails=!0,console.log("[CATALOG:getObjectDetails] loading.quoteDetails -> true");const Z=await tn(en,q,void 0,!0);console.log("[CATALOG:getObjectDetails] response received",{hasResponse:!!(Z!=null&&Z.response),len:String(((ne=Z==null?void 0:Z.response)==null?void 0:ne.salesforceActions)||"").length});const ee=An(Z,!0);return console.log("[CATALOG:getObjectDetails] extracted content",{hasContent:!!ee}),l.quoteDetails=!1,console.log("[CATALOG:getObjectDetails] loading.quoteDetails -> false"),ee?(a.value=JSON.parse(ee),console.log("[CATALOG:getObjectDetails] quoteRecord set",{id:(Q=a.value)==null?void 0:Q.Id,accountName:(N=a.value)==null?void 0:N.XX_ORD1__Account_Name__c,checkedOut:(w=a.value)==null?void 0:w.XX_ORD1__Checked_Out__c}),e.quoteAccount=(D=a.value)==null?void 0:D.XX_ORD1__Account_Name__c,a.value.XX_ORD1__Checked_Out__c?(console.warn("[CATALOG:getObjectDetails] Quote is already checked out, resetting quoteId"),n.value=!0,console.log("[CATALOG:getObjectDetails] end (checked out) -> false"),!1):(console.log("[CATALOG:getObjectDetails] end (success)",{id:(L=a.value)==null?void 0:L.Id}),a.value)):(console.warn("[CATALOG:getObjectDetails] no content returned, resetting quoteId",{qtId:F}),console.log("[CATALOG:getObjectDetails] end (no content) -> false"),!1)}const I=or(B,500);async function B(F=!1){var Q,N;console.log("[CATALOG:getQuoteItems] start",{noLoad:F}),l.value.qliRecords=!F;const q=e.quoteId;if(console.log("[CATALOG:getQuoteItems] qtId",q),!q){console.log("[CATALOG:getQuoteItems] No quote found!"),l.value.qliRecords=!1,console.warn("[CATALOG:getQuoteItems] No quote found, aborting");return}const Z={action:"makeCall",data:{...p.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getQuoteItems&ut=${e.activeStorefrontInfo.userType}&quoteid=${q}`}};console.log("[CATALOG:getQuoteItems] request",Z.data.endpoint);const ee=await tn(en,Z,void 0,!0);console.log("[CATALOG:getQuoteItems] response received",{hasResponse:!!(ee!=null&&ee.response),len:String(((Q=ee==null?void 0:ee.response)==null?void 0:Q.salesforceActions)||"").length});const ne=An(ee);if(console.log("[CATALOG:getQuoteItems] extracted content",{hasContent:!!ne}),l.value.qliRecords=!1,console.log("[CATALOG:getQuoteItems] loading.qliRecords -> false"),ne){const w={};o.value=JSON.parse(ne),console.log("[CATALOG:getQuoteItems] qliRecords set",{count:(N=o.value)==null?void 0:N.length}),o.value.forEach(D=>{w[D.XX_ORD1__Item__c]=D}),s.value=w,t.value=o.value.length,console.log("[CATALOG:getQuoteItems] qliRecords",o.value),console.log("[CATALOG:getQuoteItems] end (success)",{cartCount:t.value})}else console.warn("[CATALOG:getQuoteItems] end (no content)")}async function O(F){console.log("[CATALOG:getSavedFilter] ecfr",F);const q={action:"makeCall",data:{...p.value,callType:"GET",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=getSavedFilter&ut=${e.activeStorefrontInfo.userType}&ecfr=${F}`}},Z=await tn(en,q,void 0,!0),ee=An(Z);return ee?(console.log("[CATALOG:getSavedFilter] Saved Filters",ee),JSON.parse(ee)):!1}async function E(F,q){const Z={action:"makeCall",data:{...p.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=exportToCSV&ut=${e.activeStorefrontInfo.userType}`,payload:JSON.stringify(F)}},ee=await tn(en,Z,void 0,!0),ne=An(ee);ne&&q(ne)}async function k(){var ee;console.log("[CATALOG:calculateAvaTax]"),f.value=null;const F=e.quoteId;if(!F)return;(ee=a.value)!=null&&ee.Id||await A();const q=a.value;if(q.XX_ORD1__Shipping_Address__c&&q.XX_ORD1__Shipping_City__c&&q.XX_ORD1__Shipping_Country__c&&q.XX_ORD1__Shipping_State__c&&q.XX_ORD1__Shipping_Zip__c){const ne={recordId:F,isCommit:!1},Q={action:"makeCall",data:{...p.value,callType:"POST",endpoint:`/services/apexrest/XX_ORD1/ecommerce?type=calculateAvaTax&ut=${e.activeStorefrontInfo.userType}`,payload:JSON.stringify(ne)}};c.value=!0;const N=await tn(en,Q,void 0,!0),w=An(N);if(w)console.log("[CATALOG:calculateAvaTax] content",w);else{const D=JSON.parse(N.response.salesforceActions).content;f.value=D}c.value=!1}else console.log("[CATALOG:calculateAvaTax] Shipping address not found so tax can not be calculated")}function R(F,q,Z=!0){const ee=q.qtyTiers;if(!ee)return null;const ne=ee.find(Q=>Q.ev===null?F>=Q.sv:F>=Q.sv&&F<=Q.ev);return ne?Z?ne.formattedOfferPrice:ne.originalPrice:null}return{quoteCheckedOut:n,avaTaxError:f,avaTaxLoading:c,cartCount:t,cartUpdated:g,quoteId:r,loading:l,filter:v,quoteRecord:a,secondQuoteId:i,qliRecords:o,savedItems:s,savedFilter:u,exportToCSV:E,getObjectDetails:A,getSavedFilter:O,saveToCart:y,deleteLineItems:d,getPicklistFilterData:S,getQuoteItems:B,updateCart:m,getFilterData:C,getProductItems:_,calculateAvaTax:k,getEcatalogDetails:x,getVolumePrice:R}});function qf(e,n,t){const{itemId:r,catalogItemId:i,offer:o,isAddToCartFromIB:a}=n,{offerId:s,offerType:u,offerDiscount:f,appliedOnField:c,rpId:v}=o||{};return{qty:e.value,itemID:r,eCatalogItemID:i,offerId:s,offerType:u,offerDiscount:f,appliedOnField:c,rpId:v,isAddToCartFromIB:a,qtyTierAmt:o?t.getVolumePrice(e.value,o,!1):null}}const gg={KNOWLEDGE_DETAIL:"knowledgeDetail"},$f={"Catalog Price":"XX_ORD1__Negotiated_Price__c","List Price":"XX_ORD1__List_Price2__c"},mg={name:"SkeletonLoader"},yg={class:"skeleton-loader"};function xg(e,n,t,r,i,o){return U(),Y("div",yg)}const vn=Le(mg,[["render",xg],["__scopeId","data-v-d79c3985"]]),pr=Le({__name:"AtomCustomTag",props:{tag:{type:String,default:null},text:{type:[String,Number,Boolean],default:"-"},type:{type:String,default:null},method:{type:String,default:null},style:{type:Object,default:()=>({})},secStyle:{type:Object,default:()=>({})},cssStyle:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},inherit:{type:[Array,String],default:()=>[]}},setup(e){const n=e,t={h1:"ecb-header-lvl-1",h2:"ecb-header-lvl-2",h3:"ecb-header-lvl-3",h4:"ecb-header-lvl-4",h5:"ecb-header-lvl-5",h6:"ecb-header-lvl-6",p:"ecb-text-regular",span:"ecb-text-small",strong:"ecb-text-strong",large:"ecb-text-large"},r=te(!1),i=me(()=>{if(n.text===null||n.text===void 0)return"";const u=String(n.text);return(u==null?void 0:u.replace(/\r\n|\n/g,"<br>"))||""}),o=me(()=>{var f,c;const u=n.tag||((f=n.style)==null?void 0:f.tag)||((c=n.secStyle)==null?void 0:c.tag)||"p";return u==="large"||u==="strong"?"div":u}),a=me(()=>{var f;const u=n.tag||((f=n.style)==null?void 0:f.tag)||"p";return t[u]||"ecb-text-regular"}),s=me(()=>{var f,c;const u={};if(n.style&&((f=n.style)!=null&&f.overrite)){const{bold:v,color:l,italic:h,underline:p,strikethrough:g,strikeThrough:d,size:m,family:y,lineHeight:_}=n.style;v&&(u.fontWeight="700"),l&&(u.color=l),h&&(u.fontStyle="italic"),y&&(u.fontFamily=y),_&&(u.lineHeight=_),p?u.textDecoration="underline":(g||d)&&(u.textDecoration="line-through"),m&&(u.fontSize=m)}if(n.secStyle&&((c=n.secStyle)!=null&&c.overrite)){const{bold:v,color:l,italic:h,underline:p,strikethrough:g,strikeThrough:d,size:m,family:y,lineHeight:_}=n.secStyle;v&&(u.fontWeight="700"),l&&(u.color=l),h&&(u.fontStyle="italic"),y&&(u.fontFamily=y),_&&(u.lineHeight=_),p?u.textDecoration="underline":(g||d)&&(u.textDecoration="line-through"),m&&(u.fontSize=m)}for(const v of n.inherit)u[v]="inherit";return u});return(u,f)=>e.loading?(U(),Y("div",{key:0,style:ze(e.cssStyle),class:"custom-tag-skeletion"},[he(vn)],4)):(U(),ke(Wi(o.value),ao({key:1},u.$attrs,{type:e.method,disabled:e.disabled,style:s.value,class:a.value,onMouseover:f[0]||(f[0]=c=>r.value=!0),onMouseout:f[1]||(f[1]=c=>r.value=!1),innerHTML:i.value}),null,16,["type","disabled","style","class","innerHTML"]))}},[["__scopeId","data-v-075625ac"]]),_g={key:1,class:"field-label"},bg={class:"ect-flex ect-flex-col ect-justify-start"},Cg={key:0,class:"ect-pr-5"},wg={key:1,class:"field-value ect-pr-5"},Eg={key:1,class:"field-value"},jf=Le({__name:"AtomFieldAttribute",props:{tag:{type:String,default:"span"},field:{type:String,default:""},value:{type:Object,default:()=>({})},label:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1},offer:{type:Object,default:()=>({})},itemCount:{type:Number,default:1},appliedOnOfferMatchingField:{type:Boolean,default:!1},showOfferDescription:{type:Boolean,default:!1},isProductSummary:{type:Boolean,default:!1},index:{type:Number,default:0},parentWidth:{type:Number,default:0}},setup(e){const n=bi(),t=e,r=me(()=>!1),i=me(()=>{var l;return t.offer.offerValue.offerId&&t.offer.offerValue.formattedOfferPrice||t.offer.offerValue.rpId&&((l=t.offer.offerValue.qtyTiers)==null?void 0:l.length)>0?!!t.appliedOnOfferMatchingField:!1}),o=me(()=>t.offer.offerDetails.styles.offerValue.textStyles.tag),a=me(()=>t.offer.offerDetails.styles.offerDescription.textStyles),s=me(()=>{var v,l;return(v=t.offer.offerValue)!=null&&v.qtyTiers?n.getVolumePrice(t.itemCount>0?t.itemCount:1,t.offer.offerValue):(l=t.offer.offerValue)==null?void 0:l.formattedOfferPrice}),u=me(()=>({"ect-flex ect-line-through":r.value&&t.offer.offerValue&&i.value})),f=me(()=>t.value&&(t.value.isStatic||!t.loading)),c=me(()=>(r.value&&!t.isProductSummary||t.isProductSummary&&t.index===0)&&t.showOfferDescription&&t.appliedOnOfferMatchingField);return(v,l)=>{var h,p;return U(),Y("div",{class:we([e.field,"field ect-gap-1 ect-flex ect-flex-col"])},[e.label?(U(),ke(pr,{key:0,tag:(h=e.label.style)==null?void 0:h.tag,text:e.label.value,style:ze(e.label.style),class:we(`${e.field}_label`)},null,8,["tag","text","style","class"])):(U(),Y("div",_g,[he(vn)])),b("div",bg,[r.value&&t.offer.offerValue&&i.value?(U(),Y("div",Cg,[he(pr,{tag:o.value,text:s.value,style:ze(e.offer.offerDetails.styles.offerValue.textStyles),class:we(`${e.field}_value`)},null,8,["tag","text","style","class"])])):r.value&&!t.offer.offerValue?(U(),Y("div",wg,[he(vn)])):ge("",!0),b("div",{class:we(u.value)},[f.value?(U(),ke(pr,{key:0,tag:(p=e.value.style)==null?void 0:p.tag,text:e.value.value,style:ze(e.value.style),class:we(`${e.field}_value`)},null,8,["tag","text","style","class"])):(U(),Y("div",Eg,[he(vn)]))],2)]),c.value?(U(),Y("div",{key:2,class:"field-description ect-left-0 ect-w-max ect-pt-2",style:ze({maxWidth:e.parentWidth?e.parentWidth+"px":void 0})},[he(pr,{tag:a.value.tag,text:t.offer.offerValue.offerDescShort,style:ze(a.value),class:we(e.field+"_value")},null,8,["tag","text","style","class"])],4)):ge("",!0)],2)}}},[["__scopeId","data-v-7a78d3c9"]]),Ag={key:1,class:"filter"},kg={class:"filter-title"},Og={key:0,class:"filter-desc"},Sg={key:1,class:"filter-desc"},Ig={key:2,class:"filter-desc"},Hf=Le({__name:"AtomProductText",props:{title:{type:Object,default:()=>({})},description:{type:Object,default:null},loading:{type:Boolean,default:!1},url:{type:String,default:null}},setup(e){const n=fi(),t=e;function r(){t.url&&!t.loading&&n.push(t.url)}return(i,o)=>e.loading?(U(),Y("div",Ag,[b("div",kg,[he(vn)]),e.description?(U(),Y("div",Og,[he(vn)])):ge("",!0),e.description?(U(),Y("div",Sg,[he(vn)])):ge("",!0),e.description?(U(),Y("div",Ig,[he(vn)])):ge("",!0)])):(U(),Y(be,{key:0},[e.title?(U(),ke(pr,{key:0,class:we({"ect-cursor-pointer":e.url}),text:e.title.value,style:ze(e.title.style),onClick:r},null,8,["class","text","style"])):ge("",!0),e.description?(U(),ke(pr,{key:1,text:e.description.value,style:ze(e.description.style)},null,8,["text","style"])):ge("",!0)],64))}},[["__scopeId","data-v-f0d3c54f"]]),Tg={name:"Spinner"},Bg={class:"spinner"};function Dg(e,n,t,r,i,o){return U(),Y("div",Bg)}const Ci=Le(Tg,[["render",Dg],["__scopeId","data-v-83f8c910"]]),Rg={name:"AtomSkeletonWidget",components:{AtomSkeletonLoader:vn,AtomSpinner:Ci},props:{rows:{type:Number,default:4},type:{type:String,default:"full"},className:{type:String,default:""}},data(){return{SKELETON_TYPE:gg}}},ol=e=>(Xt("data-v-617229a3"),e=e(),Wt(),e),Lg={key:0,class:"page"},Fg=ol(()=>b("div",{class:"page-header"},null,-1)),Ng={class:"page-body"},Pg={class:"page-body_board"},Mg={key:1,class:"field"},qg={key:2,class:"filter"},$g={class:"filter-option_inner"},jg={key:3,class:"full"},Hg={key:4,class:"shuttle"},Vg={class:"shuttle-full"},Ug={class:"shuttle-full"},zg={class:"shuttle-half"},Kg={class:"shuttle-half"},Xg={class:"shuttle-button"},Wg={key:5,class:"shuttle2"},Gg={class:"shuttle2-full"},Qg=ol(()=>b("span",null,"Processing payment",-1)),Zg={key:6,class:"shuttle2"},Jg={class:"shuttle2-full"},Yg=ol(()=>b("span",null,"Processing order",-1)),em={key:10,class:"skeleton-shipping"},tm={class:"skeleton-shipping-full"},nm={class:"skeleton-shipping-half"},rm={key:11,class:"skeleton-terms"},im={class:"skeleton-terms-half"},om={class:"skeleton-terms-full"},am={class:"skeleton-terms-full"},sm={key:12,class:""},lm={class:"skeleton-terms-half"},cm={key:13,class:""},um={class:"skeleton-terms-half"},fm={key:14,class:"product"},dm={class:"product-image"},hm={class:"product-texts"},pm={class:"product-description"},vm={class:"product-action"},gm={class:"product-button"},mm={key:15,class:""};function ym(e,n,t,r,i,o){const a=er("AtomSkeletonLoader"),s=er("AtomSpinner");return t.type==="page"?(U(),Y("div",Lg,[Fg,b("div",Ng,[b("div",Pg,[he(a)])])])):t.type==="fieldattribute"?(U(),Y("div",Mg,[he(a)])):t.type==="filteroptions"?(U(),Y("div",qg,[(U(!0),Y(be,null,Me(t.rows,u=>(U(),Y("div",{key:u,class:"filter-option"},[b("div",$g,[he(a)])]))),128))])):t.type==="full"?(U(),Y("div",jg,[he(a)])):t.type==="shuttle"?(U(),Y("div",Hg,[b("div",Vg,[he(a)]),b("div",Ug,[he(a)]),b("div",zg,[he(a)]),b("div",Kg,[he(a)]),b("div",Xg,[he(a)])])):t.type==="shuttle-done"?(U(),Y("div",Wg,[b("div",Gg,[he(s,{class:"shuttle2-spinner"}),Ne(),Qg])])):t.type==="order-processing"?(U(),Y("div",Zg,[b("div",Jg,[he(s,{class:"shuttle2-spinner"}),Ne(),Yg])])):t.type==="enhanceFilter"?(U(),Y("div",{key:7,class:we(t.className)},[he(a)],2)):t.type==="offers"?(U(),Y("div",{key:8,class:we(t.className)},[he(a)],2)):t.type==="detailPage"?(U(),Y("div",{key:9,class:we(t.className)},[he(a)],2)):t.type==="shippingAddress"?(U(),Y("div",em,[b("div",tm,[he(a)]),b("div",nm,[he(a)])])):t.type==="termsAndPayment"?(U(),Y("div",rm,[b("div",im,[he(a)]),b("div",om,[he(a)]),b("div",am,[he(a)])])):t.type==="accordian-title"?(U(),Y("div",sm,[b("div",lm,[he(a)])])):t.type==="imageDiv"?(U(),Y("div",cm,[b("div",um,[he(a)])])):t.type==="product-detail"?(U(),Y("div",fm,[b("div",dm,[he(a)]),b("div",hm,[he(a)]),b("div",pm,[he(a)]),b("div",vm,[(U(!0),Y(be,null,Me(t.rows,u=>(U(),Y("div",{key:u,class:"product-action_item"},[he(a)]))),128))]),b("div",gm,[he(a)])])):t.type===i.SKELETON_TYPE.KNOWLEDGE_DETAIL?(U(),Y("div",mm,[he(a,{class:we(t.className)},null,8,["class"])])):ge("",!0)}const xm=Le(Rg,[["render",ym],["__scopeId","data-v-617229a3"]]),_m=["src"],bm={__name:"AtomImage",props:{src:{type:String,default:""},resourcesDomain:{type:String,default:""},placeholder:{type:String,default:""},height:{type:Number,default:200},width:{type:Number,default:200},loading:{type:Boolean,default:!1},sizes:{type:String}},setup(e){const n=e,t=me(()=>n.src.includes("/resource/")&&!n.src.includes("://")&&n.resourcesDomain?n.resourcesDomain+n.src:n.src.includes("/servlet/servlet.ImageServer")&&!n.src.includes("://")&&n.resourcesDomain?n.resourcesDomain+"/"+n.src:n.src);return(r,i)=>e.loading?(U(),ke(xm,{key:0,type:"full"})):e.src?(U(),Y("img",{key:1,src:t.value,placeholder:[30,20],class:"rounded",sizes:"props.sizes"},null,8,_m)):ge("",!0)}},Cm=e=>(Xt("data-v-eca105b8"),e=e(),Wt(),e),wm={class:"counter"},Em=["disabled"],Am={class:"material-icons-outlined counter-icon"},km={key:0,class:"counter-spinner"},Om=["max","disabled","value"],Sm=["disabled"],Im=[Cm(()=>b("span",{class:"material-icons-outlined counter-icon"}," add ",-1))],Vf=Le({__name:"AtomButtonCounter",props:{min:{type:Number,default:0},max:{type:Number,default:999},modelValue:{type:Number,default:1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},decimal:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.disabled||t.loading),o=or(function(f){f.target.value?r("update:modelValue",Number(f.target.value)):r("update:modelValue",0)}),a=f=>{(f.key==="."||f.key==="e"||f.key==="E")&&!f.ctrlKey&&!f.metaKey&&t.decimal&&f.preventDefault()};function s(){t.modelValue<t.max&&r("update:modelValue",t.modelValue+1)}function u(){t.modelValue>t.min&&r("update:modelValue",t.modelValue-1)}return(f,c)=>(U(),Y("div",wm,[b("button",{disabled:e.modelValue<=e.min||i.value,onClick:u},[b("span",Am,xe(e.modelValue>1?"remove":"close"),1)],8,Em),e.loading?(U(),Y("div",km,[he(Ci,{class:"item-button_spinner"})])):(U(),Y("input",{key:1,type:"number",min:"0",max:e.max,disabled:i.value,value:e.modelValue,step:"1",onInput:c[0]||(c[0]=(...v)=>Fe(o)&&Fe(o)(...v)),onKeydown:a},null,40,Om)),b("button",{disabled:e.modelValue>=e.max||i.value,onClick:s},Im,8,Sm)]))}},[["__scopeId","data-v-eca105b8"]]),Uf=te(!1),zf=te(!1),Kf=te(!1),Xf=te(!1),Tm=()=>{if(typeof window<"u"){const e=()=>{const n=window.innerWidth;zf.value=n<768,Kf.value=n>=768&&n<1024,Xf.value=n>=1024};Nt(()=>{Uf.value||(Uf.value=!0,window.addEventListener("resize",e),e())})}return{isMobile:zf,isTablet:Kf,isDesktop:Xf}},Bm=["disabled"],Dm=["disabled"],Rm={class:"ect-w-max"},Lm={class:"button-header-icon"},Fm=["onClick"],Nm={key:0,class:"button-options_item-icon"},Pm=["disabled"],Mm={class:"ect-w-max"},qm={class:"button-header-icon"},$m=["onClick"],jm={key:0,class:"button-options_item-icon"},Wf=Le({__name:"AtomButtonMenu",props:{icon:{type:String,default:null},select:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:{type:String,default:null},options:{type:Array,default:()=>[]}},emits:["selected"],setup(e,{emit:n}){const t=e,r=Tm(),i=te(!1),o=te(null),a=te({}),s=te(!1),u=n;function f(g){g.stopPropagation(),i.value=!i.value}function c(g){g.stopPropagation(),i.value=!i.value,s.value=te(i.value)}function v(g){u("selected",g),i.value=!1}function l(){!r.isMobile.value&&!t.disabled&&(i.value=!0)}function h(){!r.isMobile.value&&!s.value&&(i.value=!1)}function p(g){i.value&&(i.value=!1,s.value=!1)}return Nt(()=>{document.addEventListener("click",p)}),Ji(()=>{document.removeEventListener("click",p)}),(g,d)=>{var m;return e.options.length===1?(U(),Y("button",{key:0,class:"esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",disabled:e.disabled,onClick:d[0]||(d[0]=y=>g.$emit("selected",e.options[0]))},[b("span",null,xe(((m=e.options[0].label)==null?void 0:m.value)||e.options[0].name),1)],8,Bm)):e.options.length>1?(U(),Y(be,{key:1},[Fe(r).isMobile.value?(U(),Y(be,{key:0},[b("button",{class:"button-menu esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",disabled:e.disabled,onClick:mt(f,["stop"])},[b("span",Rm,xe(e.name||e.options[0].name),1),b("div",Lm,[he(We,{icon:"arrow_drop_down",class:"ect-relative ect-top-0.5 ect-ml-2",color:"#ffffff",size:"14"})])],8,Dm),!e.disabled&&e.options.length&&i.value?(U(),Y("div",{key:0,class:"button-options",onClick:d[2]||(d[2]=mt(()=>{},["stop"]))},[b("div",{class:"button-options_grow",onClick:d[1]||(d[1]=y=>i.value=!1)}),(U(!0),Y(be,null,Me(e.options,y=>(U(),Y("div",{key:y,class:"button-options_item",onClick:_=>v(y)},[y.selected&&e.select?(U(),Y("div",Nm,[he(We,{icon:"done",size:20,color:"black"})])):ge("",!0),Ne(" "+xe(y.name),1)],8,Fm))),128))])):ge("",!0)],64)):(U(),Y("div",{key:1,class:"button-container",onMouseenter:l,onMouseleave:h},[b("button",{class:"button-menu esg-btn-primary ect-bg-primary ect-uppercase ect-whitespace-nowrap",ref_key:"btnmenu",ref:o,disabled:e.disabled,onClick:mt(c,["stop"])},[b("span",Mm,xe(e.name||e.options[0].name),1),b("div",qm,[he(We,{class:"ect-relative ect-top-0.5 ect-ml-2",icon:"arrow_drop_down",color:"#ffffff",size:"14"})])],8,Pm),!e.disabled&&e.options.length&&i.value?(U(),Y("div",{key:0,style:ze(a.value),class:"button-options",onClick:d[3]||(d[3]=mt(()=>{},["stop"]))},[(U(!0),Y(be,null,Me(e.options,y=>{var _;return U(),Y("div",{key:y,class:"button-options_item",onClick:x=>g.$emit("selected",y)},[y.selected&&e.select?(U(),Y("div",jm,[he(We,{icon:"done",size:20,color:"black"})])):ge("",!0),Ne(" "+xe(((_=y.label)==null?void 0:_.value)||y.name),1)],8,$m)}),128))],4)):ge("",!0)],32))],64)):ge("",!0)}}},[["__scopeId","data-v-cfcf21a3"]]),Hm={class:"ect-flex ect-flex-col ect-w-full"},Vm={key:0,class:"ect-h-[20px] ect-w-[150px]"},Um={key:1,class:"ect-flex ect-flex-col ect-gap-1"},zm=Le({__name:"MoleculeProductItem",props:{title:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]},description:{type:Object,default:()=>({})},thumbnail:{type:Object,default:()=>({})},attributes:{type:Array,default:()=>[]},itemId:{type:String,default:null},mode:{type:String,default:"vertical"},catalogItemId:{type:String,default:null},loading:{type:Boolean,default:!1},templateId:{type:String,default:null},url:{type:String,default:null},applyOffer:{type:Boolean,default:!1},offerSetting:{type:Object,default:null}},setup(e){var m,y;const n=hr(),t=bi(),r=e,i=te(((y=(m=t.savedItems)==null?void 0:m[r.itemId])==null?void 0:y.XX_ORD1__QTY__c)||0),o=te(!1),a=te(null),s=te(!1),u=te(!1),f=me(()=>r.actions&&r.actions.length>0),c=me(()=>r.actions.some(_=>_.action==="ADD_TO_CART")),v=me(()=>{var _,x,C;return(_=r.offer)!=null&&_.appliedOnField?$f[(x=r.offer)==null?void 0:x.appliedOnField]===((C=r.offerSetting.value)==null?void 0:C.field):!0});Ye(()=>t.savedItems,_=>{var x,C;_[r.itemId]&&!u.value&&((x=_[r.itemId])==null?void 0:x.XX_ORD1__QTY__c)!==i.value&&(i.value=((C=_[r.itemId])==null?void 0:C.XX_ORD1__QTY__c)||0,u.value=!0)},{deep:!0});function l(_){var x;u.value=!0,_===0&&((x=t.savedItems)!=null&&x[r.itemId])?p():d()}const h=_=>{var x;_.action==="ADD_TO_CART"?(u.value=!0,i.value=1,g()):_.action==="CONFIGURE"||(_.action==="CUSTOM"?window.open(((x=_.url)==null?void 0:x.value)||_.value,_.newTab?"_blank":"_self"):_.action==="ORDER_PARTS"||_.action)},p=async function(){o.value=!0,a.value=null;const _=[t.savedItems[r.itemId].Id];await t.deleteLineItems(_),o.value=!1},g=async function(){if(o.value=!0,t.loading.quoteCreate)setTimeout(()=>{g()},1e3);else{a.value=null;const x=[qf(i,r,t)];await t.saveToCart(x),o.value=!1}},d=or(async function(){s.value=!0;const _={qty:i.value,itemID:r.itemId};await t.updateCart(_),s.value=!1});return(_,x)=>{var C,S;return U(),Y("div",{class:we("item ecb-theme-card "+e.mode)},[b("div",{class:we(`item-image ${e.mode}-image`)},[he(bm,{src:e.thumbnail.value,loading:e.loading,"resources-domain":Fe(n).storefrontDetails.resourcesDomain},null,8,["src","loading","resources-domain"])],2),b("div",{class:we(`item-text ${e.mode}-text`)},[he(Hf,{title:e.title,loading:e.loading,description:e.description},null,8,["title","loading","description"])],2),b("div",Hm,[b("div",{class:we(`item-attributes ${e.mode}-attributes`)},[(U(!0),Y(be,null,Me(r.attributes,(A,I)=>(U(),ke(jf,{key:I,class:we(`item-attributes_field ${e.mode}-attributes_field`),loading:e.loading,value:A.value,label:A.label,field:A.value.field,offer:{applyOffer:A.applyOffer,offerDetails:A.offerDetails,offerValue:r.offer},"item-count":i.value,"applied-on-offer-matching-field":v.value},null,8,["class","loading","value","label","field","offer","item-count","applied-on-offer-matching-field"]))),128))],2),r.offerSetting&&v.value&&((C=r.offer)!=null&&C.offerDescShort)?(U(),Y("div",{key:0,class:we(`${e.mode}-offer-banner`)},[he(pr,{tag:e.offerSetting.offerDetails.styles.offerDescription.textStyles.tag,text:(S=r.offer)==null?void 0:S.offerDescShort,style:ze(e.offerSetting.offerDetails.styles.offerDescription.textStyles),class:we(_.field+"_value")},null,8,["tag","text","style","class"])],2)):ge("",!0)]),f.value?(U(),Y("div",{key:0,class:we([`item-button ${e.mode}-button`,"ect-flex ect-flex-col ect-gap-2"])},[e.loading||e.applyOffer&&!r.offer?(U(),Y("div",Vm,[he(vn)])):(U(),Y(be,{key:1},[o.value?(U(),ke(Ci,{key:0,class:"item-button_spinner"})):(U(),Y("div",Um,[i.value>0&&!e.loading&&c.value?(U(),ke(Vf,{key:0,modelValue:i.value,"onUpdate:modelValue":[x[0]||(x[0]=A=>i.value=A),l],loading:s.value},null,8,["modelValue","loading"])):(U(),ke(Wf,{key:1,icon:"arrow_drop_down",disabled:e.loading,options:e.actions,onSelected:x[1]||(x[1]=A=>h(A))},null,8,["disabled","options"]))]))],64))],2)):ge("",!0)],2)}}},[["__scopeId","data-v-f6e7697b"]]),Km={class:"item"},Xm={class:"item-text"},Wm={class:"item-attributes"},Gm={key:0,class:"item-button"},Qm={key:1,class:"ect-flex ect-flex-col ect-gap-1"},Zm=Le({__name:"MoleculeProductItemTable",props:{title:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]},description:{type:Object,default:()=>({})},thumbnail:{type:Object,default:()=>({})},attributes:{type:Array,default:()=>[]},itemId:{type:String,default:null},mode:{type:String,default:"vertical"},catalogItemId:{type:String,default:null},loading:{type:Boolean,default:!1},templateId:{type:String,default:null},url:{type:String,default:null},applyOffer:{type:Boolean,default:!1},offerSetting:{type:Object,default:null},offer:{type:Object,default:null}},setup(e){var g,d;const n=bi(),t=e,r=te(((d=(g=n.savedItems)==null?void 0:g[t.itemId])==null?void 0:d.XX_ORD1__QTY__c)||0),i=te(!1),o=te(!1),a=te(!1),s=me(()=>t.actions&&t.actions.length>0),u=me(()=>t.actions.some(m=>m.action==="ADD_TO_CART")),f=me(()=>{var m,y,_;return(m=t.offer)!=null&&m.appliedOnField?$f[(y=t.offer)==null?void 0:y.appliedOnField]===((_=t.offerSetting.value)==null?void 0:_.field):!0});Ye(()=>n.savedItems,m=>{var y,_;m[t.itemId]&&!o.value&&((y=m[t.itemId])==null?void 0:y.XX_ORD1__QTY__c)!==r.value&&(r.value=((_=m[t.itemId])==null?void 0:_.XX_ORD1__QTY__c)||0,o.value=!0)},{deep:!0});function c(m){var y;o.value=!0,m===0&&((y=n.savedItems)!=null&&y[t.itemId])?l():p()}const v=m=>{var y;m.action==="ADD_TO_CART"?(o.value=!0,r.value=1,h()):m.action==="CONFIGURE"||(m.action==="CUSTOM"?window.open(((y=m.url)==null?void 0:y.value)||m.value,m.newTab?"_blank":"_self"):m.action==="ORDER_PARTS"||m.action)},l=async function(){i.value=!0;const m=[n.savedItems[t.itemId].Id];await n.deleteLineItems(m),delete n.savedItems[t.itemId],i.value=!1},h=async function(){if(i.value=!0,n.loading.quoteCreate)setTimeout(()=>{h()},1e3);else{const y=[qf(r,t,n)];await n.saveToCart(y),n.savedItems[t.itemId]=r.value,i.value=!1}},p=or(async function(){a.value=!0;const m={qty:r.value,itemID:t.itemId};await n.updateCart(m),n.savedItems[t.itemId]=r.value,a.value=!1},800);return(m,y)=>(U(),Y("div",Km,[b("div",Xm,[he(Hf,{url:e.url,title:e.title,loading:e.loading},null,8,["url","title","loading"])]),b("div",Wm,[(U(!0),Y(be,null,Me(t.attributes,_=>{var x;return U(),ke(jf,{key:_.field,class:we(`item-attributes_field ${e.mode}-attributes_field`),loading:e.loading,value:_.value,label:_.label,offer:{applyOffer:_.applyOffer,offerDetails:_.offerDetails,offerValue:t.offer},"item-count":r.value,"applied-on-offer-matching-field":f.value,"show-offer-description":!!((x=t.offer)!=null&&x.offerDescShort)},null,8,["class","loading","value","label","offer","item-count","applied-on-offer-matching-field","show-offer-description"])}),128))]),s.value?(U(),Y("div",Gm,[i.value?(U(),ke(Ci,{key:0,class:"item-button_spinner"})):(U(),Y("div",Qm,[r.value>0&&!e.loading&&u.value?(U(),ke(Vf,{key:0,modelValue:r.value,"onUpdate:modelValue":[y[0]||(y[0]=_=>r.value=_),c],loading:a.value},null,8,["modelValue","loading"])):(U(),ke(Wf,{key:1,icon:"arrow_drop_down",disabled:e.loading,options:e.actions,onSelected:y[1]||(y[1]=_=>v(_))},null,8,["disabled","options"]))]))])):ge("",!0)]))}},[["__scopeId","data-v-22a3ac6d"]]),Jm=["placeholder"],Ym={key:0,class:"srch-error"},ey={class:"srch-option_lst-main"},ty={class:"italic"},ny={class:"srch-option_lst-sugg"},ry={class:"italic"},iy={class:"srch-option_lst-main"},oy={class:"italic"},ay={class:"srch-option_lst-sugg"},sy={class:"italic"},ly={class:"srch-option_lst-main"},cy={class:"italic"},uy={class:"srch-option_lst-sugg"},fy={class:"italic"},dy={key:1,class:"search1"},hy={class:"search-container_header"},py={class:"search-container_header_input ectheme-input-box"},vy=["placeholder","value"],gy=Le({__name:"BlinkMoleculeSearch",props:{placeholder:{type:String,default:""},modelValue:{type:String,default:""},suggestion:{type:Boolean,default:!1},showSearchIconAlways:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},enableSearchClick:{type:Boolean,default:!1}},emits:["update:modelValue","enter"],setup(e,{emit:n}){const t=n;let r;const i=te(""),o=te(!1),a=te(!1),s=te(null),u=()=>{s.value=null,i.value="",t("update:modelValue",""),t("enter")},f=g=>{i.value.length>1?(g.target.blur(),v(i.value+"*")):s.value="Search text must be more than one character.",o.value=!1},c=()=>{a.value||(s.value=null,i.value.length>1?v(i.value+"*"):i.value.length===1&&(s.value="Search text must be more than one character."),o.value=!1)},v=g=>{t("update:modelValue",g),o.value=!1,a.value=!1},l=g=>{const d=g.target.value;s.value=null,d.length||t("update:modelValue","")},h=()=>{t("enter")},p=g=>{var m;r&&(clearTimeout(r),r=null);const d=((m=g==null?void 0:g.target)==null?void 0:m.value)??"";r=setTimeout(()=>{t("update:modelValue",d)},500)};return(g,d)=>e.suggestion?(U(),Y("div",{key:0,class:"srch",tabindex:"0",onFocusin:d[6]||(d[6]=m=>o.value=!0),onFocusout:c,onKeydown:ir(f,["enter"])},[b("div",{class:we(["srch-inp",{"srch-error-border":s.value}])},[ln(b("input",{"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),type:"search",placeholder:e.placeholder,onInput:l},null,40,Jm),[[li,i.value]]),he(We,{icon:i.value?"close":"search",size:14,color:s.value?"red":"#acacac",onClick:u},null,8,["icon","color"])],2),s.value?(U(),Y("div",Ym,[b("span",null,xe(s.value),1)])):ge("",!0),i.value.length>1&&o.value?(U(),Y("div",{key:1,class:"srch-option",onMouseover:d[4]||(d[4]=m=>a.value=!0),onMouseout:d[5]||(d[5]=m=>a.value=!1)},[b("div",{class:"srch-option_lst",onClick:d[1]||(d[1]=m=>v(i.value+"*"))},[b("div",ey,[Ne(" Search for "),b("span",ty,xe(i.value)+"*",1)]),b("div",ny,[Ne(" word that starts with "),b("span",ry,xe(i.value)+"*",1)])]),b("div",{class:"srch-option_lst",onClick:d[2]||(d[2]=m=>v(i.value))},[b("div",iy,[Ne(" Search for "),b("span",oy,'"'+xe(i.value)+'"',1)]),b("div",ay,[Ne(" search exactly for "),b("span",sy,'"'+xe(i.value)+'"',1)])]),b("div",{class:"srch-option_lst",onClick:d[3]||(d[3]=m=>v("*"+i.value+"*"))},[b("div",ly,[Ne(" Search for "),b("span",cy,"*"+xe(i.value)+"*",1)]),b("div",uy,[Ne(" word that includes "),b("span",fy,"*"+xe(i.value)+"*",1)])])],32)):ge("",!0)],32)):(U(),Y("div",dy,[b("div",hy,[b("div",py,[b("input",{class:"",type:"search",placeholder:e.placeholder,value:e.modelValue,onInput:p,onKeyup:ir(h,["enter"])},null,40,vy),e.loading?(U(),ke(Ci,{key:0})):ge("",!0),e.modelValue?(U(),ke(We,{key:1,icon:"close",size:12,color:"#acacac",onClick:u})):ge("",!0),e.enableSearchClick||!e.modelValue?(U(),ke(We,{key:2,class:"ect-relative ect-top-[-1px]",icon:"search",size:14,color:"#acacac",onClick:h})):ge("",!0)])])]))}},[["__scopeId","data-v-31366d17"]]),Gf=e=>(Xt("data-v-f5574cfa"),e=e(),Wt(),e),my=["id"],yy={key:0,class:"product-search"},xy={key:1,class:"product-not-found"},_y=Gf(()=>b("span",{class:"product-not-found_icon material-symbols-outlined"}," error ",-1)),by=Gf(()=>b("span",{class:"product-not-found_text"},"No results found",-1)),Cy={key:2,class:"product-item"},wy=20,Ey=Le({__name:"MoleculeProductBlock",props:{configuration:{type:Object,required:!0,default:()=>({})},request:{type:Object,required:!0,default:()=>({})},fields:{type:Object,required:!0,default:()=>({})},catalogType:{type:String,required:!0},blockId:{type:String,default:""},accountId:{type:String,default:null},searchText:{type:String,default:""},onCountUpdate:{type:Function,default:null},hideHeader:{type:Boolean,default:!1},initialItems:{type:Array,default:()=>[]}},setup(e,{expose:n}){const t=["vertical","horizontal","square","table"],r=e,i=te(Math.floor(Math.random()*1e9)),o=te(null),a=bi(),s=te(1),u=te(!0),f=te(!0);te(!1);const c=te([]),v=te(0),l=te(r.request);let h=200;const p=te(r.searchText||""),g=me(()=>r.initialItems||[]),d=me(()=>!!(p.value||r.searchText));function m(Q,N,w){const D=w==="Item",L=[];return Q.forEach($=>{var j,W;const G=JSON.parse(JSON.stringify(N));try{D?G.itemId=$.Id:(G.itemId=$.XX_ORD1__Item__c,G.catalogItemId=$.Id);const{description:M,thumbnail:H,title:V,attributes:K,actions:J}=G;H!=null&&H.field&&!H.isStatic&&(H.value=rt($,H.field)),V!=null&&V.field&&!V.isStatic&&(V.value=rt($,V.field)),M!=null&&M.field&&!M.isStatic&&(M.value=rt($,M.field)),(K||[]).forEach(X=>{var se,fe;(se=X==null?void 0:X.value)!=null&&se.field&&!X.value.isStatic&&(X.value.value=rt($,X.value.field,X.value.dataType)||"-"),(fe=X==null?void 0:X.label)!=null&&fe.field&&!X.label.isStatic&&(X.label.value=rt($,X.label.field,X.label.dataType)||"-")}),(J||[]).forEach(X=>{X.action==="CUSTOM"&&(X.url&&!X.url.isStatic&&(X.url.value=rt($,X.url.field)),X.label&&!X.label.isStatic&&(X.label.value=rt($,X.label.field)))});const P=D?rt($,"XX_ORD1__Friendly_URL__c"):rt($,"XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c");((j=G.friendlyURLFields)==null?void 0:j.length)>0&&P?((W=G.friendlyURLFields)==null||W.forEach(X=>{G.friendlyURL=(G.friendlyURL||"").replace(`{!${X}}`,rt($,X))}),G.friendlyURL="/"+(G.friendlyURL||"")+"/"+P):G.url&&(G.friendlyURL=G.url+"/"+(($==null?void 0:$.Id)||"")),G.friendlyURL&&(G.friendlyURL=G.friendlyURL.replace(/\/{2,}/g,"/"))}catch{}L.push(G)}),L}const y=te(null),_=te(null),x=me(()=>{}),C=me(()=>{var Q;return(Q=r.fields)==null?void 0:Q.header});me(()=>{var Q;return((Q=C.value)==null?void 0:Q.mainHeading)||{}}),me(()=>{var Q;return((Q=C.value)==null?void 0:Q.subHeading)||{}});const S=me(()=>{var Q;return c.value.length>0?c.value:Array(A.value).fill((Q=r.fields)==null?void 0:Q.productCard)}),A=me(()=>Number(r.configuration.displaySettings.itemsPerPage||wy)),I=me(()=>Number(r.configuration.displaySettings.lazyLoadBatch)),B=me(()=>{var Q;return((Q=r.configuration.productItemOrientation)==null?void 0:Q.toLowerCase())||"vertical"}),O=te(t.includes(B.value)?y.value||B.value:"vertical"),E=me(()=>c.value.length<1&&!f.value),k=me(()=>`product-${O.value} width-${_.value?_.value:r.configuration.displaySettings.columns||1}`),R=me(()=>r.configuration.displaySettings.enableSearch),F=te(null),q=te(!1),Z=te({});Ye(s,(Q,N)=>{Q!==N&&(console.log("[fetchProducts] 1"),ee(!0))}),Ye(F,Q=>{Q!==null&&r.onCountUpdate&&r.onCountUpdate(Q)}),Ye(p,()=>{s.value=1,console.log("[fetchProducts] 2"),ee(!0)}),Ye(()=>r.searchText,(Q,N)=>{Q!==N&&(p.value=Q||"")});const ee=or(async function(Q){var $;if(h=600,g.value&&g.value.length>0&&!d.value){const G=m(g.value,($=r.fields)==null?void 0:$.productCard,r.catalogType);c.value=G,F.value=G.length,f.value=!1,Q&&o.value&&o.value.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"});return}f.value=!0;let w=A.value;I.value<w&&I.value>0&&(w=I.value);const D={...l.value,accountID:r.accountId,rowLimit:w,searchText:p.value||r.searchText,rowOffSet:A.value*(s.value-1)};Q&&o.value.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"});const L=await a.getProductItems(D,r.fields.productCard,r.catalogType);L&&(u.value=L.items.length===w,F.value=L.count,c.value=L.items,v.value=Math.ceil(L.count/A.value)),console.log("[MOLECULEPRODUCTBLOCK:fetchProducts] prodData",L),f.value=!1},h);async function ne(){const{mainHeading:Q,subHeading:N}=r.fields.header;if(!Q.isStatic&&Q.field||!N.isStatic&&N.field){const w=[];Q.isStatic?Q.value=Q.title:w.push(Q.field),N.isStatic?N.value=N.title:w.push(N.field);const D={...l.value,accountID:r.accountId,fields:w},L=await a.getEcatalogDetails(D);Q.isStatic||(Q.value=L[Q.field],Q.isStatic=!0),N.isStatic||(N.value=L[N.field],N.isStatic=!0)}else Q.value=Q.title,N.value=N.title}return n({currentPage:s,fetchProducts:ee}),Nt(()=>{ee(),ne()}),(Q,N)=>(U(),Y("div",{id:i.value,ref_key:"productBlock",ref:o,class:"product"},[R.value&&x.value===void 0&&!e.hideHeader?(U(),Y("div",yy,[he(gy,{modelValue:p.value,"onUpdate:modelValue":N[0]||(N[0]=w=>p.value=w),placeholder:"Search products..."},null,8,["modelValue"])])):ge("",!0),Je(Q.$slots,"default",{},void 0,!0),E.value?(U(),Y("div",xy,[_y,Ne(),by])):(U(),Y("div",Cy,[O.value==="table"?(U(!0),Y(be,{key:0},Me(S.value,w=>(U(),Y("div",{key:(w==null?void 0:w.catalogItemId)||(w==null?void 0:w.itemId),class:"product-item_table"},[he(Zm,{class:"ecb-theme-card","item-id":w==null?void 0:w.itemId,"catalog-item-id":w==null?void 0:w.catalogItemId,loading:f.value,mode:O.value,title:w==null?void 0:w.title,attributes:w==null?void 0:w.attributes,actions:w==null?void 0:w.actions,thumbnail:{value:w==null?void 0:w.thumbnail.value},description:w==null?void 0:w.description,url:w==null?void 0:w.friendlyURL,"template-id":e.configuration.productTemplateId,"ecatalog-id":w==null?void 0:w.eCatalogId,"apply-offer":q.value,"offer-setting":Z.value,offer:w==null?void 0:w.offer},null,8,["item-id","catalog-item-id","loading","mode","title","attributes","actions","thumbnail","description","url","template-id","ecatalog-id","apply-offer","offer-setting","offer"])]))),128)):(U(!0),Y(be,{key:1},Me(S.value,w=>(U(),Y("div",{key:(w==null?void 0:w.catalogItemId)||(w==null?void 0:w.itemId),class:we(["product-item_record",k.value])},[he(zm,{"item-id":w==null?void 0:w.itemId,"catalog-item-id":w==null?void 0:w.catalogItemId,loading:f.value,mode:O.value,title:w==null?void 0:w.title,attributes:w==null?void 0:w.attributes,actions:w==null?void 0:w.actions,thumbnail:{value:w==null?void 0:w.thumbnail.value},description:w==null?void 0:w.description,url:w==null?void 0:w.friendlyURL,"template-id":e.configuration.productTemplateId,"ecatalog-id":w==null?void 0:w.eCatalogId,"apply-offer":q.value,"offer-setting":Z.value,offer:w==null?void 0:w.offer},null,8,["item-id","catalog-item-id","loading","mode","title","attributes","actions","thumbnail","description","url","template-id","ecatalog-id","apply-offer","offer-setting","offer"])],2))),128))]))],8,my))}},[["__scopeId","data-v-f5574cfa"]]),Qf=e=>(Xt("data-v-3951668d"),e=e(),Wt(),e),Ay={class:"catalog ect-flex ect-flex-col ect-gap-0 md:ect-flex-row"},ky={class:"catalog-product md:ect-grow"},Oy={class:"catalog-filter-mobile ect-flex ect-justify-between m-show"},Sy=Qf(()=>b("h3",null,"Filter Products",-1)),Iy=Qf(()=>b("span",null," OPEN FILTERS",-1)),Zf=Le({__name:"OrganismsCatalogBlock",props:{configuration:{type:Object,required:!0,default:()=>({})},fields:{type:Object,required:!0,default:()=>({})},id:{type:String,default:""},searchTerm:{type:String,default:""},onCountUpdate:{type:Function,default:null},initialItems:{type:Array,default:()=>[]}},setup(e){var l,h,p,g,d,m,y,_,x,C,S;const n=hr(),t=e,r=te(!1),i=te(((l=t.configuration.dynamicFilters)==null?void 0:l.length)>0&&((h=t.configuration.displaySettings)==null?void 0:h.displayDynamicFilters)&&!t.searchTerm),o=te(t.configuration.displaySettings),a=me(()=>vg.get(t.configuration.catalogType)),s=me(()=>{let A=f.value.searchText;return A&&!A.endsWith("*")&&(A+="*"),A||""}),u=me(()=>{var F;const A=[],{description:I,thumbnail:B,title:O,attributes:E,actions:k}=t.fields.productCard,R=[I,B,O];return E.forEach(q=>{R.push(q.value),R.push(q.label)}),(k==null?void 0:k.length)>0&&k.forEach(q=>{q.action==="CUSTOM"&&(R.push(q.url),R.push(q.label))}),R.forEach(q=>{!q.isStatic&&q.field?A.push(q.field):q.value=q.title||"-"}),a.value==="eCatalog"?(A.push("XX_ORD1__Item__r.XX_ORD1__Friendly_URL__c"),A.push("XX_ORD1__Item__r.XX_ORD1__SYS_Requires_Configuration__c")):(A.push("XX_ORD1__Friendly_URL__c"),A.push("XX_ORD1__SYS_Requires_Configuration__c")),((F=t.fields.productCard.friendlyURLFields)==null?void 0:F.length)>0&&A.push(...t.fields.productCard.friendlyURLFields),A}),f=te({blockId:t.id,catalogType:pg.get(t.configuration.catalogType)||"Full",checkcurrency:(p=o.value)==null?void 0:p.checkCurrency,eCatalogIDs:t.configuration.catalogType==="ECATALOG_OVERRIDE"&&t.configuration.catalogId?[t.configuration.catalogId]:null,fields:u.value,alternateFieldName:t.configuration.catalogCustomField,searchText:"",whereCondition:t.configuration.staticFilters,sortByField:((d=(g=t.configuration.sort)==null?void 0:g.primary)==null?void 0:d.field)||"Name",sortOrder:(y=(m=t.configuration.sort)==null?void 0:m.primary)==null?void 0:y.direction,secondarySortByField:(x=(_=t.configuration.sort)==null?void 0:_.secondary)==null?void 0:x.field,secondarySortOrder:(S=(C=t.configuration.sort)==null?void 0:C.secondary)==null?void 0:S.direction}),c=te(null),v=te(null);return Ye(()=>r.value,A=>{A&&window.scrollTo(0,0)}),Nt(()=>{f.value.searchText=t.searchTerm||""}),Ye(f,A=>{v.value&&v.value.fetchFilterList(),c.value&&(c.value.currentPage=1,console.log("[fetchProducts] 4"),c.value.fetchProducts())},{deep:!0}),Ye(()=>t.searchTerm,A=>{typeof A=="string"&&(f.value.searchText=A)}),(A,I)=>(U(),Y("div",Ay,[b("div",ky,[he(Ey,{ref_key:"product",ref:c,"block-id":e.id,"account-id":Fe(n).activeStorefrontInfo.accountId,configuration:e.configuration,"catalog-type":a.value,request:f.value,fields:e.fields,"search-text":s.value,"initial-items":t.initialItems,"hide-header":!!t.searchTerm,"on-count-update":t.onCountUpdate},{default:Ve(()=>[ln(b("div",Oy,[Sy,b("div",{class:"ect-flex ect-items-center ect-gap-2 m-show",onClick:I[0]||(I[0]=B=>r.value=!0)},[he(We,{class:"filter-product_icon",icon:"tune",color:"#acacac",size:20}),Iy])],512),[[xu,!r.value&&i.value]])]),_:1},8,["block-id","account-id","configuration","catalog-type","request","fields","search-text","initial-items","hide-header","on-count-update"])])]))}},[["__scopeId","data-v-3951668d"]]),Ty=function(e,n){const t={};t.sectionStyle={},t.blockStyle={};const{visiblity:r}=e;t.visibility=r;const{layout:i}=e;if(t.blockStyle=By(i,n),i&&(i!=null&&i.padding)){const{top:s,bottom:u,left:f,right:c}=i.padding;s&&(t.sectionStyle.paddingTop=`${s}px`),u&&(t.sectionStyle.paddingBottom=`${u}px`),f&&(t.sectionStyle.paddingLeft=`${f}px`),c&&(t.sectionStyle.paddingRight=`${c}px`)}i!=null&&i.gap&&(t.sectionStyle.gap=`${i.gap}px`);const{styling:o}=e;o&&(o.verticalAlignment&&(t.sectionStyle.alignItems=o.verticalAlignment),o.radius&&(t.sectionStyle.borderRadius=o.radius),o.borderStyle&&(t.sectionStyle.borderStyle=o.borderStyle));const{Background:a}=e;return a&&a.style==="Solid"&&(t.sectionStyle.backgroundColor=a.color),a&&a.opacity==="100%"&&(t.sectionStyle.opacity=1),a&&a.image&&a.image!=="sampleImage.png"&&(t.sectionStyle.backgroundImage=`url(${a.image})`,a.imageSize&&(t.sectionStyle.backgroundSize=a.imageSize)),a&&a.repeat==="no-repeat"&&(t.sectionStyle.backgroundRepeat=a.repeat),a&&(a.horizontalAlignment||a.verticalAlignment)&&(t.sectionStyle.backgroundPosition=a.horizontalAlignment+" "+a.verticalAlignment),t};function By(e,n){if(!e)return[{}];const{columnSize:t,columns:r}=e;if(n)return Array(r).fill({display:"flex",flexDirection:"column",width:"100%"});if(!t)return Array(r).fill({});const i=t.split("/");return typeof r=="string"&&i.length!==parseInt(r)?Array(r).fill({}):typeof r=="number"&&i.length!==r?Array(r).fill({}):i.map(o=>({flexBasis:`${o}`}))}const wi=e=>(Xt("data-v-d8d63f41"),e=e(),Wt(),e),Dy={class:"ect-composable-catalog-wrapper"},Ry=["href"],Ly=wi(()=>b("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons","data-name":"ec-material-icons"},null,-1)),Fy=wi(()=>b("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons+Outlined","data-name":"ec-material-icons-outlined"},null,-1)),Ny=wi(()=>b("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons+Round","data-name":"ec-material-icons-round"},null,-1)),Py=wi(()=>b("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200","data-name":"ec-material-symbols-outlined"},null,-1)),My={class:"ect-flex ect-flex-col md:ect-flex-row"},qy=["data-bid","data-bname"],$y={key:0,class:"ect-flex ect-items-center ect-justify-center ect-min-h-[50vh]"},jy=[wi(()=>b("div",{class:"ect-flex ect-flex-col ect-items-center ect-gap-3"},[b("div",{class:"ect-spinner","aria-label":"Loading"}),b("div",{class:"ect-text-sm ect-text-gray-500"},"Loading catalog…")],-1))],Hy={key:1,class:"ect-composable-catalog ectheme"},Vy=["data-sid","data-sname"],Uy=["data-bid","data-bname"],zy=Le({__name:"ExpediteCatalog",props:{templateId:{type:String,required:!0},quoteId:{type:String,default:null},userId:{type:String,required:!0},searchTerm:{type:String,default:""},onCatalogCountUpdate:{type:Function,default:null},previewData:{type:Object,default:()=>({})},initialData:{type:Array,default:()=>[]}},setup(e){const n=e,t=Mf(),r=hr(),i=te(!1),o=te(!1),a=te(""),s=te(""),u=me(()=>t.pageBlocks||[]),f=me(()=>{var l;const v=[];return(l=u.value)==null||l.forEach(h=>{var m;const p={...h},g=typeof h.contentJSON=="string"?JSON.parse(h.contentJSON):h.contentJSON;let d={};g&&(d=Ty(g,i.value),p.styleObject=h.hideStyle?{}:d.sectionStyle,p.visibility=d.visibility,(m=p.blocks)==null||m.forEach((y,_)=>{y.styleObject=d.blockStyle[_]})),v.push(p)}),v}),c=()=>{i.value=window.innerWidth<=768};return Nt(async()=>{var h,p,g;window.addEventListener("resize",c),c(),o.value=!0,await r.fetchDomainDetails(),r.setData({templateId:n.templateId,quoteId:n.quoteId,userId:n.userId});const v=cu(),l=(h=v==null?void 0:v.proxy)==null?void 0:h.$el;l&&typeof l.getRootNode=="function"&&l.getRootNode(),r.getTheme().then(d=>{d&&d.value&&(a.value=d.value);try{r.setThemeData()}catch{}});try{const d=((p=r.salesforceOrgId)==null?void 0:p.value)??r.salesforceOrgId,m=((g=r.storefrontId)==null?void 0:g.value)??r.storefrontId;if(d&&m&&typeof d=="string"&&typeof m=="string"){const y=Date.now(),_=`${Ho}/${d}/${m}/css/theme_${m}.css?t=${y}`;s.value=_}}catch{}await r.getBlockInformation(),o.value=!1}),(v,l)=>{var h,p,g,d,m,y,_;return U(),Y("div",Dy,[a.value?(U(),ke(Wi("style"),{key:0,"data-name":"template-theme"},{default:Ve(()=>[Ne(xe(a.value),1)]),_:1})):ge("",!0),s.value?(U(),Y("link",{key:1,rel:"stylesheet",href:s.value,"data-name":"ec-theme-stylesheet-link"},null,8,Ry)):ge("",!0),Ly,Fy,Ny,Py,Object.keys(e.previewData).length>0?(U(),Y(be,{key:2},[he(Ga),b("div",My,[b("div",{class:"ect-w-full",style:ze((h=e.previewData)==null?void 0:h.styleObject),"data-bid":(p=e.previewData)==null?void 0:p.blockId,"data-bname":(g=e.previewData)==null?void 0:g.blockName},[he(Zf,{id:(d=e.previewData)==null?void 0:d.Id,mode:"preview",configuration:(m=e.previewData)==null?void 0:m.configuration,fields:(y=e.previewData)==null?void 0:y.fields,"search-term":(_=e.previewData)==null?void 0:_.searchTerm,"on-count-update":e.onCatalogCountUpdate},null,8,["id","configuration","fields","search-term","on-count-update"])],12,qy)])],64)):(U(),Y(be,{key:3},[he(Ga),o.value?(U(),Y("div",$y,jy)):(U(),Y("div",Hy,[(U(!0),Y(be,null,Me(f.value,x=>(U(),Y(be,{key:x.id},[Fe(r).useVisiblity(x.visibility)?(U(),Y("div",{key:0,style:ze(x.styleObject),class:"ect-flex ect-flex-col md:ect-flex-row","data-sid":x.sectionId,"data-sname":x.sectionName},[(U(!0),Y(be,null,Me(x.blocks,C=>(U(),Y(be,{key:C.id},[(C==null?void 0:C.blockFormat)==="catalog"?(U(),Y("div",{key:0,class:"ect-w-full",style:ze(C.styleObject),"data-bid":C.blockId,"data-bname":C.blockName},[he(Zf,{id:C.Id,configuration:C.configuration,fields:C.fields,"search-term":e.searchTerm||C.searchTerm,"on-count-update":e.onCatalogCountUpdate,"initial-items":e.initialData},null,8,["id","configuration","fields","search-term","on-count-update","initial-items"])],12,Uy)):ge("",!0)],64))),128))],12,Vy)):ge("",!0)],64))),128))]))],64))])}}},[["__scopeId","data-v-d8d63f41"]]);let Vo=null;if(typeof window<"u"){try{Vo=Rh()}catch{}Vo||(Vo=Lh(),ci(Vo))}let Uo=null,zo=null;const al=new Set;let vr=null;const sl=new Map;async function Ky(e){if(!e)return"";if(sl.has(e))return sl.get(e);try{const n=await fetch(e,{credentials:"omit",cache:"no-cache"});if(n.ok){const t=await n.text();return sl.set(e,t),t}}catch(n){console.warn("[ExpediteComponents] Failed to fetch theme CSS:",n)}return""}async function ll(e,n){if(!e||!n)return;const t=e.querySelector("style[data-vue-expedite-theme]");t&&t.remove();try{const r=await Ky(n);if(r){const i=document.createElement("style");i.setAttribute("data-vue-expedite-theme","true"),i.textContent=r,e.prepend(i)}}catch(r){console.warn("[ExpediteComponents] Failed to inject theme CSS:",r)}}function cl(e){vr=e||null,vr&&al.forEach(n=>{n&&n.shadowRoot&&ll(n.shadowRoot,vr)})}async function Xy(){return Uo||zo||(zo=(async()=>{try{const e=new URL("./style.css",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Bn&&Bn.src||new URL("vue-expedite-components.umd.cjs",document.baseURI).href).href,n=await fetch(e);if(n.ok)return Uo=await n.text(),Uo}catch(e){console.warn("[ExpediteComponents] Failed to load CSS:",e)}return null})(),zo)}const ul=e=>class extends e{async connectedCallback(){if(super.connectedCallback&&super.connectedCallback(),al.add(this),!!this.shadowRoot){if(this.shadowRoot.querySelector("style[data-vue-expedite-style]")){vr&&ll(this.shadowRoot,vr);return}try{const n=await Xy();if(n){const t=document.createElement("style");t.setAttribute("data-vue-expedite-style","true"),t.textContent=n,this.shadowRoot.prepend(t)}else{const t=new URL("./style.css",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Bn&&Bn.src||new URL("vue-expedite-components.umd.cjs",document.baseURI).href).href,r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("data-vue-expedite-style","true"),r.href=t,this.shadowRoot.prepend(r)}vr&&ll(this.shadowRoot,vr)}catch(n){console.warn("[ExpediteComponents] Failed to inject CSS:",n)}}}disconnectedCallback(){al.delete(this),super.disconnectedCallback&&super.disconnectedCallback()}},Jf=ul(ja(lv)),Yf=ul(ja(Sv)),ed=ul(ja(zy));function fl(){typeof window<"u"&&(customElements.get("vue-expedite-configurator")||customElements.define("vue-expedite-configurator",Jf),customElements.get("vue-expedite-gpt")||customElements.define("vue-expedite-gpt",Yf),customElements.get("vue-expedite-catalog")||customElements.define("vue-expedite-catalog",ed))}typeof window<"u"&&fl();const Wy={register:fl,applyThemeToShadows:cl};typeof window<"u"&&(window.VueExpediteComponents=Object.assign(window.VueExpediteComponents||{},{applyThemeToShadows:cl})),zt.ExpediteCatalogElement=ed,zt.ExpediteConfiguratorElement=Jf,zt.ExpediteGPTElement=Yf,zt.applyThemeToShadows=cl,zt.default=Wy,zt.registerWebComponents=fl,Object.defineProperties(zt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});